Actions
Bug #11343
closedrandom.c: getrandom compile error with clang
Description
random.c:526:8: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
ret = syscall(SYS_getrandom, seed, size, 0);
which does make the build of clang fail
and there is a warning in rb_ary_new
too
enum.c:766:11: warning: unused typedef 'static_assert_rb_ary_new_from_args_check' [-Wunused-local-typedef]
values = rb_ary_new3(1, i);
./include/ruby/intern.h:91:21: note: expanded from macro 'rb_ary_new3'
#define rb_ary_new3 rb_ary_new_from_args
./internal.h:649:6: note: expanded from macro 'rb_ary_new_from_args'
STATIC_ASSERT(rb_ary_new_from_args, numberof(args_to_new_ary) == (n)); \
./internal.h:79:48: note: expanded from macro 'STATIC_ASSERT'
# define STATIC_ASSERT(name, expr) typedef int static_assert_##name##_check[1 - 2*!(expr)]
<scratch space>:354:1: note: expanded from here
static_assert_rb_ary_new_from_args_check
Actions
Like0
Like0Like0Like0Like0