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
Minor warnings to fix (-Wunused-parameter
, -Wsign-compare
)
#1785
Comments
Don't think we should ignore these errors EglContext SFML/src/SFML/Window/EglContext.cpp Lines 163 to 170 in 59df9d0
Why are we not using the provided parameters? 🤔 WindowImplX11 Doesn't really cost us anything to convert to RenderTextureImplFBO SFML/src/SFML/Graphics/RenderTextureImplFBO.cpp Lines 80 to 106 in 498d7ee
I guess if we don't use If anyone wants to provide PRs for these, I'm happy to accept them. |
I would also like to note that there is a unused on the Glx context as well:
(Note: I am running GCC 10.1.0, not clang) |
EglContext
Good question, but it is like this since the initial addition of the file 8 years ago. It looks like we simply never implemented that constructor, and somehow no one bothered using it 🙂 We have multiple options:
WindowImplX11In WindowImplX11, the conversion is not needed, the X11 fields are already Pull requestI started a draft PR (see link above this comment) to address some of the issues, but would need feedback to continue with the rest. |
GlContext.cpp forwards all context management functionality to the concrete platform implementations. If there are certain unused parameters on one implementation they will certainly be used by some other. As such, I don't think it makes sense to discuss cutting down on the overloads until it can be shown a certain overload isn't used by any implementation. If the aim is to reduce the warnings then I don't see why we can't just remove the parameter names. |
I see. For the constructor overloads not implemented, I could at least add a |
That would make sense. |
See #1792 but not sure if |
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
-Wsign-compare is enabled with -Wall, so #1792 will have both enabled. |
Implemented with #1846 |
Subject of the issue
There are some warnings produced when compiling SFML by source. I've looked at the code and they seem benign -- they just need to be suppressed.
Your environment
Steps to reproduce
Build.
The text was updated successfully, but these errors were encountered: