mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-02 04:02:23 +03:00
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.
This commit is contained in:
1 parent
a550e2d6e4
commit
aeddf63587
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user