Closed
Bug 777792
Opened 13 years ago
Closed 13 years ago
Uninitialized variable in ParamTraits<nsMouseEvent>::Read
Categories
(Core :: Widget, defect)
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
Details
Attachments
(1 file)
|
1.02 KB,
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
Similar to bug 777734.
../../dist/include/IPC/nsGUIEventIPC.h:140:10: warning: variable 'exit' is used uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
rv = ReadParam(aMsg, aIter, static_cast<nsMouseEvent_base*>(aResult)) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dist/include/IPC/nsGUIEventIPC.h:148:57: note: uninitialized use occurs here
aResult->exit = static_cast<nsMouseEvent::exitType>(exit);
^~~~
../../dist/include/IPC/nsGUIEventIPC.h:140:10: note: remove the '&&' if its condition is always true
rv = ReadParam(aMsg, aIter, static_cast<nsMouseEvent_base*>(aResult)) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dist/include/IPC/nsGUIEventIPC.h:140:10: warning: variable 'exit' is used uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
rv = ReadParam(aMsg, aIter, static_cast<nsMouseEvent_base*>(aResult)) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dist/include/IPC/nsGUIEventIPC.h:148:57: note: uninitialized use occurs here
aResult->exit = static_cast<nsMouseEvent::exitType>(exit);
^~~~
../../dist/include/IPC/nsGUIEventIPC.h:140:10: note: remove the '&&' if its condition is always true
rv = ReadParam(aMsg, aIter, static_cast<nsMouseEvent_base*>(aResult)) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dist/include/IPC/nsGUIEventIPC.h:140:10: warning: variable 'exit' is used uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
rv = ReadParam(aMsg, aIter, static_cast<nsMouseEvent_base*>(aResult)) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dist/include/IPC/nsGUIEventIPC.h:148:57: note: uninitialized use occurs here
aResult->exit = static_cast<nsMouseEvent::exitType>(exit);
^~~~
../../dist/include/IPC/nsGUIEventIPC.h:140:10: note: remove the '&&' if its condition is always true
rv = ReadParam(aMsg, aIter, static_cast<nsMouseEvent_base*>(aResult)) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dist/include/IPC/nsGUIEventIPC.h:140:10: warning: variable 'exit' is used uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
rv = ReadParam(aMsg, aIter, static_cast<nsMouseEvent_base*>(aResult)) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dist/include/IPC/nsGUIEventIPC.h:148:57: note: uninitialized use occurs here
aResult->exit = static_cast<nsMouseEvent::exitType>(exit);
^~~~
../../dist/include/IPC/nsGUIEventIPC.h:140:10: note: remove the '&&' if its condition is always true
rv = ReadParam(aMsg, aIter, static_cast<nsMouseEvent_base*>(aResult)) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../dist/include/IPC/nsGUIEventIPC.h:139:34: note: initialize the variable 'exit' to silence this warning
PRUint8 reason, context, exit;
^
= '\0'
Same for reason and context.
| Assignee | ||
Comment 1•13 years ago
|
||
Comment on attachment 646212 [details] [diff] [review]
Patch (v1)
r+ for the same reason, to make the warnings shut up.
Attachment #646212 -
Flags: review?(jones.chris.g) → review+
| Assignee | ||
Comment 3•13 years ago
|
||
Landed first with the wrong bug #:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3077d21f177b
Then backed it out:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b4f10c6d5e2
And relanded with the correct bug number:
https://hg.mozilla.org/integration/mozilla-inbound/rev/46ea45da584e
Target Milestone: --- → mozilla17
| Assignee | ||
Comment 4•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•