Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7c19e04

Browse files
committed
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.
1 parent b246207 commit 7c19e04

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/include/access/htup.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,6 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
839839
* ----------------
840840
*/
841841
#define heap_getattr(tup, attnum, tupleDesc, isnull) \
842-
( \
843-
AssertMacro((tup) != NULL), \
844842
( \
845843
((attnum) > 0) ? \
846844
( \
@@ -854,8 +852,7 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
854852
) \
855853
: \
856854
heap_getsysattr((tup), (attnum), (tupleDesc), (isnull)) \
857-
) \
858-
)
855+
)
859856

860857
/* prototypes for functions in common/heaptuple.c */
861858
extern Size heap_compute_data_size(TupleDesc tupleDesc,

0 commit comments

Comments
 (0)