Unused variable in hashpage.c

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Unused variable in hashpage.c
Дата
Msg-id 551DD4C4.70107@2ndquadrant.com
обсуждение исходный текст
Ответы Re: Unused variable in hashpage.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

my compiler complains about unused variable nblkno in _hash_splitbucket
in no-assert build. It looks like relic of commit ed9cc2b5d which
removed the only use of that variable besides the Assert.

Looking at the code:
    nblkno = start_nblkno;
    Assert(nblkno == BufferGetBlockNumber(nbuf));

I was originally thinking of simply changing the Assert to use
start_nblkno but then I noticed that the start_nblkno is actually not
used anywhere in the function either (it's one of input parameters). And
given that the only caller of that function is getting the variable it
sends as nbuf to that function via start_nblkno, I think the Assert is
somewhat pointless there anyway.

So best way to solve this seems to be removing the start_nblkno from the
_hash_splitbucket altogether. Attached patch does just that.

--
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Re: Abbreviated keys for Datum tuplesort
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Table-level log_autovacuum_min_duration