Commits

Anonymous committed 62b0daa

Fix two signedness issues.

Comments (0)

Files changed (2)

 arana_compiler_get_stack_size(AR_SIG, ArCodeUnit *unit)
 {
     ArOp op;
-    Ar_size_t depth = 0, max_depth = 0;
+    int depth = 0, max_depth = 0;
 
 #define ON_OPCODE(x) case AR_OP_##x
 #define RECORD(x) \

arana/primitives.h

 #define AR_BOOLEAN(x) ((x) ? AR_TRUE : AR_FALSE)
 #define AR_INTEGER(x) (AR)((((long)(x)) << 1) + 1)
 
-#define AR_AS_LONG(x) (long)(x >> 1)
-#define AR_AS_SIZET(x) (Ar_size_t)(x >> 1)
+#define AR_AS_LONG(x) ((long)x >> 1)
+#define AR_AS_SIZET(x) ((Ar_size_t)x >> 1)
 
 AR_API_DATA(ArObjectType) ArBooleanType;
 AR_API_DATA(ArObjectType) ArNoneType;