Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFvgZ-00042w-9c for pgsql-hackers@arkaria.postgresql.org; Wed, 31 May 2017 04:56:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dFvgY-0004lx-Sm for pgsql-hackers@arkaria.postgresql.org; Wed, 31 May 2017 04:56:42 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFvgX-0004li-PV for pgsql-hackers@postgresql.org; Wed, 31 May 2017 04:56:42 +0000 Received: from bay.acenet.us ([173.230.252.50]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFvgV-0000pe-9y for pgsql-hackers@postgresql.org; Wed, 31 May 2017 04:56:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Type:MIME-Version:Date:Message-ID: Subject:From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BIlAPFzFZFztK08fHAE+9mG3BzOMBdNZGECzX/pZfoA=; b=faxBtV0JxGtTZw1gtfcpbNcba/ n2aKz4+/yynawInL+A5yEUUjXppTMbyToiZ+BcUQKq2wDm+/CPH60iiNRk6lfqfNFh5PkzhHie2Ro D2u0aDcas1bl7Gn4+3+hlgPnoNvhQaf+i1IqSi4Mp9uc/xgPcvUx2gI9ls9WK3T8gkzm2aVytT8co a01VxAD7pbfdOAV4sze3G0mCuL3dc/0o0zlJvFUriN6cCQe4iqVIK2i8UhAAu0e2j3kC2zySOgjF/ 7lqoyt3b/XQ3oc63+QZ04CdbGrjY90HGyE75QDnmGAZc1EV+HT873r9D27xH2yh49QI0axBc/AvsX ts+ODtlw==; Received: from [50.102.16.86] (port=48865) by bay.acenet.us with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1dFvgS-003Wnu-UV for pgsql-hackers@postgresql.org; Wed, 31 May 2017 00:56:37 -0400 To: PostgreSQL Hackers From: Chapman Flack Subject: [PATCH] quiet conversion warning in DatumGetFloat4 X-Enigmail-Draft-Status: N1110 Message-ID: <592E4D04.1070609@anastigmatix.net> Date: Wed, 31 May 2017 00:56:36 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040107020401070809020709" X-OutGoing-Spam-Status: No, score=-100.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap+anastigmatix.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org This is a multi-part message in MIME format. --------------040107020401070809020709 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 --------------040107020401070809020709 Content-Type: text/x-patch; name="quiet-conversion-warning-getfloat4.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="quiet-conversion-warning-getfloat4.patch" --- 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 --------------040107020401070809020709 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers --------------040107020401070809020709--