Project

General

Profile

Actions

Bug #15299

closed

hash.c: warning: ‘bin’ may be used uninitialized in this function

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

Status:
Closed
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-12-09 trunk 66296) [x86_64-linux]
[ruby-core:89780]

Description

When compiling the latest version of trunk, I get some warnings in hash.c, as follows:

compiling hash.c
hash.c: In function ‘linear_update’:
hash.c:849:24: warning: ‘bin’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             clear_entry(RHASH_ARRAY_REF(hash, bin));
                        ^
hash.c: In function ‘rb_hash_stlike_update’:
hash.c:849:24: warning: ‘bin’ may be used uninitialized in this function [-Wmaybe-uninitialized]
hash.c:811:14: note: ‘bin’ was declared here
     unsigned bin;
              ^

This warning appeared already when I reported issue #15279, but I didn't mention it because I hoped it would also disappear when #15279 was fixed.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0