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

Further gcc -Werror=array-bounds fix #678

Merged
merged 1 commit into from
Sep 21, 2024
Merged

Conversation

nwf
Copy link
Collaborator

@nwf nwf commented Sep 21, 2024

In test/perf/startup, gcc (Debian 14.2.0-3) seems to get confused about the size of the counters vector as the code was written. Rewrite the code to pass the same value (std::thread::hardware_concurrency(), but in a local) to both counters.resize() and the ParallelTest ctor.

In test/perf/startup, gcc (Debian 14.2.0-3) seems to get confused about
the size of the counters vector as the code was written.  Rewrite the
code to pass the same value (`std::thread::hardware_concurrency()`, but
in a local) to both `counters.resize()` and the `ParallelTest` ctor.
@nwf nwf requested a review from mjp41 September 21, 2024 03:41
Copy link
Member

@mjp41 mjp41 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how that fixes GCC warning, but the code looks the same, so looks fine to me.

@nwf nwf merged commit 1925909 into microsoft:main Sep 21, 2024
52 checks passed
@nwf nwf deleted the 202409-gcc-startup branch September 21, 2024 10:32
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