Re: turn fastgetattr and heap_getattr to inline functions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: turn fastgetattr and heap_getattr to inline functions
Date
Msg-id ce70075f-a7fa-fadb-141f-4eb7bd229f91@enterprisedb.com
Whole thread Raw
In response to Re: turn fastgetattr and heap_getattr to inline functions  (Michael Paquier <michael@paquier.xyz>)
Responses Re: turn fastgetattr and heap_getattr to inline functions
List 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.



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Documenting when to retry on serialization failure
Next
From: Peter Eisentraut
Date:
Subject: Re: turn fastgetattr and heap_getattr to inline functions