summaryrefslogtreecommitdiff
path: root/src/makefiles
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-08-03 11:42:37 +0200
committerPeter Eisentraut <peter@eisentraut.org>2024-08-03 11:51:02 +0200
commit66188912566b5614dff095ae86f4b1e06d58e875 (patch)
tree3c86ba7c2b967437b29f83eb49231f43577ac023 /src/makefiles
parent7926a9a80f6daf0fcc1feb1bee5c51fd001bc173 (diff)
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
Diffstat (limited to 'src/makefiles')
-rw-r--r--src/makefiles/meson.build2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/makefiles/meson.build b/src/makefiles/meson.build
index 5618050b306..850e9275845 100644
--- a/src/makefiles/meson.build
+++ b/src/makefiles/meson.build
@@ -98,6 +98,8 @@ pgxs_kv = {
'CXXFLAGS_SL_MODULE': ' '.join(cxxflags_mod),
'PERMIT_DECLARATION_AFTER_STATEMENT':
' '.join(cflags_no_decl_after_statement),
+ 'PERMIT_MISSING_VARIABLE_DECLARATIONS':
+ ' '.join(cflags_no_missing_var_decls),
'CFLAGS_CRC': ' '.join(cflags_crc),
'CFLAGS_POPCNT': ' '.join(cflags_popcnt),