cryptnet: Sign-compare warning fix (try 2)

Juan Lang juan.lang at gmail.com
Mon Aug 25 11:47:40 CDT 2008


Hi Andy,

+            LONG last_error;

             ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT,
              rgpvContext[i], 0, NULL, &cbUrlArray, NULL, NULL, NULL);
-            if (!ret && GetLastError() == CRYPT_E_NOT_FOUND)
+            last_error = GetLastError();
+            if (!ret && last_error == CRYPT_E_NOT_FOUND)

I don't get it.  How does using a temporary LONG rather than
GetLastError directly remove the warning?  Either the compiler was
wrong about the first warning, or it's wrong about not warning about
this form.  I don't see the utility of this patch.  Furthermore, any
patches that remove warnings due to sign mismatches between
GetLastError and an error in winerror.h reflect an error on
Microsoft's part, not on Wine's, so I don't see the point of removing
them.
--Juan



More information about the wine-devel mailing list