Skip to content

Commit

Permalink
FIX: fixes based on some warnings from Clang
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Oct 16, 2018
1 parent bfc528a commit ab75f8f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/core/u-bincode.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
#include <stdio.h>
#include <time.h>

#define ASSERT_SI_RANGE(v, n) if (VAL_INT32(v) < (- n) || VAL_INT32(v) > n) Trap1(RE_OUT_OF_RANGE, v);
#define ASSERT_SI_RANGE(v, n) if (VAL_INT64(v) < (- (i64)n) || VAL_INT64(v) > (i64)n) Trap1(RE_OUT_OF_RANGE, v);
#define ASSERT_UI_RANGE(v, n) if (VAL_INT32(v) > n) Trap1(RE_OUT_OF_RANGE, v);
#define ASSERT_UIBYTES_RANGE(v, n) if (VAL_LEN(v) > n) Trap1(RE_OUT_OF_RANGE, v);
#define ASSERT_U32_RANGE(v) if((i64)VAL_UNT64(v) > (i64)0xFFFFFFFFLL || (i64)VAL_UNT64(v) < (i64)0xFFFFFFFF00000001LL) Trap1(RE_OUT_OF_RANGE, v);
Expand Down Expand Up @@ -444,9 +444,9 @@ system/standard/bincode: make object! [

value = VAL_BLK(val_write); //resets value at head of the input block

/*********************************************************
/* Do real WRITE evaluation ******************************
/*********************************************************/
//#########################################################
//## Do real WRITE evaluation #############################
//#########################################################

cp = BIN_DATA(bin) + VAL_INDEX(buffer_write);

Expand Down Expand Up @@ -588,7 +588,6 @@ system/standard/bincode: make object! [
ASSERT_SI_RANGE(next, 0x7FFFFFFF);
goto write_ui32;
case SYM_SI64:
ASSERT_SI_RANGE(next, 0x7FFFFFFFFFFFFFFF);
goto write_ui64;

case SYM_BYTES:
Expand Down

0 comments on commit ab75f8f

Please sign in to comment.