Skip to content

Commit 1f37e07

Browse files
authored
Merge pull request #89 from lgeiger/type-missmatch
Fix Nan type missmatch warnings
2 parents 6de94b7 + 2f5dd0f commit 1f37e07

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

binding.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ namespace zmq {
655655
return Nan::ThrowError("Must pass an option");
656656
if (!info[0]->IsNumber())
657657
return Nan::ThrowTypeError("Option must be an integer");
658-
int64_t option = Nan::To<int64_t>(info[0]).FromJust();
658+
int option = Nan::To<int>(info[0]).FromJust();
659659

660660
GET_SOCKET(info);
661661

@@ -679,7 +679,7 @@ namespace zmq {
679679
return Nan::ThrowError("Must pass an option and a value");
680680
if (!info[0]->IsNumber())
681681
return Nan::ThrowTypeError("Option must be an integer");
682-
int64_t option = Nan::To<int64_t>(info[0]).FromJust();
682+
int option = Nan::To<int>(info[0]).FromJust();
683683
GET_SOCKET(info);
684684

685685
if (opts_int.count(option)) {
@@ -1082,7 +1082,7 @@ namespace zmq {
10821082
int flags = 0;
10831083
int64_t more = 1;
10841084
size_t more_size = sizeof(more);
1085-
size_t index = 0;
1085+
uint32_t index = 0;
10861086

10871087
Local<Array> result = Nan::New<Array>();
10881088

@@ -1252,7 +1252,7 @@ namespace zmq {
12521252
if (len % 2 != 0)
12531253
return Nan::ThrowTypeError("Batch length must be even!");
12541254

1255-
for (size_t i = 0; i < len; i += 2) {
1255+
for (uint32_t i = 0; i < len; i += 2) {
12561256
if (checkPollOut) {
12571257
while (zmq_getsockopt(socket->socket_, ZMQ_EVENTS, &events, &events_size)) {
12581258
if (zmq_errno() != EINTR)

0 commit comments

Comments
 (0)