mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-07 07:08:40 -06:00
Merge topic 'clang-warnings'
c3203bf316Silence -Wcomma warning68eabb3576Avoid -Wstring-plus-int warning Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2846
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user