Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 650080 - nsContentEventHandler.cpp:867: warning: unused variable 'pEventWidget'
: nsContentEventHandler.cpp:867: warning: unused variable 'pEventWidget'
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla6
Assigned To: :Ms2ger (⌚ UTC+1/+2)
: Andrew Overholt [:overholt]
Depends on:
Blocks: 627649
  Show dependency treegraph
Reported: 2011-04-14 12:13 PDT by Daniel Holbert [:dholbert] (PTO Oct 21-25)
Modified: 2011-04-15 09:36 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (818 bytes, patch)
2011-04-14 12:43 PDT, :Ms2ger (⌚ UTC+1/+2)
smichaud: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] (PTO Oct 21-25) 2011-04-14 12:13:04 PDT
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?
Comment 2 Daniel Holbert [:dholbert] (PTO Oct 21-25) 2011-04-14 12:15:09 PDT
...and meant to CC smichaud for an answer to the end of comment 0.
Comment 3 Steven Michaud [:smichaud] (Retired) 2011-04-14 12:37:25 PDT
> I'm assuming line 867 can just be removed entirely. smichaud, is
> that correct?


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

Thanks for catching this, and sorry for the confusion.
Comment 4 :Ms2ger (⌚ UTC+1/+2) 2011-04-14 12:43:45 PDT
Created attachment 526082 [details] [diff] [review]
Patch v1

And I even had a patch for it!
Comment 5 Steven Michaud [:smichaud] (Retired) 2011-04-14 12:47:51 PDT
Comment on attachment 526082 [details] [diff] [review]
Patch v1

Looks good to me :-)
Comment 6 :Ms2ger (⌚ UTC+1/+2) 2011-04-15 09:36:17 PDT

Note You need to log in before you can comment on or make changes to this bug.