mjit_worker.c: explicitly ignore the unused result of RB_DEBUG_COUNTER_INC_IF
By adding `(void)`. This makes Coverity Scan happy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9d047fd3e5
commit
9249346c0b
@ -327,9 +327,9 @@ mjit_warning(const char *format, ...)
|
|||||||
static void
|
static void
|
||||||
add_to_list(struct rb_mjit_unit *unit, struct rb_mjit_unit_list *list)
|
add_to_list(struct rb_mjit_unit *unit, struct rb_mjit_unit_list *list)
|
||||||
{
|
{
|
||||||
RB_DEBUG_COUNTER_INC_IF(mjit_length_unit_queue, list == &unit_queue);
|
(void)RB_DEBUG_COUNTER_INC_IF(mjit_length_unit_queue, list == &unit_queue);
|
||||||
RB_DEBUG_COUNTER_INC_IF(mjit_length_active_units, list == &active_units);
|
(void)RB_DEBUG_COUNTER_INC_IF(mjit_length_active_units, list == &active_units);
|
||||||
RB_DEBUG_COUNTER_INC_IF(mjit_length_compact_units, list == &compact_units);
|
(void)RB_DEBUG_COUNTER_INC_IF(mjit_length_compact_units, list == &compact_units);
|
||||||
|
|
||||||
list_add_tail(&list->head, &unit->unode);
|
list_add_tail(&list->head, &unit->unode);
|
||||||
list->length++;
|
list->length++;
|
||||||
@ -1241,7 +1241,7 @@ mjit_worker(void)
|
|||||||
if (unit) {
|
if (unit) {
|
||||||
// JIT compile
|
// JIT compile
|
||||||
mjit_func_t func = convert_unit_to_func(unit);
|
mjit_func_t func = convert_unit_to_func(unit);
|
||||||
RB_DEBUG_COUNTER_INC_IF(mjit_compile_failures, func == (mjit_func_t)NOT_COMPILED_JIT_ISEQ_FUNC);
|
(void)RB_DEBUG_COUNTER_INC_IF(mjit_compile_failures, func == (mjit_func_t)NOT_COMPILED_JIT_ISEQ_FUNC);
|
||||||
|
|
||||||
// `mjit_copy_cache_from_main_thread` in `mjit_compile` may wait for a long time
|
// `mjit_copy_cache_from_main_thread` in `mjit_compile` may wait for a long time
|
||||||
// and worker may be stopped during the compilation.
|
// and worker may be stopped during the compilation.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user