From 1d425ef3414cdb0362c982f1820e659f2deb81a3 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 6 May 2024 15:17:43 -0700 Subject: nvmf: Add explicit alignment for struct nvmf_fabric_cmd This avoids -Wcast-align warnings from clang when upcasting from struct nvmf_fabric_cmd to struct nvmf_fabric_prop_set_cmd. Reported by: bapt Sponsored by: Chelsio Communications --- sys/dev/nvmf/nvmf_proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvmf/nvmf_proto.h b/sys/dev/nvmf/nvmf_proto.h index 66e68ff384b0..f67c34acbf95 100644 --- a/sys/dev/nvmf/nvmf_proto.h +++ b/sys/dev/nvmf/nvmf_proto.h @@ -172,7 +172,7 @@ struct nvmf_fabric_cmd { uint16_t cid; uint8_t fctype; uint8_t reserved2[59]; -}; +} __aligned(8); struct nvmf_fabric_auth_recv_cmd { uint8_t opcode; -- cgit v1.2.3