Add pg_nodiscard decorations to some functions

Peter Eisentraut <peter@eisentraut.org>

Commit: a378ba49a5cfec073d885f4943e1c7e4b83abd3b
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2020-11-11T10:00:27Z
Releases: 14.0
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

Files

PathChange+/−
src/include/nodes/pg_list.h modified +31 −31
src/include/utils/palloc.h modified +2 −2

Discussion