1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

SIZE_MAX is not size_t on emscripten

This commit is contained in:
Nobuyoshi Nakada 2021-08-16 14:02:13 +09:00
parent 54199a3f5f
commit ee7bd7d732
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2021-08-16 18:32:53 +09:00

6
gc.c
View file

@ -193,7 +193,7 @@ size_mul_or_raise(size_t x, size_t y, VALUE exc)
"integer overflow: %"PRIuSIZE
" * %"PRIuSIZE
" > %"PRIuSIZE,
x, y, SIZE_MAX);
x, y, (size_t)SIZE_MAX);
}
}
@ -220,7 +220,7 @@ size_mul_add_or_raise(size_t x, size_t y, size_t z, VALUE exc)
" * %"PRIuSIZE
" + %"PRIuSIZE
" > %"PRIuSIZE,
x, y, z, SIZE_MAX);
x, y, z, (size_t)SIZE_MAX);
}
}
@ -248,7 +248,7 @@ size_mul_add_mul_or_raise(size_t x, size_t y, size_t z, size_t w, VALUE exc)
" + %"PRIdSIZE
" * %"PRIdSIZE
" > %"PRIdSIZE,
x, y, z, w, SIZE_MAX);
x, y, z, w, (size_t)SIZE_MAX);
}
}