From abea3888dbc527ece51ade3ced2485be8c30840e Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Thu, 17 Sep 2020 23:18:16 +0300 Subject: [PATCH] Fix compilation under GCC 9 --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index ca8ac763..df0ba439 100644 --- a/Makefile +++ b/Makefile @@ -106,6 +106,11 @@ ifeq ($(shell $(CC) -x c -c $(NULL) -o $(NULL) -Werror -Wpartial-availability 2> WARNINGS += -Wpartial-availability endif +# GCC's implementation of this warning has false positives, so we skip it +ifneq ($(shell $(CC) --version 2>&1 | grep "gcc"), ) +WARNINGS += -no-maybe-uninitialized +endif + CFLAGS += $(WARNINGS) CFLAGS += -std=gnu11 -D_GNU_SOURCE -DVERSION="$(VERSION)" -I. -D_USE_MATH_DEFINES