]> granicus.if.org Git - postgresql/commitdiff
Silence compiler warnings about possibly unset variables.
authorAndrew Dunstan <andrew@dunslane.net>
Wed, 29 Jan 2014 23:54:14 +0000 (18:54 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Wed, 29 Jan 2014 23:54:14 +0000 (18:54 -0500)
They are in fact set in every case where they are needed, but the
compiler doesn't know that.

Per gripe from Tom Lane.

src/backend/utils/adt/jsonfuncs.c

index 16d584f19006554ba192227c6e01bb6143d838e8..a19b2222a2dd78aea7596537ce42a1cd58f289a1 100644 (file)
@@ -1283,8 +1283,8 @@ populate_record_worker(PG_FUNCTION_ARGS, bool have_record_arg)
        bool            use_json_as_text;
        HTAB       *json_hash;
        HeapTupleHeader rec = NULL;
-       Oid                     tupType;
-       int32           tupTypmod;
+       Oid                     tupType = InvalidOid;
+       int32           tupTypmod = -1;
        TupleDesc       tupdesc;
        HeapTupleData tuple;
        HeapTuple       rettuple;