Re: A compiling warning in jsonb_populate_record_valid

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Richard Guo <guofenglinux(at)gmail(dot)com>
Subject: Re: A compiling warning in jsonb_populate_record_valid
Date: 2024-01-25 15:12:58
Message-ID: CA+HiwqEW6g8VozHSuHWz5TPh2=coSUYTrFS5fnHL+2_xqn=1rQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 25, 2024 at 23:57 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Amit Langote <amitlangote09(at)gmail(dot)com> writes:
> > On Thu, Jan 25, 2024 at 2:59 PM Richard Guo <guofenglinux(at)gmail(dot)com>
> wrote:
> >> I came across a warning when building master (a044e61f1b) on old GCC
> >> (4.8.5).
>
> > Will apply the attached, which does this:
>
> > - return BoolGetDatum(!SOFT_ERROR_OCCURRED(&escontext));
> > + return BoolGetDatum(!escontext.error_occurred);
>
> -1 please. We should not break that abstraction for the sake
> of ignorable warnings on ancient compilers.

Ignoring the warning was my 1st thought too, because an old discussion I
found about the warning was too old (2011). The style I adopted in my
“fix” is used in a few other places too, so I thought I might as well
go for it.

Anyway, I’m fine with reverting.

>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-25 15:15:34 Re: A compiling warning in jsonb_populate_record_valid
Previous Message Robert Haas 2024-01-25 15:06:41 Re: cleanup patches for incremental backup