Re: pgsql: Use new overflow aware integer operations.

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Use new overflow aware integer operations.
Date: 2017-12-16 11:57:59
Message-ID: CAKJS1f__gtRPYioPNEyQRCxwPM3EPS-++HMNEGR434JvRqCj1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 13 December 2017 at 14:01, Andres Freund <andres(at)anarazel(dot)de> wrote:
> Use new overflow aware integer operations.

Thanks for making this happen.

I notice it's caused a small warning in compilers that don't
understand about elog(ERROR) and ereport(ERROR) not returning.

This can be seen on bowerbird's compile log [1]:

c:\prog\bf\root\head\pgsql.build\src\backend\utils\adt\int8.c(131):
warning C4715: 'scanint8' : not all control paths return a value
[c:\prog\bf\root\HEAD\pgsql.build\postgres.vcxproj]

The attached just shuffles things around to get rid of the warning.
This way seems better than to add another "return false" at the end as
this way saves a couple of lines of code rather than adding one.

[1] https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=bowerbird&dt=2017-12-15%2018%3A21%3A51&stg=make

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
scanint8_warning_fix.patch application/octet-stream 752 bytes

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-12-16 16:32:55 pgsql: Fix oversights in new plpgsql test suite infrastructure.
Previous Message Andres Freund 2017-12-15 19:19:30 Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple