-Werror -Wno-unused-parameter flagging error with NVHPC
Status: Beta
Brought to you by:
seranian
These source-lines in lib/pfmlib_perf_event_pmu.c
128 static perf_umask_t *perf_um, *perf_um_free, *perf_um_end;
960 perf_um_free = perf_um_end = NULL;
are triggering the error
"pfmlib_perf_event_pmu.c", line 128: error: variable "perf_um_end" was set but never used [set_but_not_used]
static perf_umask_t *perf_um, *perf_um_free, *perf_um_end;
Evidently there are other lines in the file that reference the variable, so I'm not sure what' going on here.
This is the 4.14.1 release code, with the NVHPC 26.9 compiler.
The compile-line is
I can suppress the failure by using the invocation-line
to remove the
-Werror -Wno-unused-parameterflags. But I assume that the intent of the default is to flag this sort of coding issue.