This repository was archived by the owner on Sep 4, 2023. It is now read-only.
test: astlpc: fix compile warning#1
Open
williamspatrick wants to merge 1 commit intoIntel-BMC:masterfrom
Open
Conversation
With the GCC found in openbmc/openbmc master, we are observing the
following:
```
| build-halfdome/tmp/work/armv7at2hf-vfp-fb-linux-gnueabi/libmctp-intel/1.0+gitAUTOINC+d530c2271e-r1/git/tests/test_astlpc.c:98:26: error: array subscript 2 is above array bounds of 'uint8_t[2]' {aka 'unsigned char[2]'} [-Werror=array-bounds]
| 98 | mmio->kcs[reg] = val;
| | ~~~~~~~~~^~~~~
| build-halfdome/tmp/work/armv7at2hf-vfp-fb-linux-gnueabi/libmctp-intel/1.0+gitAUTOINC+d530c2271e-r1/git/tests/test_astlpc.c:63:17: note: while referencing 'kcs'
| 63 | uint8_t kcs[2];
```
Fix this by being explicit about the register access (enum to int map).
facebook-github-bot
pushed a commit
to facebook/openbmc
that referenced
this pull request
Jun 14, 2022
Summary:
The current revision of code upstream in this repository
appears to fail to compile with later versions of GCC. Fix them.
```
| build-halfdome/tmp/work/armv7at2hf-vfp-fb-linux-gnueabi/libmctp-intel/1.0+gitAUTOINC+d530c2271e-r1/git/tests/test_astlpc.c:98:26: error: array subscript 2 is above array bounds of 'uint8_t[2]' {aka 'unsigned char[2]'} [-Werror=array-bounds]
| 98 | mmio->kcs[reg] = val;
| | ~~~~~~~~~^~~~~
| build-halfdome/tmp/work/armv7at2hf-vfp-fb-linux-gnueabi/libmctp-intel/1.0+gitAUTOINC+d530c2271e-r1/git/tests/test_astlpc.c:63:17: note: while referencing 'kcs'
| 63 | uint8_t kcs[2];
```
Submitted upstream at Intel-BMC/libmctp#1
Test Plan: Build passes.
Reviewed By: GoldenBug
fbshipit-source-id: d48d3c787bccea767d29de8879c72ac93e20961f
Author
|
@sumbhat90 - Is there any hope to get this PR merged? It has been open since June 2022 with no comment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the GCC found in openbmc/openbmc master, we are observing the
following:
Fix this by being explicit about the register access (enum to int map).