Re: fixing more format truncation issues

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fixing more format truncation issues
Date: 2018-03-15 16:12:18
Message-ID: 18019.1521130338@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2018-03-15 16:13:39 Re: SSL passphrase prompt external command
Previous Message Konstantin Knizhnik 2018-03-15 16:01:40 WaitLatchOrSocket optimization