Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1srQN6-001O78-67 for pgsql-committers@arkaria.postgresql.org; Thu, 19 Sep 2024 23:15:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1srQN4-009uG3-30 for pgsql-committers@arkaria.postgresql.org; Thu, 19 Sep 2024 23:15:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1srQN3-009uFu-Rk for pgsql-committers@lists.postgresql.org; Thu, 19 Sep 2024 23:15:35 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1srQN0-0005Yx-JN for pgsql-committers@lists.postgresql.org; Thu, 19 Sep 2024 23:15:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 48JNFSCX2078839; Thu, 19 Sep 2024 19:15:28 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Convert some extern variables to static In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Tue, 02 Jul 2024 05:26:50 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2078837.1726787728.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 19 Sep 2024 19:15:28 -0400 Message-ID: <2078838.1726787728@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut 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] =3D { ^~~~~~~~~~~ In file included from /tmp/headerscheck.40tbNq/test.c:2: ./contrib/isn/ISBN.h:983:20: warning: 'ISBN_range_new' defined but not use= d [-Wunused-variable] static const char *ISBN_range_new[][2] =3D { ^~~~~~~~~~~~~~ ./contrib/isn/ISBN.h:50:20: warning: 'ISBN_range' defined but not used [-W= unused-variable] static const char *ISBN_range[][2] =3D { ^~~~~~~~~~ In file included from /tmp/headerscheck.40tbNq/test.c:2: ./contrib/isn/ISMN.h:45:20: warning: 'ISMN_range' defined but not used [-W= unused-variable] static const char *ISMN_range[][2] =3D { ^~~~~~~~~~ In file included from /tmp/headerscheck.40tbNq/test.c:2: ./contrib/isn/ISSN.h:46:20: warning: 'ISSN_range' defined but not used [-W= unused-variable] static const char *ISSN_range[][2] =3D { ^~~~~~~~~~ In file included from /tmp/headerscheck.40tbNq/test.c:2: ./contrib/isn/UPC.h:26:20: warning: 'UPC_range' defined but not used [-Wun= used-variable] static const char *UPC_range[][2] =3D { ^~~~~~~~~ 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