Commit 4556a50c authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

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)) {
parent 14ad4352
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment