pgsql: psql: Fix some strange code in SQL help creation

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: psql: Fix some strange code in SQL help creation
Date: 2016-03-09 00:42:12
Message-ID: E1adSCa-00017a-LC@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

psql: Fix some strange code in SQL help creation

Struct QL_HELP used to be defined as static in the sql_help.h header
file, which is included in sql_help.c and help.c, thus creating two
separate instances of the struct. This causes a warning from GCC 6,
because the struct is not used in sql_help.c.

Instead, declare the struct as extern in the header file and define it
in sql_help.c. This also allows making a bunch of functions static
because they are no longer needed outside of sql_help.c.

Reviewed-by: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/92d4294d4bbddf94cec0dce729ade7bb2aada1b7

Modified Files
--------------
src/bin/psql/create_help.pl | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2016-03-09 02:20:58 pgsql: Handle invalid libpq sockets in more places
Previous Message Tom Lane 2016-03-09 00:00:09 Re: pgsql: ltree: Zero padding bytes when allocating memory for externally