summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-25 13:04:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-01-25 13:04:19 (GMT)
commita8f51555235a1a747e540a0859ab146f927dfd0b (patch)
tree0b4ef50c67afaa3ec5809b1bb7fb5a27a2a1b882
parentb4ccb6cd32029efa802dfdfa889c75bc16f65cf1 (diff)
parentc3203bf31637a960d1bf579fb7092a1ae850cdb5 (diff)
downloadCMake-a8f51555235a1a747e540a0859ab146f927dfd0b.zip
CMake-a8f51555235a1a747e540a0859ab146f927dfd0b.tar.gz
CMake-a8f51555235a1a747e540a0859ab146f927dfd0b.tar.bz2
Merge topic 'clang-warnings'
c3203bf316 Silence -Wcomma warning 68eabb3576 Avoid -Wstring-plus-int warning Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2846
-rw-r--r--Source/cmListFileCache.cxx5
-rw-r--r--Source/cmState.cxx4
2 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index ff793f6..cc2c09f 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -193,8 +193,9 @@ bool cmListFileParser::ParseFunction(const char* name, long line)
unsigned long lastLine;
unsigned long parenDepth = 0;
this->Separation = SeparationOkay;
- while ((lastLine = cmListFileLexer_GetCurrentLine(this->Lexer),
- token = cmListFileLexer_Scan(this->Lexer))) {
+ while (
+ (static_cast<void>(lastLine = cmListFileLexer_GetCurrentLine(this->Lexer)),
+ token = cmListFileLexer_Scan(this->Lexer))) {
if (token->type == cmListFileLexer_Token_Space ||
token->type == cmListFileLexer_Token_Newline) {
this->Separation = SeparationOkay;
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index d4d3df5..fdd7b3d 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -545,10 +545,10 @@ const char* cmState::GetGlobalProperty(const std::string& prop)
}
#define STRING_LIST_ELEMENT(F) ";" #F
if (prop == "CMAKE_C_KNOWN_FEATURES") {
- return FOR_EACH_C_FEATURE(STRING_LIST_ELEMENT) + 1;
+ return &FOR_EACH_C_FEATURE(STRING_LIST_ELEMENT)[1];
}
if (prop == "CMAKE_CXX_KNOWN_FEATURES") {
- return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1;
+ return &FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT)[1];
}
#undef STRING_LIST_ELEMENT
return this->GlobalProperties.GetPropertyValue(prop);