Open ibotty opened 6 months ago
i got the same error under GCC arm-linux-gnueabihf
https://github.com/virtuosonic/loguru/ fixes this
In the new loguru
package for Fedora, I’m dealing with this by just removing -Werror
, which I think is too strict for downstream packaging in general:
sed -r -i 's/;?-Werror\b//' CMakeLists.txt test/CMakeLists.txt
It’s pretty clear that the warning, while technically correct, is not indicating a real problem here.
The patch https://github.com/virtuosonic/loguru/commit/e1ffdc4149083cc221d44b666a0f7e3ec4a87259 from the fork linked above does look, at a glance, like a correct way to avoid the warning without changing the code’s behavior across architectures and compilers.
The patch https://github.com/virtuosonic/loguru/commit/e1ffdc4149083cc221d44b666a0f7e3ec4a87259 from the fork linked above does look, at a glance, like a correct way to avoid the warning without changing the code’s behavior across architectures and compilers.
Actually there no risk if the variable c in the loops is signed or unsigned because it isn't modified, my next step would be to make it const, to make this clear to the compiler.
See this example log