From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Suppress "unused variable" warnings with older versions of flex.
Date: Sun, 19 Feb 2017 18:04:36 +0000
Message-ID: <E1cfVqe-0004US-BS@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Suppress "unused variable" warnings with older versions of flex.
Versions of flex before 2.5.36 might generate code that results in an
"unused variable" warning, when using %option reentrant. Historically
we've worked around that by specifying -Wno-error, but that's an
unsatisfying solution. The official "fix" for this was just to insert a
dummy reference to the variable, so write a small perl script that edits
the generated C code similarly.
The MSVC side of this is untested, but the buildfarm should soon reveal
if I broke that.
Discussion: https://postgr.es/m/25456.1487437842@sss.pgh.pa.us
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/65d508fd4decee4d5a54c1e7b93acd25d5e80556
Modified Files
--------------
src/Makefile.global.in | 1 +
src/backend/parser/Makefile | 7 +----
src/bin/psql/Makefile | 6 +---
src/fe_utils/Makefile | 6 +---
src/tools/fix-flex-warning.pl | 65 +++++++++++++++++++++++++++++++++++++++++++
src/tools/msvc/pgflex.pl | 20 ++++++++-----
6 files changed, 82 insertions(+), 23 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Suppress "unused variable" warnings with older versions of flex.
In-Reply-To: <E1cfVqe-0004US-BS@gemulon.postgresql.org>
References: <E1cfVqe-0004US-BS@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox