When compiled with Assert() macro disabled, GCC 15 produces warnings
about possibly uninitialized variables in
src/backend/utils/adt/jsonb_util.c module. This problem was discussed in
detail in this thread, in April 2025:
https://www.postgresql.org/message-id/[email protected]
.
Recently introduced pg_assume() macro let fix such problems easily. The
attached patch fixes them in jsonb_util.c module. I verified that
PostgreSQL compiles clearly with this patch and GCC 15.1.1 on an x86
64-bit machine (with and without --enable-cassert), and with GCC 14.2.1
on a 64-bit ARM machine. `make check` also passes.
I'm attaching the patch.
Regards,
Dmitry