Page MenuHomeFreeBSD

Fix unaligned access in newfs_nandfs

Authored by on Feb 10 2017, 7:19 PM.
Referenced Files
Unknown Object (File)
Mon, May 8, 11:53 AM
Unknown Object (File)
Mon, May 8, 11:15 AM
Unknown Object (File)
Sun, May 7, 2:54 PM
Unknown Object (File)
Thu, May 4, 11:05 PM
Unknown Object (File)
Mar 6 2023, 1:40 PM
Unknown Object (File)
Mar 2 2023, 10:18 PM
Unknown Object (File)
Feb 21 2023, 7:32 PM
Unknown Object (File)
Feb 18 2023, 8:08 PM



Clang 4 now warns about unaligned access inside packed structures. Fix unaligned
access in newfs_nandfs.

Diff Detail

Lint Passed
No Test Coverage
Build Status
Buildable 7342
Build 7509: arc lint + arc unit

Event Timeline retitled this revision from to Fix unaligned access in newfs_nandfs. updated this object. edited the test plan for this revision. (Show Details)
emaste edited edge metadata.

I think this is fine, but it feels like a Clang false-positive to me.
(fsdata.f_uuid is at offset 64 in nandfs_fsdata)

This revision is now accepted and ready to land.Feb 17 2017, 7:50 PM

It may well be a false positive, though I suspect that this warning is given for any pointer access to a member of a packed structure. This wasn't the only warning of its kind I saw, just the only warning where WARNS wasn't already set to 3 or lower.