Re: Pointer subtraction with a null pointer

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, Thomas Munro <thomas.munro@gmail.com>
Date: 2022-03-26T16:13:12Z
Lists: pgsql-hackers
I wrote:
> Several of Andres' buildfarm animals have recently started to whine
> that "performing pointer subtraction with a null pointer has undefined
> behavior" for assorted places in freepage.c.

Ah, sorry, I meant to include a link:

https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=mylodon&dt=2022-03-26%2000%3A02%3A10&stg=make

This code is old, but mylodon wasn't doing that a week ago, so
Andres must've updated the compiler and/or changed its options.
kestrel and olingo are reporting it too, but they're new.

			regards, tom lane



Commits

  1. Suppress compiler warning in relptr_store().