Re: [PATCH] quiet conversion warning in DatumGetFloat4
Chapman Flack <chap@anastigmatix.net>
From: Chapman Flack <chap@anastigmatix.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-05-31T05:55:11Z
Lists: pgsql-hackers
Attachments
- quiet-conversion-warning-getfloat4-v2.patch (text/x-patch) patch v2
On 05/31/17 01:26, Tom Lane wrote:
> Hm. I think it would be better to use DatumGetInt32 here. Arguably,
> direct use of GET_4_BYTES and its siblings should only appear in
> DatumGetFoo macros.
Like so? These are the 4 sites where {GET,SET}_n_BYTES got introduced
in 14cca1b (for consistency, though only the GET_4 case produces warnings).
-Chap
Commits
-
Avoid -Wconversion warnings from direct use of GET_n_BYTES macros.
- b5b322914100 10.0 landed