From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Tristan Partin <tristan(at)neon(dot)tech> |
Cc: | John Naylor <johncnaylorls(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add support for __attribute__((returns_nonnull)) |
Date: | 2024-01-09 00:14:42 |
Message-ID: | ZZyP8rJOzcn0C-LY@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 08, 2024 at 05:04:58PM -0600, Tristan Partin wrote:
> The idea I had in mind initially was PGLC_localeconv(), but I couldn't
> prove that anything changed with the annotation added. The second patch
> in my previous email was attempt at deriving real-world benefit, but
> nothing I did seemed to change anything. Perhaps you can test it and see
> if anything changes for you.
There are a bunch of places in the tree where we return NULL just to
keep the compiler quiet, and where we should never return NULL, as in:
return NULL; /* keep compiler quiet */
See bbstreamer_gzip.c as one example for non-gzip builds. Perhaps you
could look at one of these places and see if the marker shows
benefits?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-01-09 00:40:23 | Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows |
Previous Message | Tom Lane | 2024-01-09 00:08:25 | Re: Make psql ignore trailing semicolons in \sf, \ef, etc |