From c239d99379528cb0077725267ee45b6eda889ebe Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov Date: Tue, 1 Dec 2020 13:51:49 +0100 Subject: [PATCH] genprotimg: do not fail on inline warnings caused by glib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc's -Werror switch also enables -Werror=inline which leads to a compilation failure due to inline warnings caused by GLIB macros. To fix it, disable the conversion of inline warnings into errors. In file included from buildroot/qemu-s390x/host/bin/../s390x-buildroot-linux-gnu/sysroot/usr/lib/glib-2.0/include/glibconfig.h:9, from buildroot/qemu-s390x/host/bin/../s390x-buildroot-linux-gnu/sysroot/usr/include/glib-2.0/glib/gtypes.h:32, from buildroot/qemu-s390x/host/bin/../s390x-buildroot-linux-gnu/sysroot/usr/include/glib-2.0/glib/galloca.h:32, from buildroot/qemu-s390x/host/bin/../s390x-buildroot-linux-gnu/sysroot/usr/include/glib-2.0/glib.h:30, from pv/pv_hdr.c:10: buildroot/qemu-s390x/build/s390-tools-2.15.1/genprotimg/src/utils/buffer.h: In function ‘pv_hdr_new’: buildroot/qemu-s390x/host/bin/../s390x-buildroot-linux-gnu/sysroot/usr/include/glib-2.0/glib/gmacros.h:1028:49: error: inlining failed in call to ‘glib_autoptr_clear_Buffer’: call is unlikely and code size would grow [-Werror=inline] 1028 | #define _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) glib_autoptr_clear_##TypeName | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Alexander Egorenkov Reviewed-by: Bjoern Walk Signed-off-by: Jan Höppner --- genprotimg/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genprotimg/src/Makefile b/genprotimg/src/Makefile index a47d0fe5..a71bb1e3 100644 --- a/genprotimg/src/Makefile +++ b/genprotimg/src/Makefile @@ -17,7 +17,7 @@ WARNINGS := -Wall -Wextra -Wshadow \ -Wcast-align -Wwrite-strings -Wmissing-prototypes \ -Wmissing-declarations -Wredundant-decls -Wnested-externs \ -Wno-long-long -Wuninitialized -Wconversion -Wstrict-prototypes \ - -Wpointer-arith -Werror \ + -Wpointer-arith -Werror -Wno-error=inline \ $(NULL) $(bin_PROGRAM)_SRCS := $(bin_PROGRAM).c pv/pv_stage3.c pv/pv_image.c \