Page MenuHomeFreeBSD

tunefs: Don't lower WARNS
ClosedPublic

Authored by des on Mar 22 2026, 6:59 PM.
Tags
None
Referenced Files
F160712299: D56033.id174131.diff
Sat, Jun 27, 2:04 AM
Unknown Object (File)
Thu, Jun 25, 9:22 PM
Unknown Object (File)
Wed, Jun 24, 12:54 PM
Unknown Object (File)
Sun, Jun 14, 6:56 AM
Unknown Object (File)
Sun, Jun 7, 2:48 PM
Unknown Object (File)
May 17 2026, 7:21 PM
Unknown Object (File)
May 17 2026, 7:14 PM
Unknown Object (File)
May 14 2026, 5:44 AM

Details

Summary

Use casts to silence the alignment warnings instead of potentially
suppressing other legitimate warnings.

MFC after: 1 week

Diff Detail

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

Event Timeline

des requested review of this revision.Mar 22 2026, 6:59 PM

@brooks, @jrtc27: I wonder if it might be nice to have a __ASSUME_ALIGNED wrapper for these cases similar to __DECONST. In particular, for CHERI it can be useful to annotate when pointer values are properly aligned so that assignment can be inlined instead of resulting in a libcall to memcpy.

__ASSUME_ALIGNED could work. __builtin_assume_aligned is broadly supported so I double we even need a fall back.

__ASSUME_ALIGNED could work. __builtin_assume_aligned is broadly supported so I double we even need a fall back.

__ASSUME_ALIGNED currently does not exist, may I commit this until it does?

This revision was not accepted when it landed; it landed in state Needs Review.Apr 2 2026, 11:22 AM
Closed by commit rGc5e79c7e93dd: tunefs: Don't lower WARNS (authored by des). · Explain Why
This revision was automatically updated to reflect the committed changes.
In D56033#1284538, @des wrote:

__ASSUME_ALIGNED could work. __builtin_assume_aligned is broadly supported so I double we even need a fall back.

__ASSUME_ALIGNED currently does not exist, may I commit this until it does?

Yes, to be clear, I wasn't objecting at all, just wanting to raise the idea of being more explicit in the future for these cases.