mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 782252 - Cast some nsresult to PRUint32; r=ehsan
This commit is contained in:
parent
0af5675bda
commit
0a8f6b4783
@ -760,7 +760,8 @@ nsStringBundleService::FormatWithBundle(nsIStringBundle* bundle, nsresult aStatu
|
||||
// If the int key fails, try looking up the default error message. E.g. print:
|
||||
// An unknown error has occurred (0x804B0003).
|
||||
if (NS_FAILED(rv)) {
|
||||
nsAutoString statusStr; statusStr.AppendInt(aStatus, 16);
|
||||
nsAutoString statusStr;
|
||||
statusStr.AppendInt(static_cast<PRUint32>(aStatus), 16);
|
||||
const PRUnichar* otherArgArray[1];
|
||||
otherArgArray[0] = statusStr.get();
|
||||
PRUint16 code = NS_ERROR_GET_CODE(NS_ERROR_FAILURE);
|
||||
|
@ -745,7 +745,7 @@ nsUserFontSet::LogMessage(gfxProxyFontEntry *aProxy,
|
||||
break;
|
||||
default:
|
||||
msg.Append("status=");
|
||||
msg.AppendInt(aStatus);
|
||||
msg.AppendInt(static_cast<PRUint32>(aStatus));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ nsUrlClassifierStreamUpdater::UpdateError(nsresult result)
|
||||
DownloadDone();
|
||||
|
||||
nsCAutoString strResult;
|
||||
strResult.AppendInt(result);
|
||||
strResult.AppendInt(static_cast<PRUint32>(result));
|
||||
if (errorCallback) {
|
||||
errorCallback->HandleEvent(strResult);
|
||||
}
|
||||
|
@ -99,19 +99,20 @@ nsErrorService::GetErrorStringBundle(PRInt16 errorModule, char **result)
|
||||
NS_IMETHODIMP
|
||||
nsErrorService::RegisterErrorStringBundleKey(nsresult error, const char *stringBundleKey)
|
||||
{
|
||||
return mErrorStringBundleKeyMap.Put(error, stringBundleKey);
|
||||
return mErrorStringBundleKeyMap.Put(static_cast<PRUint32>(error),
|
||||
stringBundleKey);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsErrorService::UnregisterErrorStringBundleKey(nsresult error)
|
||||
{
|
||||
return mErrorStringBundleKeyMap.Remove(error);
|
||||
return mErrorStringBundleKeyMap.Remove(static_cast<PRUint32>(error));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsErrorService::GetErrorStringBundleKey(nsresult error, char **result)
|
||||
{
|
||||
char* value = mErrorStringBundleKeyMap.Get(error);
|
||||
char* value = mErrorStringBundleKeyMap.Get(static_cast<PRUint32>(error));
|
||||
if (value == nullptr)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
*result = value;
|
||||
|
Loading…
Reference in New Issue
Block a user