Bug 743573 - Followup: Fix build warnings in gcc 4.6.3; r=Ms2ger

This commit is contained in:
Aryeh Gregor 2012-08-07 11:37:54 +02:00
parent 830fd91a5f
commit 18faac3070
2 changed files with 8 additions and 7 deletions

View File

@ -17,6 +17,7 @@
#include "gfxPlatform.h"
#include "gfxSharedImageSurface.h"
#include "nsNPAPIPluginInstance.h"
#include "mozilla/StandardInteger.h" // for intptr_t
#ifdef MOZ_X11
#include "gfxXlibSurface.h"
#endif
@ -330,9 +331,11 @@ bool
PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginWindow(
const bool& windowed, NPError* result)
{
NPBool isWindowed = windowed;
// Yes, we are passing a boolean as a void*. We have to cast to intptr_t
// first to avoid gcc warnings about casting to a pointer from a
// non-pointer-sized integer.
*result = mNPNIface->setvalue(mNPP, NPPVpluginWindowBool,
(void*)isWindowed);
(void*)(intptr_t)windowed);
return true;
}
@ -340,9 +343,8 @@ bool
PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginTransparent(
const bool& transparent, NPError* result)
{
NPBool isTransparent = transparent;
*result = mNPNIface->setvalue(mNPP, NPPVpluginTransparentBool,
(void*)isTransparent);
(void*)(intptr_t)transparent);
return true;
}
@ -351,7 +353,7 @@ PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginUsesDOMForCursor(
const bool& useDOMForCursor, NPError* result)
{
*result = mNPNIface->setvalue(mNPP, NPPVpluginUsesDOMForCursorBool,
(void*)(NPBool)useDOMForCursor);
(void*)(intptr_t)useDOMForCursor);
return true;
}

View File

@ -339,8 +339,7 @@ nsDOMStorageMemoryDB::RemoveOwners(const nsTArray<nsString> &aOwners,
for (PRUint32 i = 0; i < aOwners.Length(); i++) {
nsCAutoString quotaKey;
nsresult rv;
rv = nsDOMStorageDBWrapper::CreateDomainScopeDBKey(
nsDOMStorageDBWrapper::CreateDomainScopeDBKey(
NS_ConvertUTF16toUTF8(aOwners[i]), quotaKey);
if (!aIncludeSubDomains)