[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: branches/KDE/3.5/kdelibs/kio/kio
From:       David Faure <faure () kde ! org>
Date:       2005-08-31 7:51:26
Message-ID: 200508310951.27180.faure () kde ! org
[Download RAW message or body]

On Wednesday 31 August 2005 01:39, Dawit Alemayehu wrote:
> On Tuesday 30 August 2005 09:12, you wrote:
> > Dirk Mueller wrote:
> > >On Tuesday 30 August 2005 03:36, Dawit Alemayehu wrote:
> > >> Initialize static pointer to self
> > >
> > >why? its initialized automatically.
> >
> > Dirk is right: don't add the = 0. That will make the compiler instead
> > allocate the variable on .data instead of .bss.
> 
> Then we would need remove all the explicit initialization from all the other 
> code in KIO that have static pointers as well... KTrader and KDirLister are 
> but two examples...

That's right. Most of the KDE developers (including me) didn't know about
this behavior when writing that code. Someone should go through kdelibs and
remove the unneeded = 0. Maybe adding a comment "// initialized to 0 automatically"
to avoid future "hey I found a missing initialization" commits ;-)

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic