Closed
Bug 962077
Opened 12 years ago
Closed 12 years ago
netwerk/cache2/CacheFile.cpp:920:12: warning: ‘rv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Categories
(Core :: Networking: Cache, defect)
Core
Networking: Cache
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: froydnj, Assigned: mayhemer)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
681 bytes,
patch
|
michal
:
review+
|
Details | Diff | Splinter Review |
Unlike a lot of other maybe-uninitialized warnings, this looks like a honest-to-goodness bug:
nsresult rv;
if (mMemoryOnly) {
// TODO what exactly to do here?
return NS_ERROR_NOT_AVAILABLE;
}
nsCOMPtr<CacheFileIOListener> listener;
if (aCallback || !mHandle) {
listener = new DoomFileHelper(aCallback);
}
if (mHandle) {
rv = CacheFileIOManager::DoomFile(mHandle, listener);
} else if (mOpeningFile) {
mDoomAfterOpenListener = listener;
}
return rv;
Notice that rv is never set in the !mHandle cases.
![]() |
Assignee | |
Comment 1•12 years ago
|
||
This could be causing some intermittent timeouts we see on try runs/gum. Thanks!
Michal, want to fix this? I think init to NS_OK is sufficient here (and move bellow if (mMemoryOnly) {}).
![]() |
Assignee | |
Comment 2•12 years ago
|
||
I took the liberty. Hope you don't work on the patch right now :)
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attachment #8363069 -
Flags: review?(michal.novotny)
Updated•12 years ago
|
Attachment #8363069 -
Flags: review?(michal.novotny) → review+
![]() |
Assignee | |
Comment 3•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•