Skip to content

Fix gcc12 build: out of bounds warning #97

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 6 commits into from
Closed

Fix gcc12 build: out of bounds warning #97

wants to merge 6 commits into from

Conversation

stolk
Copy link

@stolk stolk commented Sep 15, 2022

gcc-12 will build with this warning:

GmmMultiAdapterULT.cpp:139:27: warning: array subscript 30 is above array bounds of ‘PLATFORM [9][3]’ {aka ‘PLATFORM_STR [9][3]’}

This fix adds an assert, guaranteeing that PlatformIdx will never be out of bounds, which will stop the gcc warning being triggered.

stolk and others added 2 commits September 15, 2022 11:27
…y subscript 30 is above array bounds of ‘PLATFORM [9][3]’ {aka ‘PLATFORM_STR [9][3]’}
@Manish7093
Copy link
Contributor

Hi @stolk,
Thank you for pointing out this issue. We will look into this and try to provide fix shortly if applicable.

stolk added 4 commits October 5, 2022 10:39
…ng: array subscript 30 is above array bounds of ‘PLATFORM [9][3]’ {aka ‘PLATFORM_STR [9][3]’}"

This reverts commit 748e32a.
…7: warning: array subscript 30 is above array bounds of ‘PLATFORM [9][3]’ {aka ‘PLATFORM_STR [9][3]’}""

This reverts commit 50aae3c.
@stolk
Copy link
Author

stolk commented Oct 14, 2022

I will re-do this PR, to get rid of the noise.

@stolk stolk closed this Oct 14, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants