Sync with trunk r63637.
[reactos.git] / base / applications / setup16 / main.c
index 8c0ffe2..fa35819 100644 (file)
@@ -13,6 +13,8 @@ static UINT WINAPI ExtCabCallback(PVOID Context, UINT Notification, UINT_PTR Par
     FILE_IN_CABINET_INFO_W *pInfo;
     FILEPATHS_W *pFilePaths;
 
+    DBG_UNREFERENCED_LOCAL_VARIABLE(pFilePaths);
+
     switch(Notification)
     {
         case SPFILENOTIFY_FILEINCABINET:
@@ -31,7 +33,7 @@ BOOL DeleteDirectory(LPWSTR lpszDir)
 {
     SHFILEOPSTRUCT fileop;
     DWORD len = wcslen(lpszDir);
-    WCHAR *pszFrom = HeapAlloc(GetProcessHeap(), 0, (len + 2) * sizeof(WCHAR)); 
+    WCHAR *pszFrom = HeapAlloc(GetProcessHeap(), 0, (len + 2) * sizeof(WCHAR));
     int ret;
 
     wcscpy(pszFrom, lpszDir);
@@ -80,26 +82,26 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
     STARTUPINFO startupInfo;
     UNREFERENCED_PARAMETER(hPrevInstance);
     UNREFERENCED_PARAMETER(nCmdShow);
-    
+
     GetCurrentDirectory(MAX_PATH, szSetupPath);
     wcscat(szSetupPath, L"\\");
     wcscpy(szFileName, szSetupPath);
     wcscat(szFileName, L"setup.lst");
-    
+
     if (GetFileAttributes(szFileName) == INVALID_FILE_ATTRIBUTES)
     {
         MessageBoxW(0, L"Cannot find Setup.lst file", L"Error", MB_OK | MB_ICONERROR);
         return 1;
     }
-    
+
     /* read information from setup.lst */
     GetPrivateProfileStringW(NT_PARAMS, L"CabinetFile", NULL, szCabFileName, MAX_PATH, szFileName);
     GetPrivateProfileStringW(NT_PARAMS, L"TmpDirName", NULL, szTempDirName, 50, szFileName);
     GetPrivateProfileStringW(NT_PARAMS, L"CmdLine", NULL, szCmdLine, MAX_PATH, szFileName);
-    
+
     wcscpy(szCabFilePath, szSetupPath);
     wcscat(szCabFilePath, szCabFileName);
-    
+
     /* ceate temp directory */
     GetSystemDrive(szDrive);
     wcscpy(szTempPath, szDrive);
@@ -107,16 +109,16 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
     wcscpy(szFullTempPath, szTempPath);
     wcscat(szFullTempPath, szTempDirName);
     wcscat(szFullTempPath, L"\\");
-    
+
     if (SHCreateDirectoryEx(0, szFullTempPath, NULL) != ERROR_SUCCESS)
     {
         MessageBoxW(0, L"Could not create Temp Directory.", L"Error", MB_OK | MB_ICONERROR);
         return 1;
-    }    
+    }
 
     dwAttrib = GetFileAttributes(szTempPath);
     SetFileAttributes(szTempPath, dwAttrib | FILE_ATTRIBUTE_HIDDEN);
-    
+
     /* extract files */
     if (!SetupIterateCabinetW(szCabFilePath, 0, ExtCabCallback, szFullTempPath))
     {
@@ -124,12 +126,12 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
         DeleteDirectory(szTempPath);
         return 1;
     }
-     
+
     /* prepare command line */
     wsprintf(szTempCmdLine, szCmdLine, szFullTempPath, lpCmdLine);
     wcscpy(szCmdLine, szFullTempPath);
     wcscat(szCmdLine, szTempCmdLine);
-    
+
     /* execute the 32-Bit installer */
     ZeroMemory(&processInfo, sizeof(processInfo));
     ZeroMemory(&startupInfo, sizeof(startupInfo));
@@ -148,10 +150,10 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
         DeleteDirectory(szTempPath);
         return 1;
     }
-    
+
     /* cleanup */
     DeleteDirectory(szTempPath);
-    
+
     return 0;
 }