Skip to content

libbpf-tools/opensnoop: hint on unused variable#5502

Open
athos-ribeiro wants to merge 1 commit into
iovisor:masterfrom
athos-ribeiro:hint-unused-gcc16
Open

libbpf-tools/opensnoop: hint on unused variable#5502
athos-ribeiro wants to merge 1 commit into
iovisor:masterfrom
athos-ribeiro:hint-unused-gcc16

Conversation

@athos-ribeiro
Copy link
Copy Markdown

GCC-16 changed the default of the unused-but-set-variable warnings, which now throws an error when -Wall or -Wextra is enabled.

sps_cnt is only used when USE_BLAZESYM is defined. This patch does a void cast to hint the compiler to ignore sps_cnt being unused in those cases.

GCC-16 changed the default of the unused-but-set-variable warnings,
which now throws an error when -Wall or -Wextra is enabled.

sps_cnt is only used when USE_BLAZESYM is defined. This patch does a
void cast to hint the compiler to ignore sps_cnt being unused in those
cases.

* https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants