You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JFYI:
In ALT we compiling with CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 ' by default (but no -Werror). With this libelf tests always negative even when libelf-devel is installed.
A solution you have proposed is to add the "-Wno-error=unused-variable" flag to your CFLAGS to prevent the compiler from treating warnings as errors. However, you could also consider another solution, which is to add the "unused" attribute to the variables causing the warnings. This can be done as follows in your code:
attribute((unused)) GElf_Ehdr ehdr;
By adding this attribute to the variables generating warnings, you're telling the compiler to ignore them in terms of warnings about unused variables
Ok, I think we should save the output of compiler during the dependency check. And for the libelf case specifically, it can simply remove the ehdr variable as it's not needed by the program.
JFYI:
In ALT we compiling with
CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 '
by default (but no-Werror
). With this libelf tests always negative even when libelf-devel is installed.With this patch
we see
In gcc 13.2.1
-Wunused-variable
is included in-Wall
:I easily (except the time to find this) workaround this by adding
-Wno-error=unused-variable
toCFLAGS
.The text was updated successfully, but these errors were encountered: