Skip to content

Commit 4556a50

Browse files
committed
Avoiding:
cc1: warnings being treated as errors datum.c: In function `DatumGetSize': datum.c:57: warning: unsigned value >= 0 is always 1 gmake[3]: *** [datum.o] Error 1 There was: if (byVal) { if (len >= 0 && len <= sizeof(Datum)) { but len has type Size (unsigned int) and so now there is: if (byVal) { if (len <= sizeof(Datum)) {
1 parent 14ad435 commit 4556a50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/adt/datum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.3 1996/11/08 05:59:41 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.4 1996/12/14 07:56:05 vadim Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -54,7 +54,7 @@ datumGetSize(Datum value, Oid type, bool byVal, Size len)
5454
Size size = 0;
5555

5656
if (byVal) {
57-
if (len >= 0 && len <= sizeof(Datum)) {
57+
if (len <= sizeof(Datum)) {
5858
size = len;
5959
} else {
6060
elog(WARN,

0 commit comments

Comments
 (0)