mirror of https://github.com/nodejs/node.git
src: fix compiler warning in smalloc.cc
Fix the following compiler warning by static_casting the enum values to an uint32_t: ../src/smalloc.cc: In function 'void node::smalloc::Initialize(v8::Handle<v8::Object>, v8::Handle<v8::Value>, v8::Handle<v8::Context>)': ../src/smalloc.cc:601:203: warning: enumeral and non-enumeral type in conditional expression EXTERNAL_ARRAY_TYPES(V) PR-URL: https://github.com/iojs/io.js/pull/1055 Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com>pull/1056/head
parent
8f5f12bb48
commit
fb284e2e4d
|
@ -592,14 +592,13 @@ void Initialize(Handle<Object> exports,
|
|||
|
||||
uint32_t kMinType = ~0;
|
||||
uint32_t kMaxType = 0;
|
||||
#define V(name, value) \
|
||||
#define V(name, value) \
|
||||
types->Set(FIXED_ONE_BYTE_STRING(env->isolate(), #name), \
|
||||
Uint32::NewFromUnsigned(env->isolate(), v8::value)); \
|
||||
kMinType = MIN(kMinType, v8::value); \
|
||||
kMaxType = MAX(kMinType, v8::value);
|
||||
|
||||
kMinType = MIN(kMinType, static_cast<uint32_t>(v8::value)); \
|
||||
kMaxType = MAX(kMinType, static_cast<uint32_t>(v8::value));
|
||||
EXTERNAL_ARRAY_TYPES(V)
|
||||
#undef V
|
||||
#undef V
|
||||
|
||||
exports->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "types"), types);
|
||||
exports->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "kMinType"),
|
||||
|
|
Loading…
Reference in New Issue