Re: Improve readability by using designated initializers when possible

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, jian he <jian(dot)universality(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Improve readability by using designated initializers when possible
Date: 2024-03-05 17:53:16
Message-ID: CAGECzQQjQSJ3-bahHv8p7R3SCxyw=g7M0=+CJN5FmktC7hJZog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 5 Mar 2024 at 15:30, Japin Li <japinli(at)hotmail(dot)com> wrote:
> There is a warning if remove it, so I keep it.
>
> /home/japin/Codes/postgres/build/../src/backend/executor/execExprInterp.c:118:33: warning: label ‘CASE_EEOP_LAST’ defined but not used [-Wunused-label]
> 118 | #define EEO_CASE(name) CASE_##name:
> | ^~~~~
> /home/japin/Codes/postgres/build/../src/backend/executor/execExprInterp.c:1845:17: note: in expansion of macro ‘EEO_CASE’
> 1845 | EEO_CASE(EEOP_LAST)
> | ^~~~~~~~

I think if you remove the EEO_CASE(EEOP_LAST) block the warning should
go away. That block is clearly marked as unreachable, so it doesn't
really serve a purpose.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2024-03-05 18:02:00 Re: pgsql: Fix search_path to a safe value during maintenance operations.
Previous Message Alvaro Herrera 2024-03-05 17:18:45 Re: Dump-restore loosing 'attnotnull' bit for DEFERRABLE PRIMARY KEY column(s).