diff --git a/netwerk/base/src/nsSocketTransport2.cpp b/netwerk/base/src/nsSocketTransport2.cpp index e40de07d1e1..9672d4cb705 100644 --- a/netwerk/base/src/nsSocketTransport2.cpp +++ b/netwerk/base/src/nsSocketTransport2.cpp @@ -130,7 +130,9 @@ IsNSSErrorCode(PRErrorCode code) static nsresult GetXPCOMFromNSSError(PRErrorCode code) { - return NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, -1 * code); + // XXX Don't make up nsresults, it's supposed to be an enum (bug 778113) + return (nsresult)NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, + -1 * code); } static nsresult diff --git a/security/manager/ssl/src/NSSErrorsService.cpp b/security/manager/ssl/src/NSSErrorsService.cpp index 7fa847b93e8..efd6c69e214 100644 --- a/security/manager/ssl/src/NSSErrorsService.cpp +++ b/security/manager/ssl/src/NSSErrorsService.cpp @@ -71,10 +71,11 @@ NSSErrorsService::GetXPCOMFromNSSError(PRInt32 aNSPRCode, nsresult *aXPCOMErrorC // The error codes within each module may be a 16 bit value. // For simplicity let's use the positive value of the NSS code. + // XXX Don't make up nsresults, it's supposed to be an enum (bug 778113) *aXPCOMErrorCode = - NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, - -1 * aNSPRCode); + (nsresult)NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, + -1 * aNSPRCode); return NS_OK; } diff --git a/toolkit/identity/IdentityCryptoService.cpp b/toolkit/identity/IdentityCryptoService.cpp index fc4aa38b7c1..36a807f528a 100644 --- a/toolkit/identity/IdentityCryptoService.cpp +++ b/toolkit/identity/IdentityCryptoService.cpp @@ -70,7 +70,9 @@ PRErrorCode_to_nsresult(PRErrorCode error) } // From NSSErrorsService::GetXPCOMFromNSSError - return NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, -1 * error); + // XXX Don't make up nsresults, it's supposed to be an enum (bug 778113) + return (nsresult)NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, + -1 * error); } // IMPORTANT: This must be called immediately after the function returning the