Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7c19e04

Browse files
committed
Remove unnecessary AssertMacro() to suppress gcc 4.6 compiler warning.
There's no particular value in doing AssertMacro((tup) != NULL) in frontof code that's certain to crash anyway if tup is NULL. And if "tup" isactually the address of a local variable, gcc 4.6 whinges about it. That'sarguably pretty broken on gcc's part, but we might as well remove theuseless test to silence the warnings. This gets rid of all the -Waddresswarnings in the backend; there are some in libpq and psql that are a bitharder to avoid.
1 parentb246207 commit7c19e04

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎src/include/access/htup.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,6 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
839839
* ----------------
840840
*/
841841
#defineheap_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
externSizeheap_compute_data_size(TupleDesctupleDesc,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp