Dubious coding in nbtinsert.c

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Dubious coding in nbtinsert.c
Дата
Msg-id
1922884.1617909599@sss.pgh.pa.us
Список
Дерево обсуждения
Dubious coding in nbtinsert.c Tom Lane <tgl@sss.pgh.pa.us>
Re: Dubious coding in nbtinsert.c Peter Geoghegan <pg@bowt.ie>
Re: Dubious coding in nbtinsert.c Tom Lane <tgl@sss.pgh.pa.us>
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


В списке pgsql-hackers по дате отправления
От: Mark Dilger
Дата:
От: Peter Geoghegan
Дата:
FAQ