Skip to content

Commit c99fd62

Browse files
committed
Fix VS2010 build errors on return types
1 parent a3986b3 commit c99fd62

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/unpack.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ static inline msgpack_unpack_return unpacker_next(msgpack_unpacker* mpac,
537537
if(ret < 0) {
538538
result->zone = NULL;
539539
memset(&result->data, 0, sizeof(msgpack_object));
540-
return ret;
540+
return (msgpack_unpack_return)ret;
541541
}
542542

543543
if(ret == 0) {
@@ -552,7 +552,7 @@ static inline msgpack_unpack_return unpacker_next(msgpack_unpacker* mpac,
552552
msgpack_unpack_return msgpack_unpacker_next(msgpack_unpacker* mpac,
553553
msgpack_unpacked* result)
554554
{
555-
int ret;
555+
msgpack_unpack_return ret;
556556

557557
ret = unpacker_next(mpac, result);
558558
if (ret == MSGPACK_UNPACK_SUCCESS) {
@@ -566,7 +566,7 @@ msgpack_unpack_return
566566
msgpack_unpacker_next_with_size(msgpack_unpacker* mpac,
567567
msgpack_unpacked* result, size_t *p_bytes)
568568
{
569-
int ret;
569+
msgpack_unpack_return ret;
570570

571571
ret = unpacker_next(mpac, result);
572572
if (ret == MSGPACK_UNPACK_SUCCESS || ret == MSGPACK_UNPACK_CONTINUE) {
@@ -601,7 +601,7 @@ msgpack_unpack(const char* data, size_t len, size_t* off,
601601

602602
e = template_execute(&ctx, data, len, &noff);
603603
if(e < 0) {
604-
return e;
604+
return (msgpack_unpack_return)e;
605605
}
606606

607607
if(off != NULL) { *off = noff; }
@@ -655,7 +655,7 @@ msgpack_unpack_next(msgpack_unpacked* result,
655655
if(e < 0) {
656656
msgpack_zone_free(result->zone);
657657
result->zone = NULL;
658-
return e;
658+
return (msgpack_unpack_return)e;
659659
}
660660

661661
if(e == 0) {

0 commit comments

Comments
 (0)