Lists: | pgsql-hackers |
---|
From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | hstore compiler warnings |
Date: | 2013-03-21 14:46:38 |
Message-ID: | 1363877198.13805.YahooMailNeo@web162904.mail.bf1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Is anyone looking at these?:
hstore_io.c: In function ‘hstore_to_json_loose’:
hstore_io.c:1312:5: warning: ignoring return value of ‘strtol’, declared with attribute warn_unused_result [-Wunused-result]
hstore_io.c:1324:6: warning: ignoring return value of ‘strtod’, declared with attribute warn_unused_result [-Wunused-result]
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
These warnings seem to have started with:
http://git.postgresql.org/gitweb/?p=postgresql.git;h=38fb4d978c5bfc377ef979e2595e3472744a3b05
--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: hstore compiler warnings |
Date: | 2013-03-21 15:18:04 |
Message-ID: | 514B24AC.6080904@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 03/21/2013 10:46 AM, Kevin Grittner wrote:
> Is anyone looking at these?:
>
> hstore_io.c: In function ‘hstore_to_json_loose’:
> hstore_io.c:1312:5: warning: ignoring return value of ‘strtol’, declared with attribute warn_unused_result [-Wunused-result]
> hstore_io.c:1324:6: warning: ignoring return value of ‘strtod’, declared with attribute warn_unused_result [-Wunused-result]
>
> gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
>
> These warnings seem to have started with:
>
> http://git.postgresql.org/gitweb/?p=postgresql.git;h=38fb4d978c5bfc377ef979e2595e3472744a3b05
I thought we'd got rid of those. And they don't pop up on my F16 dev box
(gcc 4.6.2)
I'll check it out.
cheers
andrew
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: hstore compiler warnings |
Date: | 2013-03-21 18:50:48 |
Message-ID: | 514B5688.8090506@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 03/21/2013 11:18 AM, Andrew Dunstan wrote:
>
> On 03/21/2013 10:46 AM, Kevin Grittner wrote:
>> Is anyone looking at these?:
>>
>> hstore_io.c: In function ‘hstore_to_json_loose’:
>> hstore_io.c:1312:5: warning: ignoring return value of ‘strtol’,
>> declared with attribute warn_unused_result [-Wunused-result]
>> hstore_io.c:1324:6: warning: ignoring return value of ‘strtod’,
>> declared with attribute warn_unused_result [-Wunused-result]
>>
>> gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
>>
>> These warnings seem to have started with:
>>
>> http://git.postgresql.org/gitweb/?p=postgresql.git;h=38fb4d978c5bfc377ef979e2595e3472744a3b05
>>
>
>
> I thought we'd got rid of those. And they don't pop up on my F16 dev
> box (gcc 4.6.2)
>
> I'll check it out.
This is the only thing that I have found to work with very recent gcc.
Seems ugly. Anyone got a better idea?
cheers
andrew
Attachment | Content-Type | Size |
---|---|---|
unused-fix.patch | text/x-patch | 1.2 KB |
From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: hstore compiler warnings |
Date: | 2013-03-21 19:16:51 |
Message-ID: | 1363893411.1298.YahooMailNeo@web162903.mail.bf1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> [assign to local variable and then `(void) varname;` to avoid "unused" warning]
> This is the only thing that I have found to work with very recent gcc. Seems
> ugly. Anyone got a better idea?
That seems to be what we've used elsewhere.
http://www.postgresql.org/message-id/24446.1318973105@sss.pgh.pa.us
--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company