[PATCH] quiet conversion warning in DatumGetFloat4

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] quiet conversion warning in DatumGetFloat4
Date: 2017-05-31 04:56:36
Message-ID: 592E4D04.1070609@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

It seems that 14cca1b (use static inline functions for float <-> Datum
conversions) has an implicit narrowing conversion in one of those
functions.

If building an extension with gcc's -Wconversion warning enabled
(*cough* pljava *cough* ... the Maven plugin that runs the compiler
enables the warning by default), this makes for a noisy build.
The warning is harmless, but repeated everywhere postgres.h is
included. An explicit cast is enough to suppress it.

-Chap

Attachment Content-Type Size
quiet-conversion-warning-getfloat4.patch text/x-patch 292 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2017-05-31 05:10:06 Re: ECPG: pg_type.h file is not synced
Previous Message Stephen Frost 2017-05-31 04:52:30 Re: TAP backpatching policy