From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Add infrastructure to save and restore GUC values. |
Date: | 2014-11-25 20:20:43 |
Message-ID: | 12877.1416946843@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
> On 11/25/2014 12:17 AM, Robert Haas wrote:
>> Add infrastructure to save and restore GUC values.
> guc.c: In function EstimateGUCStateSpace:
> guc.c:8506:7: warning: valsize may be used uninitialized in this
> function [-Wmaybe-uninitialized]
> Size valsize;
> ^
> guc.c: In function SerializeGUCState:
> guc.c:8762:56: warning: i_role may be used uninitialized in this
> function [-Wmaybe-uninitialized]
> serialize_variable(&curptr, &bytes_left, guc_variables[i_role]);
> ^
I fixed the latter (my compiler was unhappy about it though not about
the former). I'm not sure whether Robert would prefer to fix
the former by adding a useless initialization or by adding a default:
to the switch. Personally I'd lean towards the initialization, though,
as a default: would suppress warnings about errors-of-omission if we
ever add more switch cases.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2014-11-25 20:51:27 | pgsql: Remove extraneous SGML tag |
Previous Message | Tom Lane | 2014-11-25 20:17:33 | pgsql: Fix uninitialized-variable warning. |