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
F152579644: D51535.id.diff
Wed, Apr 15, 7:13 PM
Unknown Object (File)
Tue, Apr 14, 2:42 PM
Unknown Object (File)
Tue, Apr 7, 4:21 PM
Unknown Object (File)
Mon, Apr 6, 3:22 AM
Unknown Object (File)
Fri, Apr 3, 8:23 PM
Unknown Object (File)
Fri, Apr 3, 10:38 AM
Unknown Object (File)
Tue, Mar 17, 7:27 AM
Unknown Object (File)
Mar 16 2026, 5:38 PM

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