[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: compiler warnings
From: André_Wöbbeking <Woebbeking () onlinehome ! de>
Date: 2005-03-31 18:24:16
Message-ID: 200503312024.16240.Woebbeking () onlinehome ! de
[Download RAW message or body]
Hi,
I know that from time to time someone suggests to cleanup all compiler
warnings and I can only second that. For example I found these two
goodies (warning: 'foo' might be used uninitialized in this function):
kdebase/kicker/applets/clock/clock.cpp:1626
bool showDate = showDate || (zone->zoneIndex() != 0);
if (!showDate && !showDayOfWeek)
One additional note, showDate is also a member variable. But AFAIK only
the local variable is used in this example otherwise you've to use
this->showDate. -Wshadow would be nice for this kind of things, but Qt
prevents us from using it :-(
kwin/clients/modernsystem/modernsys.cpp: 219
bool showh;
int hsize, hwidth, bwidth, theight;
KConfig c("kwinmodernsysrc");
c.setGroup("General");
show_handle = c.readBoolEntry("ShowHandle", true);
hwidth = c.readUnsignedNumEntry("HandleWidth", 6);
hsize = c.readUnsignedNumEntry("HandleSize", 30);
if (!(showh && hsize && hwidth)) {
showh = false;
hwidth = hsize = 0;
}
I think it should read
showh = c.readBoolEntry("ShowHandle", true);
I know that most warnings are just warnings but sometimes they help
finding errors. But if there're hundreds of warnings you'll oversee the
important ones easily. Most warnings in kdelibs and kdebase exist for
month now and IMO at least KDE core should be cleaned up.
Cheers,
André
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic