Fix misc. compiler warnings (#2202)
JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
This commit is contained in:
committed by
Zoltan Herczeg
parent
6fce323fa5
commit
b8656877e2
@@ -313,7 +313,8 @@ jerry_get_memory_stats (jerry_heap_stats_t *out_stats_p) /**< [out] heap memory
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
jmem_heap_stats_t jmem_heap_stats = {0};
|
jmem_heap_stats_t jmem_heap_stats;
|
||||||
|
memset (&jmem_heap_stats, 0, sizeof (jmem_heap_stats));
|
||||||
jmem_heap_get_stats (&jmem_heap_stats);
|
jmem_heap_get_stats (&jmem_heap_stats);
|
||||||
|
|
||||||
*out_stats_p = (jerry_heap_stats_t)
|
*out_stats_p = (jerry_heap_stats_t)
|
||||||
@@ -992,7 +993,7 @@ jerry_get_error_type (const jerry_value_t value) /**< api value */
|
|||||||
ecma_object_t *object_p = ecma_get_object_from_value (object);
|
ecma_object_t *object_p = ecma_get_object_from_value (object);
|
||||||
ecma_standard_error_t error_type = ecma_get_error_type (object_p);
|
ecma_standard_error_t error_type = ecma_get_error_type (object_p);
|
||||||
|
|
||||||
return error_type;
|
return (jerry_error_t) error_type;
|
||||||
} /* jerry_get_error_type */
|
} /* jerry_get_error_type */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ int main (void)
|
|||||||
jerry_value_t res = jerry_run (parsed_code_val);
|
jerry_value_t res = jerry_run (parsed_code_val);
|
||||||
TEST_ASSERT (!jerry_value_has_error_flag (res));
|
TEST_ASSERT (!jerry_value_has_error_flag (res));
|
||||||
|
|
||||||
jerry_heap_stats_t stats = {0};
|
jerry_heap_stats_t stats;
|
||||||
|
memset (&stats, 0, sizeof (stats));
|
||||||
bool get_stats_ret = jerry_get_memory_stats (&stats);
|
bool get_stats_ret = jerry_get_memory_stats (&stats);
|
||||||
TEST_ASSERT (get_stats_ret);
|
TEST_ASSERT (get_stats_ret);
|
||||||
TEST_ASSERT (stats.version == 1);
|
TEST_ASSERT (stats.version == 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user