Closed mtoupsUNO closed 2 years ago
Dear @mtoupsUNO , thanks for bringing this to our attention and investigating it. May I know which version of GCC this error is raised on?
I was building the client using:
gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
This is the version of gcc that ships with Ubuntu 18.04 LTS, so it is common and will only become more widespread as older Linux systems are updated.
The same warning/error does occur on Ubuntu 17.10 using gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2)
The same warning/error does not occur in gcc version 6.3.0
. Presumably any gcc version before that is also fine.
It appears that GCC's warnings about parentheses got stricter sometime during 2017.
I think the best solution to this is to add parentheses to the existing code. In the future, if we make an error in the code where we write "=" instead of "==", it would be helpful to have this error.
This does not occur in older versions of GCC, so I assume that's why this wasn't caught sooner.
It seems a little silly, but simply adding another pair of parentheses around that while condition will satisfy GCC. I found that a bit distasteful, so instead I added
-Wno-error=parentheses
toCMakeLists.txt
on this line:At least one of these changes should be made, or else the client won't compile on recent versions of GCC.