pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix cases of discarding result from list API functions
Date: Wed, 11 Nov 2020 07:05:37 +0000
Message-ID: <E1kckCH-0000TZ-GU@gemulon.postgresql.org> (raw)

Fix cases of discarding result from list API functions

Two cases violated list APIs by throwing away the return value.  While
the code was technically correct, it relied on internal knowledge of
the list implementation, and the code wasn't really gaining anything
that way.  It is planned to make this a compiler warning in the
future, so just fix these cases by assigning the return value
properly.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/flat/e3753562-99cd-b65f-5aca-687dfd1ec2fc@2ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c77f6f50e4187bed38d1d36ae16b0c248e286d15

Modified Files
--------------
src/backend/commands/lockcmds.c | 2 +-
src/backend/parser/analyze.c    | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)



Message-ID: <E1kckCH-0000TZ-GU@gemulon.postgresql.org>
Permalink:  ../E1kckCH-0000TZ-GU@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kckCH-0000TZ-GU@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Fix cases of discarding result from list API functions
  In-Reply-To: <E1kckCH-0000TZ-GU@gemulon.postgresql.org>
  References: <E1kckCH-0000TZ-GU@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox