khtml/dom compiler warning

Maks Orlovich maksim at kde.org
Sun Jan 22 14:34:04 GMT 2006


On Sunday 22 January 2006 03:36, André Wöbbeking wrote:
> Hi,
>
> I just compiled newest KDE 3.5 branch with GCC 4.0.2 and got:
>
> khtml/dom/dom2_events.cpp: In member function 'void
> DOM::TextEvent::initTextEvent(const DOM::DOMString&, bool, bool, const
> DOM::AbstractView&, long int, const DOM::DOMString&, long unsigned int,
> long unsigned int, bool, bool)': khtml/dom/dom2_events.cpp:546: warning:
> 'impl' is used uninitialized in this function
> khtml/dom/dom2_events.cpp:549: warning: 'impl' is used uninitialized in
> this function
>
> and this is the code:
>
>         TextEventImpl* impl = static_cast<TextEventImpl*>(impl);
>         impl->initTextEvent(typeArg, canBubbleArg, cancelableArg, viewArg,
> text); } else {
>         KeyboardEventImpl* impl = static_cast<KeyboardEventImpl*>(impl);

Gah, thanks. Will change.


> I don't know if  Bla* impl = impl is valid code but at least GCC 4 seems
> to don't like it.

It's valid in the sense it should compile, not in the sense of doing anything 
right

>




More information about the kfm-devel mailing list