ruby-changes:64110
From: Nobuyoshi <ko1@a...>
Date: Sat, 12 Dec 2020 14:27:37 +0900 (JST)
Subject: [ruby-changes:64110] 68af523529 (master): Added parentheses to silence sizeof-array-div warnings [Bug #17385]
https://git.ruby-lang.org/ruby.git/commit/?id=68af523529 From 68af5235292f82145c599038b4bff7d9225e62d7 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 12 Dec 2020 14:22:59 +0900 Subject: Added parentheses to silence sizeof-array-div warnings [Bug #17385] As well as 2366c681166a1dab95de6b9ca8ffcaae18aadd39. diff --git a/include/ruby/internal/core/rbasic.h b/include/ruby/internal/core/rbasic.h index 2b578b6..a6093c0 100644 --- a/include/ruby/internal/core/rbasic.h +++ b/include/ruby/internal/core/rbasic.h @@ -37,7 +37,7 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/core/rbasic.h#L37 /** @cond INTERNAL_MACRO */ #define RBIMPL_EMBED_LEN_MAX_OF(T) \ - RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) + RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / (sizeof(T)))) /** @endcond */ enum ruby_rvalue_flags { RVALUE_EMBED_LEN_MAX = 3 }; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/