Skip to content

treewide: fix format specifiers #19575

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

Merged
merged 2 commits into from
May 10, 2023
Merged

treewide: fix format specifiers #19575

merged 2 commits into from
May 10, 2023

Conversation

maribu
Copy link
Member

@maribu maribu commented May 10, 2023

Contribution description

This brings format specifiers and the passed type back into sync. This won't change observable behavior in one case, and won't even change machine code in the other. But formally, this fixes bugs.

Testing procedure

Code review is sufficient.

Issues/PRs references

Fixes #19517

maribu added 2 commits May 10, 2023 13:00
At a cast to `unsigned` so that the format specifier `%u` matches the
type. I think this won't have an impact on the generated machine code.
@maribu maribu requested a review from gschorcht as a code owner May 10, 2023 11:05
@maribu maribu added Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 10, 2023
@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports Area: sys Area: System Platform: ESP Platform: This PR/issue effects ESP-based platforms labels May 10, 2023
@riot-ci
Copy link

riot-ci commented May 10, 2023

Murdock results

✔️ PASSED

64f4f9a cpu/esp32/periph/pwm.c: fix format specifier

Success Failures Total Runtime
6931 0 6931 08m:41s

Artifacts

@maribu
Copy link
Member Author

maribu commented May 10, 2023

bors merge

bors bot added a commit that referenced this pull request May 10, 2023
19484: makefiles/arch/msp430.inc.mk: Fix compilation issues with GCC 12 r=maribu a=maribu

### Contribution description

This fixes the following compilation issues:

    /home/maribu/Repos/software/RIOT/cpu/msp430fxyz/periph/gpio.c: In function 'gpio_periph_mode':
    /home/maribu/Repos/software/RIOT/cpu/msp430fxyz/periph/gpio.c:95:15: error: array subscript 0 is outside array bounds of 'msp_port_isr_t[0]' [-Werror=array-bounds]
       95 |         sel = &(isrport->SEL);
          |               ^~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

by adding `CFLAGS += --param-min-pagesize=0` for GCC 12 (same issue as already fixed for AVR).

and:

    /usr/lib/gcc/msp430-elf/12.2.0/../../../../msp430-elf/bin/ld: warning: /home/maribu/Repos/software/RIOT/cpu/msp430_common/ldscripts/xfa.ld contains output sections; did you forget -T?

by adding the missing `-T`.

### Testing procedure

The following should still work:

- `make BOARD=msb-430 -C examples/hello-world`
- `make BOARD=msb-430 -C tests/xfa flash test`

### Issues/PRs references

None

19568: tests: move remaining driver related applications to tests/drivers r=aabadie a=aabadie



19575: treewide: fix format specifiers r=maribu a=maribu

### Contribution description

This brings format specifiers and the passed type back into sync. This won't change observable behavior in one case, and won't even change machine code in the other. But formally, this fixes bugs.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
@bors
Copy link
Contributor

bors bot commented May 10, 2023

Build failed (retrying...):

bors bot added a commit that referenced this pull request May 10, 2023
19484: makefiles/arch/msp430.inc.mk: Fix compilation issues with GCC 12 r=maribu a=maribu

### Contribution description

This fixes the following compilation issues:

    /home/maribu/Repos/software/RIOT/cpu/msp430fxyz/periph/gpio.c: In function 'gpio_periph_mode':
    /home/maribu/Repos/software/RIOT/cpu/msp430fxyz/periph/gpio.c:95:15: error: array subscript 0 is outside array bounds of 'msp_port_isr_t[0]' [-Werror=array-bounds]
       95 |         sel = &(isrport->SEL);
          |               ^~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

by adding `CFLAGS += --param-min-pagesize=0` for GCC 12 (same issue as already fixed for AVR).

and:

    /usr/lib/gcc/msp430-elf/12.2.0/../../../../msp430-elf/bin/ld: warning: /home/maribu/Repos/software/RIOT/cpu/msp430_common/ldscripts/xfa.ld contains output sections; did you forget -T?

by adding the missing `-T`.

### Testing procedure

The following should still work:

- `make BOARD=msb-430 -C examples/hello-world`
- `make BOARD=msb-430 -C tests/xfa flash test`

### Issues/PRs references

None

19565: tests: move core related applications to their own tests/core/ folder r=aabadie a=aabadie



19568: tests: move remaining driver related applications to tests/drivers r=aabadie a=aabadie



19575: treewide: fix format specifiers r=maribu a=maribu

### Contribution description

This brings format specifiers and the passed type back into sync. This won't change observable behavior in one case, and won't even change machine code in the other. But formally, this fixes bugs.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
@bors
Copy link
Contributor

bors bot commented May 10, 2023

Build failed (retrying...):

bors bot added a commit that referenced this pull request May 10, 2023
19568: tests: move remaining driver related applications to tests/drivers r=aabadie a=aabadie



19575: treewide: fix format specifiers r=maribu a=maribu

### Contribution description

This brings format specifiers and the passed type back into sync. This won't change observable behavior in one case, and won't even change machine code in the other. But formally, this fixes bugs.


Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
@bors
Copy link
Contributor

bors bot commented May 10, 2023

Build failed (retrying...):

@bors
Copy link
Contributor

bors bot commented May 10, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 4d19093 into RIOT-OS:master May 10, 2023
@maribu maribu deleted the issues/19517 branch May 10, 2023 20:34
@maribu
Copy link
Member Author

maribu commented May 10, 2023

Thx :)

@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Platform: ESP Platform: This PR/issue effects ESP-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

format strings incorrect
3 participants