Skip to content

Commit b808cfd

Browse files
committed
Warn on unused value
PullRequest: truffleruby/752
2 parents 5f18767 + ea08b72 commit b808cfd

File tree

4 files changed

+0
-27
lines changed

4 files changed

+0
-27
lines changed

lib/cext/include/internal.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
#define LIKELY(x) RB_LIKELY(x)
55
#define UNLIKELY(x) RB_UNLIKELY(x)
66

7-
#define RHASH_ST_TABLE(hash) (hash, false)
8-
#define RHASH_TBL_RAW(hash) (hash, false)
9-
107
#define STR_EMBED_P(str) (str, false)
118
#define STR_SHARED_P(str) (str, false)
129

lib/cext/include/ruby/st.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ CONSTFUNC(st_index_t st_hash_end(st_index_t h));
143143
CONSTFUNC(st_index_t st_hash_start(st_index_t h));
144144
#define st_hash_start(h) ((st_index_t)(h))
145145

146-
void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE);
147-
148146
RUBY_SYMBOL_EXPORT_END
149147

150148
#if defined(__cplusplus)

lib/truffle/rbconfig-for-mkmf.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
'-Wno-unknown-warning-option', # If we're on an earlier version of clang without a warning option, ignore it
7171
'-Wno-int-conversion', # MRI has VALUE defined as long while we have it as void*
7272
'-Wno-int-to-pointer-cast', # Same as above
73-
'-Wno-unused-value', # RB_GC_GUARD leaves
7473
'-Wno-incompatible-pointer-types', # Fix byebug 8.2.1 compile (st_data_t error)
7574
'-ferror-limit=500'
7675
].join(' ')

src/main/c/cext/st.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,25 +2289,4 @@ st_insert_generic(st_table *tab, long argc, const VALUE *argv, VALUE hash)
22892289
/* reindex */
22902290
st_rehash(tab);
22912291
}
2292-
2293-
/* Mimics ruby's { foo => bar } syntax. This function is subpart
2294-
of rb_hash_bulk_insert. */
2295-
void
2296-
rb_hash_bulk_insert_into_st_table(long argc, const VALUE *argv, VALUE hash)
2297-
{
2298-
st_index_t n, size = argc / 2;
2299-
st_table *tab = RHASH_ST_TABLE(hash);
2300-
2301-
tab = RHASH_TBL_RAW(hash);
2302-
n = tab->entries_bound + size;
2303-
st_expand_table(tab, n);
2304-
if (UNLIKELY(tab->num_entries))
2305-
st_insert_generic(tab, argc, argv, hash);
2306-
else if (argc <= 2)
2307-
st_insert_single(tab, hash, argv[0], argv[1]);
2308-
else if (tab->bin_power <= MAX_POWER2_FOR_TABLES_WITHOUT_BINS)
2309-
st_insert_linear(tab, argc, argv, hash);
2310-
else
2311-
st_insert_generic(tab, argc, argv, hash);
2312-
}
23132292
#endif

0 commit comments

Comments
 (0)