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

List:       kde-devel
Subject:    Re: little patch for khtml_part.cpp
From:       Michael Pyne <michael.pyne () kdemail ! net>
Date:       2005-11-02 22:22:23
Message-ID: 200511021722.28169.michael.pyne () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 02 November 2005 07:49, Dirk Mueller wrote:
> On Sunday 30 October 2005 17:42, Andreas Leuner wrote:
> > The following patch makes KHTMLPart::begin initialise m_bCleared just
> > before  calling clear instead of after it which seems to make no sense:
>
> .. which breaks m_bCleared because it is set to true by clear().

Indeed, I believe it is a false alarm by valgrind.

KHTMLPartPrivate's copy ctor and assignment operator are both disabled.  In 
addition, g++ will not create any constructors since there were some 
declared.  So the only way to create KHTMLPartPrivate is through its declared 
constructor, and bCleared is set in the constructor (this is guaranteed since 
there is no way to jump out of the ctor before this assignment).

But, as declared later in the code, bCleared is declared to take up one single 
bit of storage.  What I think is happening is that g++ is only assigning to 
that one bit (i.e. not the whole byte) and that valgrind is unable to 
recognize when the byte is tested later that not all bits were needed in the 
test.

So, this seems to be a superfluous warning.

Regards,
 - Michael Pyne

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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