The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=a81c165bce14257a5fee298214db181e3147ea19
commit a81c165bce14257a5fee298214db181e3147ea19 Author: Alex Richardson <arichard...@freebsd.org> AuthorDate: 2021-01-19 11:32:33 +0000 Commit: Alex Richardson <arichard...@freebsd.org> CommitDate: 2021-01-19 21:23:25 +0000 Require uint32_t alignment for ipfw_insn 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. Reviewed By: ae Differential Revision: https://reviews.freebsd.org/D27879 --- sys/netinet/ip_fw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h index 57d2a4c607e8..f0531a67132d 100644 --- a/sys/netinet/ip_fw.h +++ b/sys/netinet/ip_fw.h @@ -339,7 +339,7 @@ enum ipfw_opcodes { /* arguments (4 byte each) */ * */ typedef struct _ipfw_insn { /* template for instructions */ - u_int8_t opcode; + _Alignas(_Alignof(u_int32_t)) u_int8_t opcode; u_int8_t len; /* number of 32-bit words */ #define F_NOT 0x80 #define F_OR 0x40 _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"