]> granicus.if.org Git - postgresql/commit
Avoiding:
authorVadim B. Mikheev <vadim4o@yahoo.com>
Sat, 14 Dec 1996 07:54:22 +0000 (07:54 +0000)
committerVadim B. Mikheev <vadim4o@yahoo.com>
Sat, 14 Dec 1996 07:54:22 +0000 (07:54 +0000)
commit8c68e07561a3ac546637a5eecffdd9c9bbbb35d7
treea45223ddbff1247fdb545c5bd3a1224f9f536eea
parent9ec39eb6e38ba7c870c61aacd60c6efcaf4c4abe
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 */
src/backend/utils/adt/datum.c