Dubious coding in nbtinsert.c
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-04-08T19:19:59Z
Lists: pgsql-hackers
Buildfarm member curculio, which doesn't usually produce uninitialized-variable warnings, is showing one here: nbtinsert.c: In function '_bt_doinsert': nbtinsert.c:411: warning: 'curitemid' may be used uninitialized in this function nbtinsert.c:411: note: 'curitemid' was declared here I can see its point: curitemid is set only if !inposting. While the first two uses of the value are clearly reached only if !inposting, it's FAR from clear that it's impossible to reach "ItemIdMarkDead(curitemid);" without a valid value. Could you clean that up? regards, tom lane
Commits
-
Silence another _bt_check_unique compiler warning.
- 796092fb84c0 14.0 landed
-
Silence _bt_check_unique compiler warning.
- d64f1cdf2f4b 14.0 cited