Page MenuHomeFreeBSD

Fix unaligned access in newfs_nandfs
ClosedPublic

Authored by dan.mcgregor_usask.ca on Feb 10 2017, 7:19 PM.
Tags
None
Referenced Files
F176304131: D9532.diff
Sat, Oct 17, 7:09 PM
Unknown Object (File)
Sun, Oct 11, 9:35 PM
Unknown Object (File)
Sat, Sep 26, 12:57 AM
Unknown Object (File)
Wed, Sep 23, 10:52 PM
Unknown Object (File)
Sep 13 2026, 2:55 PM
Unknown Object (File)
Sep 11 2026, 10:40 AM
Unknown Object (File)
Sep 10 2026, 9:22 PM
Unknown Object (File)
Sep 8 2026, 1:23 AM
Subscribers

Details

Summary

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

Diff Detail

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

Event Timeline

dan.mcgregor_usask.ca retitled this revision from to Fix unaligned access in newfs_nandfs.
dan.mcgregor_usask.ca updated this object.
dan.mcgregor_usask.ca 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.