]> granicus.if.org Git - postgresql/commitdiff
Initialize variable to silence compiler warning.
authorAndres Freund <andres@anarazel.de>
Wed, 27 Feb 2019 17:14:34 +0000 (09:14 -0800)
committerAndres Freund <andres@anarazel.de>
Wed, 27 Feb 2019 17:14:34 +0000 (09:14 -0800)
After ff11e7f4b9ae Tom's compiler warns about accessing a potentially
uninitialized rInfo. That's not actually possible, but it's
understandable the compiler would get this wrong. NULL initialize too.

Reported-By: Tom Lane
Discussion: https://postgr.es/m/11199.1551285318@sss.pgh.pa.us

src/backend/commands/trigger.c

index c5e588e80118228b4fbdb327fe28eec65bb73f46..710988969478741a9e928b0105b6a1bb58e1ccce 100644 (file)
@@ -4490,7 +4490,7 @@ afterTriggerInvokeEvents(AfterTriggerEventList *events,
        AfterTriggerEventChunk *chunk;
        MemoryContext per_tuple_context;
        bool            local_estate = false;
-       ResultRelInfo *rInfo;
+       ResultRelInfo *rInfo = NULL;
        Relation        rel = NULL;
        TriggerDesc *trigdesc = NULL;
        FmgrInfo   *finfo = NULL;