pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Rework error messages around file handling
Date: Wed, 18 Jul 2018 08:53:19 +0900
Message-ID: <20180717235319.GB2998@paquier.xyz> (raw)
In-Reply-To: <20171.1531869784@sss.pgh.pa.us>
References: <E1ffZ2C-0003jE-Ln@gemulon.postgresql.org>
	<20171.1531869784@sss.pgh.pa.us>

On Tue, Jul 17, 2018 at 07:23:04PM -0400, Tom Lane wrote:
> Michael Paquier <michael@paquier.xyz> writes:
> > Rework error messages around file handling
> 
> longfin thinks you missed at least one cast ...

Hm, I checked that.  Just casting to (Size) should do it.  I cannot get
a warning with neither clang nor gcc on Debian SID even with -Wformat,
and no OSX at hand.

So the attached would fix the problem?
--
Michael

Attachments:

printf-zu-osx.patch (text/x-diff, 497B) download diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 0c99b33664..306861bb79 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -1295,7 +1295,7 @@ ReadTwoPhaseFile(TransactionId xid, bool give_warnings) else ereport(WARNING, (errmsg("could not read file \"%s\": read %d of %zu", - path, r, stat.st_size))); + path, r, (Size) stat.st_size))); } pfree(buf); return NULL;
signature.asc (application/pgp-signature, 832B) download

view thread (8+ messages)  latest in thread

Message-ID: <20180717235319.GB2998@paquier.xyz>
Permalink:  ../20180717235319.GB2998@paquier.xyz/
Also on:    postgresql.org/message-id/20180717235319.GB2998@paquier.xyz

 ·  · 

reply

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: michael@paquier.xyz, tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Rework error messages around file handling
  In-Reply-To: <20180717235319.GB2998@paquier.xyz>
  References: <E1ffZ2C-0003jE-Ln@gemulon.postgresql.org> <20171.1531869784@sss.pgh.pa.us> <20180717235319.GB2998@paquier.xyz>

* 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