gcc 15.1 warnings - jsonb_util.c
Erik Rijkers <er@xs4all.nl>
From: Erik Rijkers <er@xs4all.nl>
To: pgsql-hackers@postgresql.org
Date: 2025-04-25T15:05:15Z
Lists: pgsql-hackers
Hi,
Compiling gcc 15.1 utters these protests (at least, with
--enable-cassert) that I don't think I saw with gcc 14:
jsonb_util.c: In function ‘compareJsonbContainers’:
jsonb_util.c:301:34: warning: ‘va.type’ may be used uninitialized
[-Wmaybe-uninitialized]
301 | res = (va.type > vb.type) ? 1 : -1;
| ~~^~~~~
jsonb_util.c:202:33: note: ‘va’ declared here
202 | JsonbValue va,
| ^~
jsonb_util.c:301:44: warning: ‘vb.type’ may be used uninitialized
[-Wmaybe-uninitialized]
301 | res = (va.type > vb.type) ? 1 : -1;
| ~~^~~~~
jsonb_util.c:203:41: note: ‘vb’ declared here
203 | vb;
| ^~
Thanks,
Erik
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Silence uninitialized-value warnings in compareJsonbContainers().
- f32e45641460 15.14 landed
- aad1617b76ae 19 (unreleased) landed
- 8254b7e33be9 14.19 landed
- 6c93bf735ce1 13.22 landed
- 5db55e13f210 16.10 landed
- 5a2139a90690 17.6 landed
- 0b6dfce0ce4d 18.0 landed