Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e69928

Browse files
author
Thomas G. Lockhart
committed
Coerce type of NULL pointer return to suppress gcc compiler warnings.
1 parent e00f0ea commit 0e69928

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/backend/access/common/heaptuple.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.26 1997/09/18 20:19:36 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.27 1997/09/24 17:44:24 thomas Exp $
1212
*
1313
* NOTES
1414
* The old interface functions have been converted to macros
@@ -424,7 +424,7 @@ heap_getsysattr(HeapTuple tup, Buffer b, int attnum)
424424
default:
425425
elog(WARN, "heap_getsysattr: undefined attnum %d", attnum);
426426
}
427-
return (NULL);
427+
return ((Datum) NULL);
428428
}
429429

430430
/* ----------------
@@ -517,7 +517,7 @@ fastgetattr(HeapTuple tup,
517517
{
518518
if (isnull)
519519
*isnull = true;
520-
return NULL;
520+
return (Datum) NULL;
521521
}
522522

523523
/* ----------------

src/backend/executor/spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool * isnull)
437437
*isnull = true;
438438
SPI_result = 0;
439439
if (tuple->t_natts < fnumber || fnumber <= 0)
440-
return (NULL);
440+
return ((Datum) NULL);
441441

442442
val = heap_getattr(tuple, InvalidBuffer, fnumber, tupdesc, isnull);
443443

0 commit comments

Comments
 (0)