Bug 761979 - nsfilestreams.cpp(817) : warning C4700: uninitialized local variable 'rv' used. r=janv, jduell
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 07 Jun 2012 10:17:38 +0900
changeset 96025 3ab26a51118b400170e846f2a72de60d2dde45c5
parent 96024 fafddce7a3302677ced1fcc6ed8724c42ac0a360
child 96026 0cefd477885a168f2a5f2a11cef6a41236c41e0e
push id22869
push useremorley@mozilla.com
push dateThu, 07 Jun 2012 09:35:19 +0000
treeherdermozilla-central@3933384d8315 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanv, jduell
bugs761979
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 761979 - nsfilestreams.cpp(817) : warning C4700: uninitialized local variable 'rv' used. r=janv, jduell
netwerk/base/src/nsFileStreams.cpp
--- a/netwerk/base/src/nsFileStreams.cpp
+++ b/netwerk/base/src/nsFileStreams.cpp
@@ -809,18 +809,16 @@ NS_IMETHODIMP
 nsFileStream::Init(nsIFile* file, PRInt32 ioFlags, PRInt32 perm,
                    PRInt32 behaviorFlags)
 {
     NS_ENSURE_TRUE(mFD == nsnull, NS_ERROR_ALREADY_INITIALIZED);
     NS_ENSURE_TRUE(!mDeferredOpen, NS_ERROR_ALREADY_INITIALIZED);
 
     mBehaviorFlags = behaviorFlags;
 
-    nsresult rv;
-    if (NS_FAILED(rv)) return rv;
     if (ioFlags == -1)
         ioFlags = PR_RDWR;
     if (perm <= 0)
         perm = 0;
 
     return MaybeOpen(file, ioFlags, perm,
                      mBehaviorFlags & nsIFileStream::DEFER_OPEN);
 }