Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Conversation

@n3rdswithgame
Copy link

This is not really a major change, but it helps out for any project that tries to build without any warnings like I do.

Added -Wshadow and -Wsign-conversion warnings to the gcc + clang warnings for the test suite. GCC does not turn these on by default with -Wall or -Wextra, and I don't know if clang bundles them the added warnings in its -Wall or -Wextra.

Also fixed a few lines in the headers that raised these warnings, namely appending an underscore for the shadow warning and a static cast to the sign conversion warning. I went with the underscore on the arguments as I figured there was a good reason that the TokenStream::it and TokenStream::itEnd members didn't have an m_ prefix.

fixed a -Wshadow warning on gcc by changing the names of the ctor arguments
fixed a -Wsign-conversion warning in gcc and clang by static casting the iterator difference to a size_t. The result should should always be >=0 so the static cast will just suppress the warning
Added some extra warnings to the tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant