From: | Michael Meskes <meskes(at)postgresql(dot)org> |
---|---|
To: | PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Warnings in compile |
Date: | 2009-05-25 03:24:40 |
Message-ID: | 20090525032440.GA23504@hyperion.credativ.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
sitting here on my flight back I went through the list of all warnings gcc
spits out when using -Wextra. There are a whole lot of them (~ 1700) that
mostly (except one) fall into one of four classes:
- unused parameters: ~ 600
- some combination of signed and unsigned: ~ 600
Are we really sure that *all* compilers out there do handle this correctly?
- missing initializer: ~ 500
Probably coming from us initialising structures only partially.
- empty body in else statement: 14 all in backend/commands/copy.c
There are some #defines of the form
#define foo if(1) { ... } else
that are called as foo;
I see the need for the macro to expand as block, but what use hase the empty
else?
I assume that the only warning outside these classes is a false positive.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew McNamara | 2009-05-25 04:20:44 | No sanity checking performed on binary TIME parameters. |
Previous Message | Greg Smith | 2009-05-25 03:06:36 | Re: generic options for explain |