-
Notifications
You must be signed in to change notification settings - Fork 826
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
Compiling clean with -Wsign-compare #2907
Comments
Or even |
noting: |
after bb6c9a9 and b2c85e0 mapnik compiles cleanly with But I think the next steps here are:
|
What's
That's as useless as a warning can get. |
@lightmare is right! It hurts my eyes to see signatures like below :)
|
This got added because I turned it on thinking it might be useful. And it immediately caught code in mapnik like:
Where variables were similarly named in clashing scopes. Now, I admit that running this above testcase in clang++ (at least) does not exhibit any bug. You would worry that the
Right, the g++ warnings are awful and unhelpful. And not at all the kind of shadowing that I added
Yeah, sorry. My motivation behind this mad dash was that g++ was spewing so many compiler warnings that the travis logs were filling up and halting builds prematurely. In retrospect a better solution would have been to disable |
Noting that I'd also like to try to enable:
|
-Wsign-compare
is often a good indication of subtle bugs. We should enable this warning and work to clean up all warnings that come from it (supressing those outside mapnik).After that ideally we'd also start using all of these:
-Wextra -Wconversion -Wshadow -Wunused-parameter -Wsign-compare
.The text was updated successfully, but these errors were encountered: