Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MicroBenchmark build on Linux with clang 18.1.8 #141

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

omjavaid
Copy link
Contributor

MicroBenchmarks/libs/benchmark/test/options_test.cc fails to build on Linux/AArch64 with following error:
error: variable 'actual_iterations' set but not used

This patch adds benchmark::DoNotOptimize(actual_iterations); to to function BM_explicit_iteration_count in options_test.cc

-Wall and -Werror were being used to compile and I am surprised that this was not caught by any of the buildbots.
Some versions of clang compile this all fine with -Wall -Werror.

MicroBenchmarks/libs/benchmark/test/options_test.cc fails to build
on Linux/AArch64 with following error:
error: variable 'actual_iterations' set but not used

This patch adds benchmark::DoNotOptimize(actual_iterations); to
to function BM_explicit_iteration_count in options_test.cc

-Wall and -Werror were being used to compile and I am surprised that
this was not caught by any of the buildbots.
Some versions of clang compile this all fine with -Wall -Werror.
@omjavaid omjavaid merged commit 3ed6810 into llvm:main Oct 4, 2024
1 check passed
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