Re: turn fastgetattr and heap_getattr to inline functions

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: turn fastgetattr and heap_getattr to inline functions
Date: 2022-03-24 16:40:46
Message-ID: ce70075f-a7fa-fadb-141f-4eb7bd229f91@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 24.03.22 13:09, Michael Paquier wrote:
> Hmm. I think that you'd better add a return at the end of each
> function? Some compilers are dumb in detecting that all the code
> paths return (aka recent d0083c1) and could generate warnings, even if
> things are coded to return all the time, like in your patch.

That is a different case. We know that not all compilers understand
when elog/ereport return. But no compiler is stupid enough not to
understand that

foo()
{
if (something)
return this;
else
return that;
}

always reaches a return.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2022-03-24 16:44:38 Re: turn fastgetattr and heap_getattr to inline functions
Previous Message Simon Riggs 2022-03-24 16:37:52 Re: Documenting when to retry on serialization failure