From 0c5b9f5d11f405d967569a7b287f3e1c3afab2b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B6ppner?= Date: Wed, 30 Nov 2022 20:08:49 +0100 Subject: [PATCH] mon_tools: Silence address-of-packed-member compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The proc_sum_t struct is defined with the packed attribute and produces the following compile warning: mon_procd.c: In function ‘read_cpu’: mon_procd.c:351:27: warning: taking address of packed member of ‘struct proc_sum_t’ may result in an unaligned pointer value [-Waddress-of-packed-member] 351 | cal_cpu(&cpudata, &proc_sum.cpu); | ^~~~~~~~~~~~~ Silence the warning with -Wno-address-of-packed-member compile flag since the struct is required to be as is. Reviewed-by: Gerald Schaefer Signed-off-by: Jan Höppner Signed-off-by: Steffen Eiden --- mon_tools/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mon_tools/Makefile b/mon_tools/Makefile index aa95fe8a..6868645f 100644 --- a/mon_tools/Makefile +++ b/mon_tools/Makefile @@ -1,5 +1,7 @@ include ../common.mak +ALL_CFLAGS += -Wno-address-of-packed-member + all: mon_fsstatd mon_procd mon_fsstatd: mon_fsstatd.o