Re: [PATCH] quiet conversion warning in DatumGetFloat4

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chapman Flack <chap@anastigmatix.net>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-05-31T05:57:09Z
Lists: pgsql-hackers
Chapman Flack <chap@anastigmatix.net> writes:
> 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?

Looks promising offhand, but I'm too tired to check in detail right now.

			regards, tom lane


Commits

  1. Avoid -Wconversion warnings from direct use of GET_n_BYTES macros.