Bug 661962: Remove mostly-unused variable 'rv' from nsINIParser::Init (moving it inside the #ifdef block where it's used). r=bsmedberg
authorAtul Aggarwal <atulagrwl@gmail.com>
Thu, 01 Sep 2011 03:06:26 +0530
changeset 76623 bc627f4c6daa981a61c77885b14cfa0b819827be
parent 76622 bca514585c9992406350a26f7650e3327c6961db
child 76624 12507ee12f19167560ed7ea655fe3cea47e4aee4
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersbsmedberg
bugs661962
milestone9.0a1
Bug 661962: Remove mostly-unused variable 'rv' from nsINIParser::Init (moving it inside the #ifdef block where it's used). r=bsmedberg
xpcom/glue/nsINIParser.cpp
--- a/xpcom/glue/nsINIParser.cpp
+++ b/xpcom/glue/nsINIParser.cpp
@@ -83,33 +83,31 @@ public:
   void operator=(FILE *fp) { fp_ = fp; }
 private:
   FILE *fp_;
 };
 
 nsresult
 nsINIParser::Init(nsILocalFile* aFile)
 {
-    nsresult rv;
-
     /* open the file. Don't use OpenANSIFileDesc, because you mustn't
        pass FILE* across shared library boundaries, which may be using
        different CRTs */
 
     AutoFILE fd;
 
 #ifdef XP_WIN
     nsAutoString path;
-    rv = aFile->GetPath(path);
+    nsresult rv = aFile->GetPath(path);
     NS_ENSURE_SUCCESS(rv, rv);
 
     fd = _wfopen(path.get(), READ_BINARYMODE);
 #else
     nsCAutoString path;
-    rv = aFile->GetNativePath(path);
+    aFile->GetNativePath(path);
 
     fd = fopen(path.get(), READ_BINARYMODE);
 #endif
 
     if (!fd)
       return NS_ERROR_FAILURE;
 
     return InitFromFILE(fd);