pgsql: Fix compiler warnings around _CRT_glob

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix compiler warnings around _CRT_glob
Date: 2025-10-01 15:19:15
Message-ID: E1v3ybq-000x5F-2O@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix compiler warnings around _CRT_glob

Newer compilers warned about

extern int _CRT_glob = 0;

which is indeed a mysterious C construction, as it combines "extern"
and an initialization. It turns out that according to the C standard,
the "extern" is ignored here, so we can remove it to resolve the
warnings. But then we also need to add a real extern
declaration (without initializer) to satisfy
-Wmissing-variable-declarations.

(Note that this code is only active on MinGW.)

Discussion: https://www.postgresql.org/message-id/1053279b-da01-4eb4-b7a3-da6b5d8f73d1%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e908fb54ff8fa857180bc212ca79c7bd95dcc2c

Modified Files
--------------
src/common/exec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jacob Champion 2025-10-01 16:51:51 pgsql: test_json_parser: Speed up 002_inline.pl
Previous Message David Rowley 2025-10-01 05:50:52 pgsql: Minor fixups of test_bitmapset.c