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
Unknown Object (File)
Sun, Oct 12, 6:12 PM
Unknown Object (File)
Sat, Oct 11, 5:55 AM
Unknown Object (File)
Sat, Oct 11, 5:55 AM
Unknown Object (File)
Sat, Oct 11, 5:55 AM
Unknown Object (File)
Fri, Oct 10, 10:43 PM
Unknown Object (File)
Fri, Oct 3, 7:41 AM
Unknown Object (File)
Wed, Oct 1, 4:18 AM
Unknown Object (File)
Tue, Sep 23, 4:04 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