There are many casts of this struct to uint32_t, so we also need to ensure
that it is sufficiently aligned to safely perform this cast on architectures
that don't allow unaligned accesses. This fixes lots of -Wcast-align warnings.
Details
Details
- Reviewers
ae melifaro glebius - Commits
- rGa81c165bce14: Require uint32_t alignment for ipfw_insn
fixes lots of compiler warnings
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/netinet/ip_fw.h | ||
---|---|---|
342 | This could be _Alignas(uint32_t) with C11, but if we fall back to attribute((aligned)), we need an integer and can't use a type name. |
Comment Actions
I have some doubts, that this change is safe. But probably we will see the result quickly.