Page MenuHomeFreeBSD

libsa: errors with pointer conversion
ClosedPublic

Authored by tsoome on Jul 31 2025, 9:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 11, 2:53 PM
Unknown Object (File)
Fri, Apr 10, 4:31 PM
Unknown Object (File)
Thu, Apr 9, 2:51 PM
Unknown Object (File)
Tue, Apr 7, 4:26 AM
Unknown Object (File)
Sun, Mar 29, 6:39 AM
Unknown Object (File)
Sun, Mar 29, 2:29 AM
Unknown Object (File)
Sun, Mar 29, 12:56 AM
Unknown Object (File)
Sun, Mar 22, 4:18 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