Bug 458722 - gcc warning mainly 64 bit: src/xpcconvert.cpp:1931: warning: comparison is always false due to limited range of data type; r=bz

This commit is contained in:
Atul Aggarwal 2011-09-05 10:29:06 +01:00
parent f0303a7fa5
commit 18ab676d77

View File

@ -2119,7 +2119,8 @@ XPCConvert::JSArray2Native(XPCCallContext& ccx, void** d, jsval s,
#define POPULATE(_mode, _t) \
PR_BEGIN_MACRO \
cleanupMode = _mode; \
if (capacity > PR_UINT32_MAX / sizeof(_t) || \
size_t max = PR_UINT32_MAX / sizeof(_t); \
if (capacity > max || \
nsnull == (array = nsMemory::Alloc(capacity * sizeof(_t)))) \
{ \
if(pErr) \