tools: hv: suppress the invalid warning for packed member alignment
Subsystems (2)
PATCH v2 1/1 tools: hv: suppress the invalid warning for packed member alignment
Packed struct vmbus_bufring is 4096 byte aligned and the reporting warning is for the first member of that struct which shouldn't add any offset to create alignment issue.
Suppress the warning by adding -Wno-address-of-packed-member flag to gcc.
Fixes 45bab4d74651 ("tools: hv: Add vmbus_bufring")
Reported-by kernel test robot <[email protected]>
Signed-off-by Saurabh Sengar <[email protected]>
---
[V2] Added 'Fixes' tag
tools/hv/Makefile | 1 + 1 file changed, 1 insertion(+)
tools/hv/Makefile +1 -0
@@ -17,6 +17,7 @@ endif MAKEFLAGS += -r override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include +override CFLAGS += -Wno-address-of-packed-member ALL_TARGETS := hv_kvp_daemon hv_vss_daemon ifneq ($(ARCH), aarch64)
Signature · 1 line
1.8.3.1
Quoted 11 lines · Saurabh Sengar
Packed struct
vmbus_bufringis 4096 byte aligned and the reporting warning is for the first member of that struct which shouldn't add any offset to create alignment issue.Suppress the warning by adding -Wno-address-of-packed-member flag to gcc.
Fixes 45bab4d74651 ("tools: hv: Add vmbus_bufring")Reported-by kernel test robot <[email protected]>Signed-off-by Saurabh Sengar <[email protected]>
Applied to hyperv-fixes, thanks.