pgsql: Add -Wmissing-variable-declarations to the standard compilation

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add -Wmissing-variable-declarations to the standard compilation
Date: 2024-08-03 09:56:49
Message-ID: E1saBVJ-002TkI-8H@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)anarazel(dot)de>
Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce(at)eisentraut(dot)org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/66188912566b5614dff095ae86f4b1e06d58e875

Modified Files
--------------
configure | 49 +++++++++++++++++++++++++++++++
configure.ac | 9 ++++++
meson.build | 10 +++++++
src/Makefile.global.in | 1 +
src/interfaces/ecpg/test/Makefile.regress | 2 +-
src/interfaces/ecpg/test/meson.build | 1 +
src/makefiles/meson.build | 2 ++
src/tools/pg_bsd_indent/Makefile | 2 ++
src/tools/pg_bsd_indent/meson.build | 1 +
9 files changed, 76 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2024-08-03 18:07:50 pgsql: Fix incorrect format placeholders in pgstat.c
Previous Message Tom Lane 2024-08-02 20:24:52 pgsql: First-draft release notes for 16.4.