Dubious coding in nbtinsert.c

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Dubious coding in nbtinsert.c
Дата
Msg-id 1922884.1617909599@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Dubious coding in nbtinsert.c
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: multi-install PostgresNode fails with older postgres versions
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Dubious coding in nbtinsert.c