Re: turn fastgetattr and heap_getattr to inline functions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: 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 12:09:26
Message-ID: YjxfdpEcOBfIgmuH@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-03-24 12:10:29 Re: Estimating HugePages Requirements?
Previous Message Thomas Munro 2022-03-24 11:42:50 Re: [PATCH] add relation and block-level filtering to pg_waldump