summaryrefslogtreecommitdiff
path: root/Source/cmArgumentParser.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-11 10:41:03 -0400
committerBrad King <brad.king@kitware.com>2019-04-11 10:44:38 -0400
commitaeddf63587c242a7995598f4b1a5f248e4e3cb13 (patch)
tree55a4e7709092bb1a5d46e6011e5f21df608fc775 /Source/cmArgumentParser.cxx
parenta550e2d6e48798d342a5ba7436013c6aa6ce5151 (diff)
downloadcmake-aeddf63587c242a7995598f4b1a5f248e4e3cb13.tar.gz
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/cmArgumentParser.cxx')
-rw-r--r--Source/cmArgumentParser.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmArgumentParser.cxx b/Source/cmArgumentParser.cxx
index 9a9932c569..751d117f47 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;
}