advpack: Sign-compare warnings fix (Try 3)
Andrew Talbot
andrew.talbot at talbotville.com
Tue Jul 15 01:16:12 CDT 2008
Although not strictly necessary here - since int and long are both 32 bits wide -
I think it is better to compare a DWORD with ~0UL, rather than ~0U.
So I'm offering that here. Again, please comment if rejecting this patch.
Thanks and sorry for chopping and changing.
-- Andy.
---
Changelog:
advpack: Sign-compare warnings fix.
diff --git a/dlls/advpack/files.c b/dlls/advpack/files.c
index 5e9ce30..ef8e081 100644
--- a/dlls/advpack/files.c
+++ b/dlls/advpack/files.c
@@ -709,7 +709,7 @@ HRESULT WINAPI ExtractFilesA(LPCSTR CabName, LPCSTR ExpandDir, DWORD Flags,
if (FileList)
{
szConvertedList = convert_file_list(FileList, &dwFileCount);
- if (!szConvertedList || dwFileCount == -1)
+ if (!szConvertedList || dwFileCount == ~0UL)
{
res = E_FAIL;
goto done;
diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c
index c5a5df0..05a7232 100644
--- a/dlls/advpack/install.c
+++ b/dlls/advpack/install.c
@@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(advpack);
#define SPAPI_MASK 0xFFFFL
#define HRESULT_FROM_SPAPI(x) ((x & SPAPI_MASK) | SPAPI_PREFIX)
-#define ADV_HRESULT(x) ((x & SPAPI_ERROR) ? HRESULT_FROM_SPAPI(x) : HRESULT_FROM_WIN32(x))
+#define ADV_HRESULT(x) ((x & SPAPI_ERROR) ? HRESULT_FROM_SPAPI(x) : (DWORD)HRESULT_FROM_WIN32(x))
#define ADV_SUCCESS 0
#define ADV_FAILURE 1
More information about the wine-patches
mailing list