Lists: | pgsql-hackers |
---|
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | mingw format warnings |
Date: | 2011-01-28 19:12:05 |
Message-ID: | 4D431505.9010002@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
We have had format warnings in mingw builds for years, and it doesn't
look like we're ever going to do anything about them. Can we just add
-Wno-format to the CFLAGS for Mingw and be done with them?
cheers
andrew
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: mingw format warnings |
Date: | 2011-01-28 19:39:37 |
Message-ID: | 1296243577.7793.1.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On fre, 2011-01-28 at 14:12 -0500, Andrew Dunstan wrote:
> We have had format warnings in mingw builds for years, and it doesn't
> look like we're ever going to do anything about them. Can we just add
> -Wno-format to the CFLAGS for Mingw and be done with them?
I wasn't aware of this issue, but looking at the latest build log from
narwhal, I see only 4 format-related warnings, and they all look pretty
easy and desirable to fix.
The boatload of other warnings there is more puzzling ...
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: mingw format warnings |
Date: | 2011-01-28 20:11:00 |
Message-ID: | 24437.1296245460@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> We have had format warnings in mingw builds for years, and it doesn't
> look like we're ever going to do anything about them. Can we just add
> -Wno-format to the CFLAGS for Mingw and be done with them?
Are any of them substantive, or are they all about %m ?
regards, tom lane
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: mingw format warnings |
Date: | 2011-01-28 22:28:43 |
Message-ID: | 4D43431B.9020605@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 01/28/2011 03:11 PM, Tom Lane wrote:
> Andrew Dunstan<andrew(at)dunslane(dot)net> writes:
>> We have had format warnings in mingw builds for years, and it doesn't
>> look like we're ever going to do anything about them. Can we just add
>> -Wno-format to the CFLAGS for Mingw and be done with them?
> Are any of them substantive, or are they all about %m ?
[andrew(at)aurelia ]$ grep 'warning.*format' frogmouth-make*.log | sed
's/.*warning:/warning:/' | sort | uniq -c
1 warning: format '%08x' expects type 'unsigned int', but
argument 3 has type 'DWORD'
1 warning: format '%0i' expects type 'int', but argument 4 has
type 'DWORD'
1 warning: format '%0i' expects type 'int', but argument 5 has
type 'DWORD'
1 warning: format '%-30s' expects type 'char *', but argument 6
has type 'int'
2 warning: format '%d' expects type 'int', but argument 3 has
type 'DWORD'
2 warning: format '%i' expects type 'int', but argument 3 has
type 'uint64'
2 warning: format '%i' expects type 'int', but argument 4 has
type 'uint64'
3 warning: format not a string literal and no format arguments
1 warning: format '%s' expects type 'char *', but argument 4 has
type 'int64'
70 warning: too many arguments for format
1 warning: unknown conversion type character 'G' in format
73 warning: unknown conversion type character 'l' in format
360 warning: unknown conversion type character 'm' in format
1 warning: unknown conversion type character 'V' in format
cheers
andrew
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: mingw format warnings |
Date: | 2011-01-28 22:34:46 |
Message-ID: | 26687.1296254086@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 01/28/2011 03:11 PM, Tom Lane wrote:
>> Are any of them substantive, or are they all about %m ?
> [andrew(at)aurelia ]$ grep 'warning.*format' frogmouth-make*.log | sed
> 's/.*warning:/warning:/' | sort | uniq -c
I'd say a lot of those probably need attention. It might be all right
to assume DWORD == int, but even there I'd feel safer with a cast.
regards, tom lane
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: mingw format warnings |
Date: | 2011-01-28 22:35:14 |
Message-ID: | 4D4344A2.4080007@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 01/28/2011 02:39 PM, Peter Eisentraut wrote:
> On fre, 2011-01-28 at 14:12 -0500, Andrew Dunstan wrote:
>> We have had format warnings in mingw builds for years, and it doesn't
>> look like we're ever going to do anything about them. Can we just add
>> -Wno-format to the CFLAGS for Mingw and be done with them?
> I wasn't aware of this issue, but looking at the latest build log from
> narwhal, I see only 4 format-related warnings, and they all look pretty
> easy and desirable to fix.
>
> The boatload of other warnings there is more puzzling ...
>
Hmm. Looks like gcc 4.5.0 that's in use on frogmouth is a whole lot noisier.
cheers
andrew
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: mingw format warnings |
Date: | 2011-01-28 22:58:56 |
Message-ID: | 4D434A30.1000008@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 01/28/2011 05:34 PM, Tom Lane wrote:
> Andrew Dunstan<andrew(at)dunslane(dot)net> writes:
>> On 01/28/2011 03:11 PM, Tom Lane wrote:
>>> Are any of them substantive, or are they all about %m ?
>> [andrew(at)aurelia ]$ grep 'warning.*format' frogmouth-make*.log | sed
>> 's/.*warning:/warning:/' | sort | uniq -c
> I'd say a lot of those probably need attention. It might be all right
> to assume DWORD == int, but even there I'd feel safer with a cast.
A quick look through suggest a cast could be reasonable in these case:
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3124/../pgsql/src/backend/port/win32/crashdump.c:
In function 'crashDumpHandler':
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3124/../pgsql/src/backend/port/win32/crashdump.c:137:3:
warning: format '%0i' expects type 'int', but argument 4 has type 'DWORD'
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3124/../pgsql/src/backend/port/win32/crashdump.c:137:3:
warning: format '%0i' expects type 'int', but argument 5 has type 'DWORD'
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3124/../pgsql/src/backend/port/win32/crashdump.c:147:6:
warning: format '%d' expects type 'int', but argument 3 has type 'DWORD'
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3124/../pgsql/src/backend/port/win32/crashdump.c:156:6:
warning: format '%08x' expects type 'unsigned int', but argument 3 has
type 'DWORD'
pg_latch.c:147:4: warning: format '%d' expects type 'int', but argument
3 has type 'DWORD'
The remainder seem due to use of INT64FORMAT or other formats like %m
which gcc doesn't grok.
cheers
andrew