From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, pgsql-committers <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Add infrastructure to save and restore GUC values. |
Date: | 2014-11-26 01:07:59 |
Message-ID: | CA+Tgmob7wKWi0ynwiNrmwf0J-oUU1a6+SJ=7+iuy+ekBU12zCw@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Tue, Nov 25, 2014 at 3:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.
Done.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2014-11-26 03:21:52 | pgsql: doc: Fix markup |
Previous Message | Robert Haas | 2014-11-26 01:07:42 | pgsql: Attempt to suppress uninitialized variable warning. |