mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
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)) {
This commit is contained in:
parent
14ad435294
commit
4556a50cf8
@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.3 1996/11/08 05:59:41 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.4 1996/12/14 07:56:05 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -54,7 +54,7 @@ datumGetSize(Datum value, Oid type, bool byVal, Size len)
|
||||
Size size = 0;
|
||||
|
||||
if (byVal) {
|
||||
if (len >= 0 && len <= sizeof(Datum)) {
|
||||
if (len <= sizeof(Datum)) {
|
||||
size = len;
|
||||
} else {
|
||||
elog(WARN,
|
||||
|
Loading…
x
Reference in New Issue
Block a user