]> git.tuebingen.mpg.de Git - lopsub.git/commitdiff
build: Error out on implicit function declarations.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 25 Apr 2021 22:57:12 +0000 (00:57 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 28 Apr 2021 21:16:13 +0000 (23:16 +0200)
Replacing lopsub.h by an empty file builds a buggy lopsubgen-stage1
executable which segfaults due to a format string mismatch caused
by the implicit declaration of lls_version(). In this package all
functions are supposed to be declared, so let's fail the build if
any undeclared functions are found.

Tested-by: Alex Gietz <oss@mcdinner.de>
Makefile

index f7e19fb8901d98dbfd90965f521b892bc45cdc0e..548c96ff0e6298e29d8f247940a4f446e6757d35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -97,6 +97,7 @@ lopsubex_objs := lopsubex.o lopsubex.lsg.o $(liblopsub_objs)
 
 LLS_CFLAGS := -g -fPIC
 STRICT_CFLAGS := -Wall
+STRICT_CFLAGS += -Werror-implicit-function-declaration
 
 $(lsg_objs) $(liblopsub_objs) $(lopsubex_objs): %.o: %.c
 lopsubgen.o config_file.o: