mirror of
https://github.com/postgres/postgres.git
synced 2025-10-29 22:49:41 +03:00
Add -Wmissing-variable-declarations to the standard compilation flags
This warning flag detects global variables not declared in header files. This is similar to what -Wmissing-prototypes does for functions. (More correctly, it is similar to what -Wmissing-declarations does for functions, but -Wmissing-prototypes is a superset of that in C.) This flag is new in GCC 14. Clang has supported it for a while. Several recent commits have cleaned up warnings triggered by this, so it should now be clean. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce@eisentraut.org
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
override CPPFLAGS := -I../../include -I$(top_srcdir)/src/interfaces/ecpg/include \
|
||||
-I$(libpq_srcdir) $(CPPFLAGS)
|
||||
override CFLAGS += $(PTHREAD_CFLAGS)
|
||||
override CFLAGS += $(PTHREAD_CFLAGS) $(PERMIT_MISSING_VARIABLE_DECLARATIONS)
|
||||
|
||||
LDFLAGS_INTERNAL += -L../../ecpglib -lecpg -L../../pgtypeslib -lpgtypes $(libpq)
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ testprep_targets += pg_regress_ecpg
|
||||
|
||||
# create .c files and executables from .pgc files
|
||||
ecpg_test_exec_kw = {
|
||||
'c_args': cflags_no_missing_var_decls,
|
||||
'dependencies': [frontend_code, libpq],
|
||||
'include_directories': [ecpg_inc],
|
||||
'link_with': [ecpglib_so, ecpg_compat_so, ecpg_pgtypes_so],
|
||||
|
||||
Reference in New Issue
Block a user