зеркало из https://github.com/mozilla/gecko-dev.git
Fix &va_list on x86-64, quiet warning
This commit is contained in:
Родитель
02e6906f3c
Коммит
9d904bfaad
|
@ -242,7 +242,7 @@ class HashTable : AllocPolicy
|
|||
#endif
|
||||
|
||||
static const unsigned sMinSize = 16;
|
||||
static const unsigned sSizeLimit = tl::NBitMask<24>::result;
|
||||
static const size_t sSizeLimit = tl::NBitMask<24>::result;
|
||||
static const unsigned sHashBits = tl::BitSize<HashNumber>::result;
|
||||
static const unsigned sGoldenRatio = 0x9E3779B9U; /* taken from jsdhash.h */
|
||||
static const uint8 sMinAlphaFrac = 64; /* (0x100 * .25) taken from jsdhash.h */
|
||||
|
|
|
@ -456,6 +456,12 @@ sm_test_done:
|
|||
// JS_ConvertArguments, these functions were moved here and hacked down to
|
||||
// size.
|
||||
|
||||
#ifdef HAVE_VA_LIST_AS_ARRAY
|
||||
#define JS_ADDRESSOF_VA_LIST(ap) ((va_list *)(ap))
|
||||
#else
|
||||
#define JS_ADDRESSOF_VA_LIST(ap) (&(ap))
|
||||
#endif
|
||||
|
||||
static JSBool
|
||||
TryArgumentFormatter(JSContext *cx, const char **formatp, JSBool fromJS,
|
||||
jsval **vpp, va_list *app)
|
||||
|
@ -494,7 +500,7 @@ PushArgumentsVA(JSContext *cx, uintN argc, jsval *argv, const char *format, va_l
|
|||
break;
|
||||
default:
|
||||
format--;
|
||||
if (!TryArgumentFormatter(cx, &format, JS_FALSE, &sp, &ap))
|
||||
if (!TryArgumentFormatter(cx, &format, JS_FALSE, &sp, JS_ADDRESSOF_VA_LIST(ap)))
|
||||
return false;
|
||||
/* NB: the formatter already updated sp, so we continue here. */
|
||||
continue;
|
||||
|
|
Загрузка…
Ссылка в новой задаче