From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Suppress -Wformat-overflow warnings in 9.2's xml.c.
Date: Mon, 13 Dec 2021 16:22:13 +0000
Message-ID: <E1mwo5d-0004fQ-Pf@gemulon.postgresql.org> (raw)
Suppress -Wformat-overflow warnings in 9.2's xml.c.
If not using --with-libxml, late-model gcc complains about "'%s'
directive argument is null" in places where xml.c passes the result
of map_sql_identifier_to_xml_name() to %s. That's not so surprising,
because without USE_LIBXML the body of that function is
NO_XML_SUPPORT();
return NULL;
and before 9.3 the compiler won't understand that NO_XML_SUPPORT()
doesn't return. Silence the warnings by returning "" instead.
We don't need this hack in later branches, AFAICT.
Discussion: https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com
Branch
------
REL9_2_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/3f9700acb238fced605ff3ef155e179290fd4f02
Modified Files
--------------
src/backend/utils/adt/xml.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 -Wformat-overflow warnings in 9.2's xml.c.
In-Reply-To: <E1mwo5d-0004fQ-Pf@gemulon.postgresql.org>
References: <E1mwo5d-0004fQ-Pf@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