Project

General

Profile

Actions

Bug #15279

closed

Lots of warnings about signed and unsigned types for macro RHASH_SIZE

Added by duerst (Martin Dürst) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Target version:
-
[ruby-core:89688]

Description

When trying to compile the latest version of Ruby, I get a lot of warnings such as the following:

compiling array.c
In file included from transient_heap.h:12:0,
                 from array.c:21:
array.c: In function ‘rb_ary_uniq_bang’:
internal.h:766:74: warning: signed and unsigned type in conditional expression [-Wsign-compare]
 #  define RHASH_SIZE(h)      (RHASH_ARRAY_P(h) ? RHASH_ARRAY_SIZE_RAW(h) : RHASH_ST_SIZE(h))
                                                                                                                              ^
array.c:4864:17: note: in expansion of macro ‘RHASH_SIZE’
     hash_size = RHASH_SIZE(hash);
                 ^

I have attached a longer list in a file.

The version of Ruby I used for compilation is ruby 2.4.0dev (2016-06-09 trunk 55334) [x86_64-linux], but that should be unrelated.


Files

20181103bug.txt (42.7 KB) 20181103bug.txt duerst (Martin Dürst), 11/03/2018 03:19 AM
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r65512.


internal.h: RHASH_ARRAY_SIZE_RAW value is unsigned

and get rid of warnings. [ruby-core:89688] [Bug #15279]

Actions

Also available in: Atom PDF

Like0
Like0