Page MenuHomeFreeBSD

libsa: errors with pointer conversion
ClosedPublic

Authored by tsoome on Thu, Jul 31, 9:55 PM.
Tags
None
Referenced Files
F126036690: D51662.diff
Thu, Aug 14, 10:11 AM
Unknown Object (File)
Mon, Aug 11, 6:04 PM
Unknown Object (File)
Mon, Aug 11, 11:04 AM
Unknown Object (File)
Sun, Aug 10, 4:15 PM
Unknown Object (File)
Sun, Aug 10, 2:45 PM
Unknown Object (File)
Sun, Aug 10, 7:28 AM
Unknown Object (File)
Tue, Aug 5, 7:18 AM
Unknown Object (File)
Thu, Jul 31, 10:05 PM
Subscribers

Details

Summary

loader ip implementation is using pointer to structure ip to receive
the packet and is using this pointer to cast on other data types
(namely structure arphdr). Problem does arise when those data structures
are declared with different alignment rules and when/if the compiler
does check those rules. To work around and silence warnings, use
void * generic pointer instead.

Error seen with gcc 14 (-Werror=address-of-packed-member).

Diff Detail

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