/home/markus/Projekte/Elektra/current/src/libs/elektra/keyset.c: In function ‘elektraOpmphmInvalidate’:
/home/markus/Projekte/Elektra/current/src/libs/elektra/keyset.c:48:47: warning: unused parameter ‘ks’ [-Wunused-parameter]
static void elektraOpmphmInvalidate (KeySet * ks)
^~
/home/markus/Projekte/Elektra/current/src/libs/elektra/keyset.c: In function ‘elektraOpmphmCopy’:
/home/markus/Projekte/Elektra/current/src/libs/elektra/keyset.c:65:41: warning: unused parameter ‘dest’ [-Wunused-parameter]
static void elektraOpmphmCopy (KeySet * dest, const KeySet * source)
^~~~
/home/markus/Projekte/Elektra/current/src/libs/elektra/keyset.c:65:62: warning: unused parameter ‘source’ [-Wunused-parameter]
static void elektraOpmphmCopy (KeySet * dest, const KeySet * source)
^~~~~~
I fix it right away, but in future some build job would be nice!
I am quite sure that build jobs noticed them ;) There is an overview page for compiler warnings here: https://build.libelektra.org/jenkins/view/compiler%20warnings/
But you are right, we could add -Werror in the build jobs where we currently have no warnings. I added it to #160.
Do we have a ENABLE_OPTIMIZATIONS=OFF job? should I change the elektra-gcc-configure-debian-optimizations job in the configure-debian-optimizations script to ENABLE_OPTIMIZATIONS=OFF?
Yes please, that is a very good idea!
Please make sure to purge the workspace before renaming the build job (if you rename it).
Please also add -Werror to the build job.
I do not have access to jenkins and I prefer to keep it that way.
I will change only the script and add a note to #160.
@KurtMi: actually there is nothing to do except modifying scripts.
Werror can be added to scripts/configure-common and what to do in scripts/configure-debian-optimizations is quite obvious :-)
I do not know how to edit the c build flags in scripts/configure-common properly.
Are you sure that this place is appropriate?
I would have to change all scripts that include configure-common since none pass the c build flags to their cmake command. It seems like a hack.
btw: the optimization build job edit comes in another PR, not #1813.
Okay, then only fix the -Werror for the scripts/configure-debian-optimizations (should be easy to find out how to pass a flag to both C and C++ compiler)
@ingwinlu ping, we actually have an issue about adding -Werror to build jobs.
do you want to add them to the complete build setup? just globally in all build jobs? or in selected build jobs?
Yes, please enable it globally. I am in favor of selective disabling instead of selective enabling.
For some build jobs (like mingw) I am afraid we are not easily able to get rid of all warnings, so we might have to disable -Werror there.
As discussed in: #2041 enabling globally means to have a single definition in the Jenkinsfile and exceptions in the jobs that do not support -Werror (because they have warnings). We cannot add -Werror to the build system: builds might fail then because of irrelevant warnings.
Adding this is should be very simple via the Jenkins file.
Does someone want to step up and add the modifications to verify that you do not need to be a documentation Reading wizzard to change our build config?