With this change there are some new warnings on Linux as the -Wno-unused-parameter doesn't seem to be used in cases where it was before. The command line and messages are
This may not be really important as it seems to build and run but I like to maintain a clean compile with no warnings when possible. It could indicate that the unix:linux branch isn't executed which may cause other problems on some versions of Linux or Qt since -ldl isn't added to LIBS.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FWIW I don't like such a "fix", as it actually has nothing to do with the platform, only about the GCC version (I don't know which version introduced the flag, but I can't imagine such a warning to be platform-specific -- and FreeBSD 9 seems to have GCC 4.2).
A correct fix would rather be to check whether the compiler supports the flag or not, although that's indeed trickier. Other solutions include not to have those flags in the build files directly, or have an easy way to override/disable them (I don't know if they are already, just guessing).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since the warnings occur in /usr/include/shiboken/conversions.h which is a PySide header, a patch could be pushed to PySide to avoid these warnings by not providing a parameter name for each of these inline functions or commenting the parameter. The conversions.h file appears to be human-edited instead of generated.
With this change there are some new warnings on Linux as the -Wno-unused-parameter doesn't seem to be used in cases where it was before. The command line and messages are
This may not be really important as it seems to build and run but I like to maintain a clean compile with no warnings when possible. It could indicate that the unix:linux branch isn't executed which may cause other problems on some versions of Linux or Qt since -ldl isn't added to LIBS.
The correct scope is unix:linux-* since there are linux-g++ and linux-icc scopes. That makes the warnings go away.
Committed as [ba0407] and [5b92f3].
Related
Commit: [5b92f3]
Commit: [ba0407]
FWIW I don't like such a "fix", as it actually has nothing to do with the platform, only about the GCC version (I don't know which version introduced the flag, but I can't imagine such a warning to be platform-specific -- and FreeBSD 9 seems to have GCC 4.2).
A correct fix would rather be to check whether the compiler supports the flag or not, although that's indeed trickier. Other solutions include not to have those flags in the build files directly, or have an easy way to override/disable them (I don't know if they are already, just guessing).
This is a qmake project file so its possible to run the compiler and ask for its version. However, qmake is complex.
I don't know what conditions "-ldl" is needed since it didn't fail the build on Mint 17. I expect its become the default on some level.
The file showing warnings is generated by PySide so it can't just have #pragmas added.
I agree that it would be better to do this based on compiler version or some sort of configure like check, but I don't know how to do that in qmake.
The start of a compiler version check could be http://stackoverflow.com/questions/801279/finding-compiler-vendor-version-using-qmake
Since the warnings occur in /usr/include/shiboken/conversions.h which is a PySide header, a patch could be pushed to PySide to avoid these warnings by not providing a parameter name for each of these inline functions or commenting the parameter. The conversions.h file appears to be human-edited instead of generated.
For example,
would become
or
I don't know of a better way to handle the dl library.