mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Change width to size_t to fix warning
This commit is contained in:
+2
-2
@@ -998,7 +998,7 @@ fix_xor(mrb_state *mrb, mrb_value x)
|
||||
#define NUMERIC_SHIFT_WIDTH_MAX (sizeof(mrb_int)*CHAR_BIT-1)
|
||||
|
||||
static mrb_value
|
||||
lshift(mrb_state *mrb, mrb_int val, int width)
|
||||
lshift(mrb_state *mrb, mrb_int val, size_t width)
|
||||
{
|
||||
if (width > NUMERIC_SHIFT_WIDTH_MAX) {
|
||||
mrb_raisef(mrb, E_RANGE_ERROR, "width(%S) > (%S:sizeof(mrb_int)*CHAR_BIT-1)",
|
||||
@@ -1010,7 +1010,7 @@ lshift(mrb_state *mrb, mrb_int val, int width)
|
||||
}
|
||||
|
||||
static mrb_value
|
||||
rshift(mrb_int val, int width)
|
||||
rshift(mrb_int val, size_t width)
|
||||
{
|
||||
if (width >= NUMERIC_SHIFT_WIDTH_MAX) {
|
||||
if (val < 0) {
|
||||
|
||||
Reference in New Issue
Block a user