From kde-core-devel Sun Dec 23 08:53:27 2007 From: Oswald Buddenhagen Date: Sun, 23 Dec 2007 08:53:27 +0000 To: kde-core-devel Subject: Re: kdebug vs. non-debug builds Message-Id: <20071223085327.GA4595 () ugly ! local> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=119840001427869 On Sun, Dec 23, 2007 at 12:21:45AM -0500, Jaison Lee wrote: > > > #if !defined(KDE_NO_DEBUG_OUTPUT) > > > # define kDebug KDebug(QtDebugMsg, __FILE__, __LINE__, # Q_FUNC_INFO) > > > #else > > > # define kDebug if (1); else kDebug > > > #endif > > > > > I'm not certain of its brilliance, but I did notice that the offending > definition is actually a redefinition of kDebug and kWarning from > further up in the same file. Simply commenting out the faulty > definitions has so far seemed successful. > uhm, no, not really. notice that the kDebug is in the else branch of an always true condition, i.e., it will be completely eliminated by the compiler after the syntax check. just removing the if works as such, but generates quite some code just for the purpose of sending messages down the drain ... -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Confusion, chaos, panic - my work here is done.