agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Add pg_nodiscard decorations to some functions
2+ messages / 2 participants
[nested] [flat]

* pgsql: Add pg_nodiscard decorations to some functions
@ 2020-11-11 10:07 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2020-11-11 10:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add pg_nodiscard decorations to some functions

Especially for the list API such as lappend() forgetting to assign the
return value is a common problem.

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/a378ba49a5cfec073d885f4943e1c7e4b83abd3b

Modified Files
--------------
src/include/nodes/pg_list.h | 62 ++++++++++++++++++++++-----------------------
src/include/utils/palloc.h  |  4 +--
2 files changed, 33 insertions(+), 33 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Add pg_nodiscard decorations to some Bitmapset functions.
@ 2026-09-09 21:30 Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Nathan Bossart @ 2026-09-09 21:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add pg_nodiscard decorations to some Bitmapset functions.

There's no conceivable use-case for ignoring the result of the
functions that return a pointer to a Bitmapset.  Add pg_nodiscard
decorations to those like commit a378ba49a5 did for some functions
in pg_list.h.

Author: Jan Nidzwetzki <jan@planetscale.com>
Discussion: https://postgr.es/m/2020a70e-76f3-4661-afa6-82c2639251c2%40planetscale.com

Branch
------
master

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

Modified Files
--------------
src/include/nodes/bitmapset.h | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-09-09 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 10:07 pgsql: Add pg_nodiscard decorations to some functions Peter Eisentraut <peter@eisentraut.org>
2026-09-09 21:30 pgsql: Add pg_nodiscard decorations to some Bitmapset functions. Nathan Bossart <nathan@postgresql.org>

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