Closed Bug 961399 Opened 12 years ago Closed 11 years ago

CacheFile::Doom may return uninitialized value

Categories

(Core :: Networking: Cache, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 962077

People

(Reporter: vbar, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release) Build ID: 20131216130957 Steps to reproduce: Looking at random compiler (gcc 4.7.3) warnings when building Firefox, 0:15.54 /home/vb/firefox/mozilla-central/netwerk/cache2/CacheFile.cpp: In member function 'virtual nsresult mozilla::net::CacheFile::Doom(mozilla::net::CacheFileListener*)': 0:15.54 Warning: -Wmaybe-uninitialized in /home/vb/firefox/mozilla-central/netwerk/cache2/CacheFile.cpp: 'rv' may be used uninitialized in this function 0:15.54 /home/vb/firefox/mozilla-central/netwerk/cache2/CacheFile.cpp:920:12: warning: 'rv' may be used uninitialized in this function [-Wmaybe-uninitialized] looks like a legitimate problem... Actual results: I suppose the result of CacheFile::Doom might never be checked when the call is made on object with non-NULL mOpeningFile (and false mHandle and mMemoryOnly), but making sure of that would be much more work than simply returning something... Expected results: I'm also not sure whether the above should count as success or failure (not to mention which one), but even returning NS_ERROR_NOT_AVAILABLE would IMHO be better than nothing - e.g bug 771832 might be related, in which case a stable error code would make the problem more reproducible...
Status: UNCONFIRMED → NEW
Component: Untriaged → Networking: Cache
Ever confirmed: true
Product: Firefox → Core
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.