Closed
Bug 886184
Opened 11 years ago
Closed 11 years ago
Local variable usage may get used uninitialized
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: ehsan.akhgari, Assigned: mayhemer)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
15:39.37 ../../../../dom/src/storage/DOMStorageDBThread.cpp:859:9: warning: variable 'usage' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
15:39.37 if (exists) {
15:39.37 ^~~~~~
15:39.37 ../../../../dom/src/storage/DOMStorageDBThread.cpp:864:23: note: uninitialized use occurs here
15:39.37 mUsage->LoadUsage(usage);
15:39.37 ^~~~~
15:39.38 ../../../../dom/src/storage/DOMStorageDBThread.cpp:859:5: note: remove the 'if' if its condition is always true
15:39.38 if (exists) {
15:39.38 ^~~~~~~~~~~~
15:39.38 ../../../../dom/src/storage/DOMStorageDBThread.cpp:858:18: note: initialize the variable 'usage' to silence this warning
15:39.38 int64_t usage;
15:39.38 ^
15:39.38 = 0
15:39.38 1 warning generated.
Assignee | ||
Comment 1•11 years ago
|
||
Reporter | ||
Comment 2•11 years ago
|
||
Comment on attachment 766651 [details] [diff] [review]
v1
Review of attachment 766651 [details] [diff] [review]:
-----------------------------------------------------------------
Great! I wasn't sure what default value would make sense here.
Attachment #766651 -
Flags: review?(ehsan) → review+
Comment 4•11 years ago
|
||
mayhemer, looks like this just needs checking in, yes?
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #4)
> mayhemer, looks like this just needs checking in, yes?
Yes. Go ahead please!
Flags: needinfo?(honzab.moz)
Reporter | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 6•11 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #5)
> Yes. Go ahead please!
(Note that the patch doesn't currently have any headers (no author info, no commit message). It's nice to include those before requesting that someone else check in your patch. Hopefully whoever checks it in will be kind enough to add those things, but it's generally better to not put that burden on the checkin-needed-watchers, since it adds extra work for them & it often results in patches being mis-attributed.)
Comment 7•11 years ago
|
||
(inbound was closed earlier, but it just re-opened, so I went ahead & added the patch headers & landed this: https://hg.mozilla.org/integration/mozilla-inbound/rev/03332f9c6529 )
Keywords: checkin-needed
Updated•11 years ago
|
Flags: in-testsuite-
Comment 8•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•