Skip to content

Commit

Permalink
grn_expr: use unsigned_integer_operation for UINT8 and UINT16
Browse files Browse the repository at this point in the history
To suppress warnings:
  comparison is always false due to limited range of data type
  • Loading branch information
s-yata committed Oct 30, 2015
1 parent 2f7e6d5 commit fa4f1a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/expr.c
Expand Up @@ -1782,7 +1782,7 @@ grn_proc_call(grn_ctx *ctx, grn_obj *proc, int nargs, grn_obj *caller)
int y_; \
y_ = GRN_UINT8_VALUE(y); \
ARITHMETIC_OPERATION_ZERO_DIVISION_CHECK(y_); \
set(ctx, res, signed_integer_operation(x_, y_)); \
set(ctx, res, unsigned_integer_operation(x_, y_)); \
} \
break; \
case GRN_DB_INT16 : \
Expand All @@ -1798,7 +1798,7 @@ grn_proc_call(grn_ctx *ctx, grn_obj *proc, int nargs, grn_obj *caller)
int y_; \
y_ = GRN_UINT16_VALUE(y); \
ARITHMETIC_OPERATION_ZERO_DIVISION_CHECK(y_); \
set(ctx, res, signed_integer_operation(x_, y_)); \
set(ctx, res, unsigned_integer_operation(x_, y_)); \
} \
break; \
case GRN_DB_INT32 : \
Expand Down

0 comments on commit fa4f1a3

Please sign in to comment.