From 69ccd7669712339f4855457d68d5b885152fbfb2 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Mon, 27 Jun 2022 19:02:38 +0100 Subject: [PATCH] Suppress bogus free-nonheap-object warning in iniparse.cc MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This warning bogusly occurs with -O0 in bison generated code. The free() is not reachable when the pointer references a non-heap object. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 iniparse.cc: In function ‘int yyparse()’: iniparse.cc:1789:18: warning: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Wfree-nonheap-object] iniparse.cc:1148:16: note: declared here --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 423f4d78..bf8b52ec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,6 +33,7 @@ AM_CPPFLAGS = -D__USE_MINGW_ANSI_STDIO=1 -DLZMA_API_STATIC\ $(ZLIB_CFLAGS) $(LZMA_CFLAGS) $(ZSTD_CFLAGS) $(LIBCRYPT_CFLAGS) $(LIBSOLV_CFLAGS) inilex_CXXFLAGS:=-Wno-sign-compare +iniparse_CXXFLAGS:=-Wno-free-nonheap-object noinst_PROGRAMS = @SETUP@$(EXEEXT) inilint -- 2.43.5