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

From Michael Paquier
Subject Re: turn fastgetattr and heap_getattr to inline functions
Date
Msg-id YjxfdpEcOBfIgmuH@paquier.xyz
Whole thread Raw
In response to turn fastgetattr and heap_getattr to inline functions  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: turn fastgetattr and heap_getattr to inline functions  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: turn fastgetattr and heap_getattr to inline functions  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-hackers
On Thu, Mar 24, 2022 at 11:21:07AM +0100, Alvaro Herrera wrote:
> This patch should silence some recent Coverity (false positive)
> complaints about assertions contained in these macros.

The logic looks fine.  Good idea to get rid of DISABLE_COMPLEX_MACRO.

> Portability testing at:
> https://cirrus-ci.com/github/alvherre/postgres/macros-to-inlinefuncs
>
> Intend to push later today, unless something ugly happens.

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.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [PATCH] add relation and block-level filtering to pg_waldump
Next
From: Michael Paquier
Date:
Subject: Re: Estimating HugePages Requirements?