summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-11 14:41:03 (GMT)
committerBrad King <brad.king@kitware.com>2019-04-11 14:44:38 (GMT)
commitaeddf63587c242a7995598f4b1a5f248e4e3cb13 (patch)
tree55a4e7709092bb1a5d46e6011e5f21df608fc775 /Source
parenta550e2d6e48798d342a5ba7436013c6aa6ce5151 (diff)
downloadCMake-aeddf63587c242a7995598f4b1a5f248e4e3cb13.zip
CMake-aeddf63587c242a7995598f4b1a5f248e4e3cb13.tar.gz
CMake-aeddf63587c242a7995598f4b1a5f248e4e3cb13.tar.bz2
cmArgumentParser: Fix -Wcomma warning
Clang `-Wcomma` warns: ``` Source/cmArgumentParser.cxx:58:42: warning: possible misuse of comma operator this->CurrentList = (val.emplace_back(), &val.back()); ^ ``` This was introduced by commit 4359fe133b (Introduce cmArgumentParser, 2019-03-23). Suppress it with the suggested cast.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmArgumentParser.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmArgumentParser.cxx b/Source/cmArgumentParser.cxx
index 9a9932c..751d117 100644
--- a/Source/cmArgumentParser.cxx
+++ b/Source/cmArgumentParser.cxx
@@ -55,7 +55,7 @@ void Instance::Bind(StringList& val)
void Instance::Bind(MultiStringList& val)
{
this->CurrentString = nullptr;
- this->CurrentList = (val.emplace_back(), &val.back());
+ this->CurrentList = (static_cast<void>(val.emplace_back()), &val.back());
this->ExpectValue = false;
}