shell/sc_can: fix uninitialized warning#9627
Conversation
When compiled for `hifive1` board with `gcc-7.2.0` this warning was raised: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|
@kenrabold Could you look if you have the same issue with linking in this PR ? I raise the warning when doing |
|
I add a |
|
The link failure is from insufficient memory on the hifive1 board to hold the program image and RAM sections. The hifive1 board is already in the BOARD_INSUFFICIENT_MEMORY list for the /tests/conn_can Makefile, so this test app should never be compiled for hifive1. |
|
@kenrabold Thank you for your quick feedback, and sorry for not paying enough attention. The message was different from what I see in arm boards Also I was not being careful enough when testing. So in fact no problems with |
|
@ZetaR60 Yes I like fixing what is possible in sub-PRs as it helps getting merged early. Also it has been problematic for me in the release tests. |
|
Backport provided in #9644 |
Contribution description
When compiled for
hifive1board withgcc-7.2.0this warning was raised:'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
This was first mentioned in RIOT-OS/riotdocker#42 (comment)
Testing
The board does not have enough memory but the error is triggered when compiling with a
gccversion7.2.0:Warning is dismissed, it was just a testing procedure error.
Issues/PRs references
#9405
RIOT-OS/riotdocker#42
Found it during release testing