From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | Gevik Babakhani <pgdev(at)xs4all(dot)nl> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: 2x compile warning |
Date: | 2006-04-24 18:16:04 |
Message-ID: | Pine.BSO.4.63.0604241247400.20001@leary2.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
Attachment | Content-Type | Size |
---|---|---|
heapam-no-isnull-check.patch | text/plain | 1.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-04-24 18:23:17 | Re: Regression error on float8 |
Previous Message | Jim C. Nasby | 2006-04-24 16:51:12 | Re: Google SoC--Idea Request |