Re: fixing more format truncation issues - Mailing list pgsql-hackers

From Tom Lane
Subject Re: fixing more format truncation issues
Date
Msg-id 18019.1521130338@sss.pgh.pa.us
Whole thread Raw
In response to Re: fixing more format truncation issues  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: fixing more format truncation issues  (Michael Paquier <michael@paquier.xyz>)
Re: fixing more format truncation issues  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 3/14/18 02:52, Michael Paquier wrote:
>> Enabling them by default would generate some useless noise if the patch
>> is let as-is as a couple of them are not addressed.  Please see the full
>> report attached.  Is that intentional?  I am using GCC 7.3 here.

> Well that's weird.  Apparently, the warnings depend on a bit on build
> options and other platform circumstances.  That seems a bit cumbersome.
> So I just committed the code changes but didn't actually add the
> compiler options to configure.in.  I'll close this patch now; it's not
> worth going further right now.

FWIW, I noticed while fooling with pre-release Fedora 28 that gcc 8.0.1
emits a whole boatload of these warnings by default.  This patch doesn't
seem to have moved the needle very much, either.  In a quick look, it
seemed like a lot of them were things we simply wouldn't be interested
in fixing ("yeah, the path length limit is MAXPGPATH, tough").  So
I'm thinking we're going to be needing -Wno-format-truncation soon.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: WaitLatchOrSocket optimization
Next
From: Daniel Gustafsson
Date:
Subject: Re: SSL passphrase prompt external command