Page MenuHomeFreeBSD

RISC-V: fix some mismatched format specifiers
ClosedPublic

Authored by mhorne on Sep 4 2020, 12:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 23 2024, 10:38 PM
Unknown Object (File)
Feb 23 2024, 10:38 PM
Unknown Object (File)
Feb 23 2024, 10:37 PM
Unknown Object (File)
Feb 23 2024, 10:37 PM
Unknown Object (File)
Feb 23 2024, 12:50 PM
Unknown Object (File)
Dec 22 2023, 7:47 AM
Unknown Object (File)
Dec 20 2023, 6:34 AM
Unknown Object (File)
Dec 3 2023, 1:42 PM
Subscribers

Details

Summary

RISC-V has been built with -Wno-format, which is how these went undetected.
Address them now before re-enabling those warnings.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mhorne created this revision.
arichardson added inline comments.
sys/riscv/riscv/db_disasm.c
419 ↗(On Diff #76631)

Could also use %x since it's an int? How is this not triggering warnings with clang?

527 ↗(On Diff #76631)

Same here?

sys/riscv/riscv/db_disasm.c
419 ↗(On Diff #76631)

Yeah, that is better.

Looks like -Wno-format is passed when MK_FORMAT_EXTENSIONS == "no", so that would be why clang hasn't complained. I'm enabling it in D26320.

Address @arichardson's comment. Fix one additional instance in a riscv-specific driver.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 8 2020, 1:21 PM
This revision was automatically updated to reflect the committed changes.