Re: 2x compile warning

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: 2x compile warning
Дата
Msg-id Pine.BSO.4.63.0604241247400.20001@leary2.csoft.net
обсуждение исходный текст
Ответ на 2x compile warning  (Gevik Babakhani <pgdev@xs4all.nl>)
Ответы Re: 2x compile warning  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: 2x compile warning  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers

On Mon, 24 Apr 2006, Gevik Babakhani wrote:

> I noticed the following compile warnings. Perhaps someone is interested
> to know about them.

Also I was testing a gcc 4.2 snapshot (20060419) and it has a whole lot of 
warnings stemming from heap_getattr's isnull check:

aclchk.c:791: warning: the address of 'isNull', will always evaluate as 
'true'

aclDatum = heap_getattr(tuple, Anum_pg_database_datacl, 
RelationGetDescr(relation), &isNull);


#define heap_getattr(tup, attnum, tupleDesc, isnull) \
( \    AssertMacro((tup) != NULL), \    ( \        ((attnum) > 0) ? \        ( \            ((attnum) > (int)
(tup)->t_data->t_natts)? \            ( \                ((isnull) ? (*(isnull) = true) : (dummyret)NULL), \
   (Datum)NULL \            ) \            : \                fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \
  ) \        : \            heap_getsysattr((tup), (attnum), (tupleDesc), (isnull)) \    ) \
 
)

Removing the check for (isnull) before (*(isnull) = true) as in the 
attached patch passes make check, but I have not looked at every 
heap_getattr call site to ensure it's passing a valid isnull pointer.

Kris Jurka

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: bug# 2073 - Clarification
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Regression error on float8