Closed Bug 650080 Opened 13 years ago Closed 13 years ago

nsContentEventHandler.cpp:867: warning: unused variable 'pEventWidget'

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla6

People

(Reporter: dholbert, Assigned: Ms2ger)

References

()

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

Filing bug on this warning:
> nsContentEventHandler.cpp:867: warning: unused variable 'pEventWidget'

Code in question (added in bug 627649):
> 856   if (contentUnderMouse) {
[...]
> 867     nsIWidget* pEventWidget = aEvent->widget.get();
> 868   }

The variable is created right at the end of an "if" check, and it immediately goes out of scope without ever being used:

I'm assuming line 867 can just be removed entirely. smichaud, is that correct?
...and meant to CC smichaud for an answer to the end of comment 0.
> I'm assuming line 867 can just be removed entirely. smichaud, is
> that correct?

Yes.

It's something left over from my debug build, which I forgot to
remove.

Thanks for catching this, and sorry for the confusion.
Attached patch Patch v1Splinter Review
And I even had a patch for it!
Assignee: nobody → Ms2ger
Status: NEW → ASSIGNED
Attachment #526082 - Flags: review?
Attachment #526082 - Flags: review? → review?(smichaud)
Comment on attachment 526082 [details] [diff] [review]
Patch v1

Looks good to me :-)
Attachment #526082 - Flags: review?(smichaud) → review+
http://hg.mozilla.org/mozilla-central/rev/400353278933
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: