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

cpu/cc2538/spi: Fix compiler warning of possible uninitialized variable #5356

Merged
merged 1 commit into from
Apr 20, 2016

Conversation

DipSwitch
Copy link
Member

During the build test of #4413 the following errors where shown:

bindist:openmote-cc2538:
Building application "bindist" for "openmote-cc2538" with MCU "cc2538".

/data/riotbuild/cpu/cc2538/periph/spi.c: In function 'ssi_flush_input':
/data/riotbuild/cpu/cc2538/periph/spi.c:224:12: error: 'tmp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     return tmp;
            ^
cc1: all warnings being treated as errors


bindist:remote:
Building application "bindist" for "remote" with MCU "cc2538".

/data/riotbuild/cpu/cc2538/periph/spi.c: In function 'ssi_flush_input':
/data/riotbuild/cpu/cc2538/periph/spi.c:224:12: error: 'tmp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     return tmp;
            ^
cc1: all warnings being treated as errors

bindist:cc2538dk:
Building application "bindist" for "cc2538dk" with MCU "cc2538".

/data/riotbuild/cpu/cc2538/periph/spi.c: In function 'ssi_flush_input':
/data/riotbuild/cpu/cc2538/periph/spi.c:224:12: error: 'tmp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     return tmp;
            ^
cc1: all warnings being treated as errors

This fixes that.

@DipSwitch DipSwitch added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch labels Apr 19, 2016
@DipSwitch DipSwitch added this to the Release 2016.04 milestone Apr 19, 2016
@DipSwitch
Copy link
Member Author

Although maybe flush doesn't need to return the tmp value?

@DipSwitch
Copy link
Member Author

Is the compiler updated on Murdock? Since this change got nothing to do with this error...

gnrc_border_router:native:
Building application "gnrc_border_router" for "native" with MCU "native".

/data/riotbuild/sys/net/gnrc/network_layer/sixlowpan/iphc/gnrc_sixlowpan_iphc.c: In function 'iphc_nhc_udp_encode':
/data/riotbuild/sys/net/gnrc/network_layer/sixlowpan/iphc/gnrc_sixlowpan_iphc.c:569:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for (int i = nhc_len; i < (udp->size - diff); i++) {
                                 ^
cc1: all warnings being treated as errors

zep:native:
Building application "zep" for "native" with MCU "native".

/data/riotbuild/sys/net/gnrc/network_layer/sixlowpan/iphc/gnrc_sixlowpan_iphc.c: In function 'iphc_nhc_udp_encode':
/data/riotbuild/sys/net/gnrc/network_layer/sixlowpan/iphc/gnrc_sixlowpan_iphc.c:569:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for (int i = nhc_len; i < (udp->size - diff); i++) {
                                 ^
cc1: all warnings being treated as errors

@kYc0o
Copy link
Contributor

kYc0o commented Apr 19, 2016

@kaspar030 any ideas on this? It appears maybe that other PR broke this...

@kYc0o
Copy link
Contributor

kYc0o commented Apr 20, 2016

Fixed in #5360

@kYc0o kYc0o added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Apr 20, 2016
@kYc0o
Copy link
Contributor

kYc0o commented Apr 20, 2016

ACK and go!

@kYc0o kYc0o merged commit 591b0ab into RIOT-OS:master Apr 20, 2016
@kYc0o
Copy link
Contributor

kYc0o commented Apr 20, 2016

Backport on #5357

@miri64 miri64 removed the Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch label Apr 20, 2016
@miri64
Copy link
Member

miri64 commented Apr 20, 2016

please remove the label, when a backport was opened, so we can see which PRs still require one ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants