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: -Wunsafe-buffer-usage warnings in TaskbarHost::SetThumbarButtons() #44238

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

ckerr
Copy link
Member

@ckerr ckerr commented Oct 14, 2024

Description of Change

Part 19 in a series to fix -Wunsafe-buffer-usage warnings in shell/. This PR fixes warnings in an array loop in TaskbarHost::SetThumbarButtons() by adding constexpr and std::array so that the compiler has enough info to know that the array index is always valid.

Checklist

Release Notes

Notes: none.

@ckerr ckerr added semver/patch backwards-compatible bug fixes target/31-x-y PR should also be added to the "31-x-y" branch. target/32-x-y PR should also be added to the "32-x-y" branch. target/33-x-y PR should also be added to the "33-x-y" branch. labels Oct 14, 2024
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 14, 2024
@ckerr ckerr marked this pull request as draft October 14, 2024 22:34
@ckerr ckerr force-pushed the fix/Wunsafe-buffer-usage-warnings-in-TaskbarHost branch from 708d6f9 to c5e673b Compare October 15, 2024 03:14
@ckerr ckerr marked this pull request as ready for review October 15, 2024 03:15
@github-actions github-actions bot added the target/34-x-y PR should also be added to the "34-x-y" branch. label Oct 15, 2024
@ckerr ckerr merged commit b5acebf into main Oct 15, 2024
56 checks passed
@ckerr ckerr deleted the fix/Wunsafe-buffer-usage-warnings-in-TaskbarHost branch October 15, 2024 23:31
Copy link

release-clerk bot commented Oct 15, 2024

No Release Notes

@trop
Copy link
Contributor

trop bot commented Oct 15, 2024

I was unable to backport this PR to "32-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Oct 15, 2024

I was unable to backport this PR to "31-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Oct 15, 2024

I have automatically backported this PR to "34-x-y", please check out #44259

@trop trop bot added in-flight/34-x-y and removed target/34-x-y PR should also be added to the "34-x-y" branch. labels Oct 15, 2024
@trop
Copy link
Contributor

trop bot commented Oct 15, 2024

I have automatically backported this PR to "33-x-y", please check out #44260

@trop trop bot added merged/34-x-y PR was merged to the "34-x-y" branch. merged/33-x-y PR was merged to the "33-x-y" branch. and removed target/33-x-y PR should also be added to the "33-x-y" branch. in-flight/34-x-y in-flight/33-x-y labels Oct 15, 2024
yangannyx pushed a commit to yangannyx/electron that referenced this pull request Oct 21, 2024
…() (electron#44238)

* fix: -Wunsafe-buffer-usage warnings in TaskbarHost::SetThumbarButtons()

* fixup! fix: -Wunsafe-buffer-usage warning in ChunkedDataPipeReadableStream (electron#44211)
yangannyx pushed a commit to yangannyx/electron that referenced this pull request Oct 21, 2024
…() (electron#44238)

* fix: -Wunsafe-buffer-usage warnings in TaskbarHost::SetThumbarButtons()

* fixup! fix: -Wunsafe-buffer-usage warning in ChunkedDataPipeReadableStream (electron#44211)
yangannyx pushed a commit to yangannyx/electron that referenced this pull request Oct 21, 2024
…() (electron#44238)

* fix: -Wunsafe-buffer-usage warnings in TaskbarHost::SetThumbarButtons()

* fixup! fix: -Wunsafe-buffer-usage warning in ChunkedDataPipeReadableStream (electron#44211)
ckerr added a commit that referenced this pull request Oct 29, 2024
…() (#44238)

* fix: -Wunsafe-buffer-usage warnings in TaskbarHost::SetThumbarButtons()

* fixup! fix: -Wunsafe-buffer-usage warning in ChunkedDataPipeReadableStream (#44211)
@trop
Copy link
Contributor

trop bot commented Oct 29, 2024

@ckerr has manually backported this PR to "31-x-y", please check out #44455

codebytere pushed a commit that referenced this pull request Oct 29, 2024
…() (31-x-y) (#44455)

fix: -Wunsafe-buffer-usage warnings in TaskbarHost::SetThumbarButtons() (#44238)

* fix: -Wunsafe-buffer-usage warnings in TaskbarHost::SetThumbarButtons()

* fixup! fix: -Wunsafe-buffer-usage warning in ChunkedDataPipeReadableStream (#44211)
@trop trop bot added merged/31-x-y PR was merged to the "31-x-y" branch. and removed in-flight/31-x-y labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/31-x-y PR was merged to the "31-x-y" branch. merged/33-x-y PR was merged to the "33-x-y" branch. merged/34-x-y PR was merged to the "34-x-y" branch. needs-manual-bp/32-x-y new-pr 🌱 PR opened in the last 24 hours semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants