]> cygwin.com Git - cygwin-apps/setup.git/commitdiff
Suppress bogus free-nonheap-object warning in iniparse.cc
authorJon Turney <jon.turney@dronecode.org.uk>
Mon, 27 Jun 2022 18:02:38 +0000 (19:02 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Mon, 27 Jun 2022 18:02:38 +0000 (19:02 +0100)
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

index 423f4d78c6458e6ed9d48f0291164448ef5b8849..bf8b52ec8ea42e5ff9d4f248fe1391fa662f1688 100644 (file)
@@ -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
 
This page took 0.033133 seconds and 5 git commands to generate.