Page MenuHomeFreeBSD

bhyve/tpm_ppi_qemu: Cast address of the TPP3 field to uint32_t
ClosedPublic

Authored by bnovkov on Jul 25 2025, 6:10 PM.
Tags
None
Referenced Files
F163110153: D51535.id159241.diff
Mon, Jul 20, 4:02 AM
Unknown Object (File)
Tue, Jul 14, 5:25 PM
Unknown Object (File)
Mon, Jul 13, 6:42 PM
Unknown Object (File)
Mon, Jul 13, 12:13 AM
Unknown Object (File)
Wed, Jul 1, 3:13 PM
Unknown Object (File)
Fri, Jun 26, 8:13 AM
Unknown Object (File)
Fri, Jun 26, 7:51 AM
Unknown Object (File)
May 21 2026, 1:32 AM

Details

Summary

Fix a format specifier issue when building 'tpm_ppi_qemu.c' with
'dsdt_line' marked as 'printflike'.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

usr.sbin/bhyve/tpm_ppi_qemu.c
210

(unsigned int) is really the only way to fix the identifier. *OR* casting it to the maximum int which is overkill here imho.
*or* switching to DES' implementation of the C24 stuff that lets us match uint32_t to a %blah...

markj added a subscriber: markj.
markj added inline comments.
usr.sbin/bhyve/tpm_ppi_qemu.c
210

Casting the sizeof rather than whole expression would perhaps be clearer.

I don't quite understand why casting to unsigned int would be better.

This revision is now accepted and ready to land.Jul 26 2025, 9:27 PM