| Lists: | pgsql-hackers |
|---|
| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | GCC 6 warning fixes |
| Date: | 2016-02-20 04:14:56 |
| Message-ID: | 56C7E840.7050806@gmx.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Here are three patches to fix new warnings in GCC 6.
0001 is apparently a typo.
0002 was just (my?) stupid code to begin with.
0003 is more of a workaround. There could be other ways address this, too.
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-ecpg-Fix-typo.patch | application/x-patch | 2.7 KB |
| 0002-psql-Fix-some-strange-code-in-SQL-help-creation.patch | application/x-patch | 2.3 KB |
| 0003-Suppress-GCC-6-warning-about-self-comparison.patch | application/x-patch | 595 bytes |
| From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
|---|---|
| To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: GCC 6 warning fixes |
| Date: | 2016-02-29 21:50:03 |
| Message-ID: | CAEepm=0nnp5z7Tz6jXfJtoZUUA5i62_8t9vKzs6WzUAb_ZrPiQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On Sat, Feb 20, 2016 at 5:14 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> Here are three patches to fix new warnings in GCC 6.
>
> 0001 is apparently a typo.
Right, looks like it. Builds and tests OK with this change (though I
didn't get any warning from GCC6.0.0 -Wall for this one).
> 0002 was just (my?) stupid code to begin with.
Right, it makes sense to define QL_HELP in just one translation unit
with external linkage. Builds and works fine. I got the 'defined but
not used' warning from GCC6 and it went away with this patch.
> 0003 is more of a workaround. There could be other ways address this, too.
This way seems fine to me (you probably want the function to continue
to exist rather than, say, becoming a macro evaluating to false on
non-WIN32, if this gets backpatched). I got this warning from GCC6
and it went away with this patch.
--
Thomas Munro
http://www.enterprisedb.com
| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
| Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: GCC 6 warning fixes |
| Date: | 2016-03-08 21:44:58 |
| Message-ID: | CA+Tgmobgob2dYAHeYfqb6m2oknjLuMGf4rQY9+skiUmx+QE1QQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On Mon, Feb 29, 2016 at 4:50 PM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Sat, Feb 20, 2016 at 5:14 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>> Here are three patches to fix new warnings in GCC 6.
>>
>> 0001 is apparently a typo.
>
> Right, looks like it. Builds and tests OK with this change (though I
> didn't get any warning from GCC6.0.0 -Wall for this one).
>
>> 0002 was just (my?) stupid code to begin with.
>
> Right, it makes sense to define QL_HELP in just one translation unit
> with external linkage. Builds and works fine. I got the 'defined but
> not used' warning from GCC6 and it went away with this patch.
>
>> 0003 is more of a workaround. There could be other ways address this, too.
>
> This way seems fine to me (you probably want the function to continue
> to exist rather than, say, becoming a macro evaluating to false on
> non-WIN32, if this gets backpatched). I got this warning from GCC6
> and it went away with this patch.
Peter, are you going to commit this?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: GCC 6 warning fixes |
| Date: | 2016-03-09 00:42:31 |
| Message-ID: | 56DF7177.60304@gmx.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On 3/8/16 4:44 PM, Robert Haas wrote:
> On Mon, Feb 29, 2016 at 4:50 PM, Thomas Munro
> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
>> On Sat, Feb 20, 2016 at 5:14 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>>> Here are three patches to fix new warnings in GCC 6.
>>>
>>> 0001 is apparently a typo.
>>
>> Right, looks like it. Builds and tests OK with this change (though I
>> didn't get any warning from GCC6.0.0 -Wall for this one).
>>
>>> 0002 was just (my?) stupid code to begin with.
>>
>> Right, it makes sense to define QL_HELP in just one translation unit
>> with external linkage. Builds and works fine. I got the 'defined but
>> not used' warning from GCC6 and it went away with this patch.
>>
>>> 0003 is more of a workaround. There could be other ways address this, too.
>>
>> This way seems fine to me (you probably want the function to continue
>> to exist rather than, say, becoming a macro evaluating to false on
>> non-WIN32, if this gets backpatched). I got this warning from GCC6
>> and it went away with this patch.
>
> Peter, are you going to commit this?
done