Skip to content

Commit 8c68e07

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)) { size = len; } else { elog(WARN, "datumGetSize: Error: type=%ld, byVaL with len=%d", (long) type, len); } } else { /* not byValue */
1 parent 9ec39eb commit 8c68e07

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.3.2.1 1996/12/14 07:54:22 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy