Re: pgsql: Convert some extern variables to static - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Convert some extern variables to static
Date
Msg-id 2078838.1726787728@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Convert some extern variables to static  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: pgsql: Convert some extern variables to static
List pgsql-committers
Peter Eisentraut <peter@eisentraut.org> writes:
> Convert some extern variables to static

I'm surprised it took me so long to notice, but this commit
makes headerscheck unhappy:

$ src/tools/pginclude/headerscheck
In file included from /tmp/headerscheck.40tbNq/test.c:2:
./contrib/isn/EAN13.h:26:20: warning: 'EAN13_range' defined but not used [-Wunused-variable]
 static const char *EAN13_range[][2] = {
                    ^~~~~~~~~~~
In file included from /tmp/headerscheck.40tbNq/test.c:2:
./contrib/isn/ISBN.h:983:20: warning: 'ISBN_range_new' defined but not used [-Wunused-variable]
 static const char *ISBN_range_new[][2] = {
                    ^~~~~~~~~~~~~~
./contrib/isn/ISBN.h:50:20: warning: 'ISBN_range' defined but not used [-Wunused-variable]
 static const char *ISBN_range[][2] = {
                    ^~~~~~~~~~
In file included from /tmp/headerscheck.40tbNq/test.c:2:
./contrib/isn/ISMN.h:45:20: warning: 'ISMN_range' defined but not used [-Wunused-variable]
 static const char *ISMN_range[][2] = {
                    ^~~~~~~~~~
In file included from /tmp/headerscheck.40tbNq/test.c:2:
./contrib/isn/ISSN.h:46:20: warning: 'ISSN_range' defined but not used [-Wunused-variable]
 static const char *ISSN_range[][2] = {
                    ^~~~~~~~~~
In file included from /tmp/headerscheck.40tbNq/test.c:2:
./contrib/isn/UPC.h:26:20: warning: 'UPC_range' defined but not used [-Wunused-variable]
 static const char *UPC_range[][2] = {
                    ^~~~~~~~~

We could either revert the static-ification of these variables,
or move them into isn.c which seems to be the sole consumer.

            regards, tom lane



pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: doc PG relnotes: remove warning about commit links in PDF build
Next
From: Thomas Munro
Date:
Subject: Re: pgsql: Convert some extern variables to static