Bug 797316 - Fix -Werror=conversion-null errors in Windows-only code (uriloader part) r=jlebar
authorJacek Caban <jacek@codeweavers.com>
Thu, 04 Oct 2012 10:31:06 +0200
changeset 109336 8913d486d3f4a87a84a898b3d6d4f3f33203e870
parent 109335 37046745e7426ce71e48228d91ca4eed9037ba48
child 109337 d4a5f910c4461f791581cb8d13e930f6476a2088
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersjlebar
bugs797316
milestone18.0a1
Bug 797316 - Fix -Werror=conversion-null errors in Windows-only code (uriloader part) r=jlebar
uriloader/exthandler/win/nsMIMEInfoWin.cpp
--- a/uriloader/exthandler/win/nsMIMEInfoWin.cpp
+++ b/uriloader/exthandler/win/nsMIMEInfoWin.cpp
@@ -91,17 +91,17 @@ nsMIMEInfoWin::LaunchWithFile(nsIFile* a
         if (!GetSystemDirectoryW(rundll32Path, MAX_PATH)) {
           return NS_ERROR_FILE_NOT_FOUND;
         }
         lstrcatW(rundll32Path, RUNDLL32_EXE);
 
         SHELLEXECUTEINFOW seinfo;
         memset(&seinfo, 0, sizeof(seinfo));
         seinfo.cbSize = sizeof(SHELLEXECUTEINFOW);
-        seinfo.fMask  = NULL;
+        seinfo.fMask  = 0;
         seinfo.hwnd   = NULL;
         seinfo.lpVerb = NULL;
         seinfo.lpFile = rundll32Path;
         seinfo.lpParameters =  args.get();
         seinfo.lpDirectory  = NULL;
         seinfo.nShow  = SW_SHOWNORMAL;
         if (ShellExecuteExW(&seinfo))
           return NS_OK;
@@ -639,17 +639,17 @@ nsMIMEInfoWin::GetPossibleLocalHandlers(
             ProcessPath(appList, trackList, appFilesystemCommand);
           }
         }
       }
       regKey->Close();
     }
 
 
-    // 2) list HKEY_CLASSES_ROOT\.ext\OpenWithList\ 
+    // 2) list HKEY_CLASSES_ROOT\.ext\OpenWithList
     
     workingRegistryPath = fileExtToUse;
     workingRegistryPath.AppendLiteral("\\OpenWithList");
 
     rv = regKey->Open(nsIWindowsRegKey::ROOT_KEY_CLASSES_ROOT,
                       workingRegistryPath,
                       nsIWindowsRegKey::ACCESS_QUERY_VALUE);
     if (NS_SUCCEEDED(rv)) {
@@ -702,18 +702,18 @@ nsMIMEInfoWin::GetPossibleLocalHandlers(
         }
       }
       regKey->Close();
     }
 
 
     // 4) Add any non configured applications located in the MRU list
 
-    // HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\
-    // Explorer\FileExts\.ext\OpenWithList
+    // HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
+    // \Explorer\FileExts\.ext\OpenWithList
     workingRegistryPath =
       NS_LITERAL_STRING("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\");
     workingRegistryPath += fileExtToUse;
     workingRegistryPath.AppendLiteral("\\OpenWithList");
 
     rv = regKey->Open(nsIWindowsRegKey::ROOT_KEY_CURRENT_USER,
                       workingRegistryPath,
                       nsIWindowsRegKey::ACCESS_QUERY_VALUE);
@@ -740,18 +740,18 @@ nsMIMEInfoWin::GetPossibleLocalHandlers(
         }
       }
     }
     
 
     // 5) Add any non configured progids in the MRU list, with the
     // different step of resolving the progids for the command handler.
     
-    // HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\
-    // Explorer\FileExts\.ext\OpenWithProgids
+    // HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
+    // \Explorer\FileExts\.ext\OpenWithProgids
     workingRegistryPath =
       NS_LITERAL_STRING("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\");
     workingRegistryPath += fileExtToUse;
     workingRegistryPath.AppendLiteral("\\OpenWithProgids");
 
     regKey->Open(nsIWindowsRegKey::ROOT_KEY_CURRENT_USER,
                  workingRegistryPath,
                  nsIWindowsRegKey::ACCESS_QUERY_VALUE);
@@ -815,17 +815,17 @@ nsMIMEInfoWin::GetPossibleLocalHandlers(
             }
           }
         }
       }
     }
   } // extKnown == false
 
 
-  // 7) list global HKEY_CLASSES_ROOT\*\OpenWithList\
+  // 7) list global HKEY_CLASSES_ROOT\*\OpenWithList
   // Listing general purpose handlers, not specific to a mime type or file extension
 
   workingRegistryPath = NS_LITERAL_STRING("*\\OpenWithList");
 
   rv = regKey->Open(nsIWindowsRegKey::ROOT_KEY_CLASSES_ROOT,
                     workingRegistryPath,
                     nsIWindowsRegKey::ACCESS_QUERY_VALUE);
   if (NS_SUCCEEDED(rv)) {