diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-10-18 17:39:14 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-10-18 17:39:14 -0400 |
commit | 7c19e0446c049dd41aed62fa398cd809017adf5e (patch) | |
tree | 0415de0ff792db6011ab73d27dcf373e3c62538f /src | |
parent | b246207bd7b553317fd90d7aefd9520eed27609a (diff) | |
download | postgresql-7c19e0446c049dd41aed62fa398cd809017adf5e.tar.gz postgresql-7c19e0446c049dd41aed62fa398cd809017adf5e.zip |
Remove unnecessary AssertMacro() to suppress gcc 4.6 compiler warning.
There's no particular value in doing AssertMacro((tup) != NULL) in front
of code that's certain to crash anyway if tup is NULL. And if "tup" is
actually the address of a local variable, gcc 4.6 whinges about it. That's
arguably pretty broken on gcc's part, but we might as well remove the
useless test to silence the warnings. This gets rid of all the -Waddress
warnings in the backend; there are some in libpq and psql that are a bit
harder to avoid.
Diffstat (limited to 'src')
-rw-r--r-- | src/include/access/htup.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/include/access/htup.h b/src/include/access/htup.h index c0258354e6f..966e2d0299e 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -839,8 +839,6 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, * ---------------- */ #define heap_getattr(tup, attnum, tupleDesc, isnull) \ -( \ - AssertMacro((tup) != NULL), \ ( \ ((attnum) > 0) ? \ ( \ @@ -854,8 +852,7 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, ) \ : \ heap_getsysattr((tup), (attnum), (tupleDesc), (isnull)) \ - ) \ -) + ) /* prototypes for functions in common/heaptuple.c */ extern Size heap_compute_data_size(TupleDesc tupleDesc, |