summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Slice/Util.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpp/src/Slice/Util.cpp b/cpp/src/Slice/Util.cpp
index 106a14d989b..40c04199ac1 100644
--- a/cpp/src/Slice/Util.cpp
+++ b/cpp/src/Slice/Util.cpp
@@ -255,8 +255,7 @@ Slice::emitRaw(const char* message)
vector<string>
Slice::filterMcppWarnings(const string& message)
{
- static const int messagesSize = 2;
- static const char* messages[messagesSize] = {"Converted [CR+LF] to [LF]", "End of input with no newline, supplemented newline"};
+ static const char* messages[] = {"Converted [CR+LF] to [LF]", "End of input with no newline, supplemented newline", 0};
static const string delimiters = "\n";
@@ -274,7 +273,7 @@ Slice::filterMcppWarnings(const string& message)
static const string warningPrefix = "warning:";
if(token.find_first_of(warningPrefix) != string::npos)
{
- for(int j = 0; j < messagesSize; ++j)
+ for(int j = 0; messages[j] != 0; ++j)
{
if(token.find_first_of(messages[j]) != string::npos)
{