Bug 911428 - Fix -Wunused-variable warning in rdf/datasource/src/nsFileSystemDataSource.cpp. r=bsmedberg
authorChris Peterson <cpeterson@mozilla.com>
Mon, 12 Aug 2013 23:35:07 -0700
changeset 158374 48952adc1a955e189aa7586a3242f3c4785ef564
parent 158373 a79c01a10fcb6a40a9784cbc2c4fc397462e2e41
child 158375 7850adf40329e17565cab0a26e7f93e1f7ef3100
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs911428
milestone26.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 911428 - Fix -Wunused-variable warning in rdf/datasource/src/nsFileSystemDataSource.cpp. r=bsmedberg
rdf/datasource/src/nsFileSystemDataSource.cpp
--- a/rdf/datasource/src/nsFileSystemDataSource.cpp
+++ b/rdf/datasource/src/nsFileSystemDataSource.cpp
@@ -838,17 +838,16 @@ FileSystemDataSource::EndUpdateBatch()
     return NS_OK;
 }
 
 
 
 nsresult
 FileSystemDataSource::GetVolumeList(nsISimpleEnumerator** aResult)
 {
-    nsresult rv;
     nsCOMArray<nsIRDFResource> volumes;
     nsCOMPtr<nsIRDFResource> vol;
 
 #ifdef XP_WIN
 
     int32_t         driveType;
     PRUnichar       drive[32];
     int32_t         volNum;
@@ -857,35 +856,35 @@ FileSystemDataSource::GetVolumeList(nsIS
     {
         swprintf( drive, L"%c:\\", volNum + (PRUnichar)'A');
 
         driveType = GetDriveTypeW(drive);
         if (driveType != DRIVE_UNKNOWN && driveType != DRIVE_NO_ROOT_DIR)
         {
           nsAutoCString url;
           url.AppendPrintf("file:///%c|/", volNum + 'A');
-          rv = mRDFService->GetResource(url, getter_AddRefs(vol));
+          nsresult rv = mRDFService->GetResource(url, getter_AddRefs(vol));
           if (NS_FAILED(rv))
             return rv;
 
-                volumes.AppendObject(vol);
+          volumes.AppendObject(vol);
         }
     }
 #endif
 
 #ifdef XP_UNIX
     mRDFService->GetResource(NS_LITERAL_CSTRING("file:///"), getter_AddRefs(vol));
     volumes.AppendObject(vol);
 #endif
 
 #ifdef XP_OS2
     ULONG ulDriveNo = 0;
     ULONG ulDriveMap = 0;
 
-    rv = DosQueryCurrentDisk(&ulDriveNo, &ulDriveMap);
+    nsresult rv = DosQueryCurrentDisk(&ulDriveNo, &ulDriveMap);
     if (NS_FAILED(rv))
         return rv;
 
     for (int volNum = 0; volNum < 26; volNum++)
     {
         if (((ulDriveMap << (31 - volNum)) >> 31))
         {
           nsAutoCString url;