-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCC Wstringop-overflow warnings #136
Comments
I've done a lot of recent updates for CodeQL warnings, so please retry with the latest version (I.e. the main branch) to see if this one is fixed. |
I tried the main branch but still got the warnings. |
If I understand correctly here, it's complaining about the difference between a I don't know how it got there. What's strange is the same pattern is used elsewhere and it doesn't complain elsewhere... |
I just tried building with MinGW-w64 13.2.0 r4 and I'm not seeing these warnings. |
OK, so they only show up in release builds. Not debug builds.
|
According to some research here, GCC is actually complaining if it exceeds It looks like a number of people feel this warning is spurious. Still, I'll see if I can make it happy. What I really don't understand is why it only complains in SOME of the cases which are all basically identical. |
There is a page in the GCC manual about warning options at: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html . I have to be honest in saying that I do feel that this is a spurious warning and from a practical point of view, it might be best to use a "hacky" but somewhat elegant fix for it that will work. The for loop I tied does work and I think SecureZeroMemory will also work if it's ifdefed out for Linux. |
I compiled UVAtlas with GNU 13.2.0 and I got some Wstringop-overflow warnings:
From the GCC manual:
The text was updated successfully, but these errors were encountered: