From: Andres Freund Date: Wed, 27 Feb 2019 17:14:34 +0000 (-0800) Subject: Initialize variable to silence compiler warning. X-Git-Tag: REL_12_BETA1~661 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5963b29e03d9b93011acb3954ccc3565d217acc3;p=postgresql Initialize variable to silence compiler warning. 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 --- diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index c5e588e801..7109889694 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -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;