From: Chapman Flack <chap@anastigmatix.net>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: [PATCH] quiet conversion warning in DatumGetFloat4
Date: Wed, 31 May 2017 00:56:36 -0400
Message-ID: <592E4D04.1070609@anastigmatix.net> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackersAttachments:
[text/x-patch] quiet-conversion-warning-getfloat4.patch (291B, ../592E4D04.1070609@anastigmatix.net/2-quiet-conversion-warning-getfloat4.patch)
download | inline diff:--- src/include/postgres.h 2017-05-15 17:20:59.000000000 -0400+++ src/include/postgres.h 2017-05-31 00:21:27.329393499 -0400@@ -679,7 +679,7 @@
float4 retval;
} myunion;
- myunion.value = GET_4_BYTES(X);+ myunion.value = (int32)GET_4_BYTES(X);
return myunion.retval;
}
#else
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: chap@anastigmatix.net
Subject: Re: [PATCH] quiet conversion warning in DatumGetFloat4
In-Reply-To: <592E4D04.1070609@anastigmatix.net>
* 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