Page MenuHomeFreeBSD

tunefs: Don't lower WARNS
ClosedPublic

Authored by des on Mar 22 2026, 6:59 PM.
Tags
None
Referenced Files
F156048352: D56033.id174131.diff
Sun, May 10, 10:05 AM
F156047785: D56033.id174131.diff
Sun, May 10, 10:01 AM
F155932181: D56033.diff
Sat, May 9, 8:32 PM
F155930504: D56033.diff
Sat, May 9, 8:23 PM
Unknown Object (File)
Tue, Apr 28, 11:58 AM
Unknown Object (File)
Mon, Apr 27, 9:51 PM
Unknown Object (File)
Wed, Apr 15, 12:01 PM
Unknown Object (File)
Wed, Apr 15, 10:24 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.