Bump reference platform to Ubuntu 18.04 LTS (#3037)

Ubuntu 14.04 reached its end of life on April 30m 2019.
Let's bump the reference to the latest LTS, which is 18.04.

Ubuntu 18.04 has newer Pylint and Cppcheck, the necessary
fixes and suppresses are also included in this PR.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
This commit is contained in:
Csaba Osztrogonác
2020-03-30 12:26:56 +02:00
committed by GitHub
parent c237ba6097
commit 1bd1a36a81
25 changed files with 62 additions and 38 deletions
+2 -2
View File
@@ -697,7 +697,7 @@ ecma_number_parse_int (const lit_utf8_byte_t *string_buff, /**< routine's first
* string buffer's size */
ecma_value_t radix) /**< routine's second argument */
{
if (string_buff_size <= 0)
if (string_buff_size == 0)
{
return ecma_make_nan_value ();
}
@@ -874,7 +874,7 @@ ecma_number_parse_float (const lit_utf8_byte_t *string_buff, /**< routine's firs
lit_utf8_size_t string_buff_size) /**< routine's first argument's
* string buffer's size */
{
if (string_buff_size <= 0)
if (string_buff_size == 0)
{
return ecma_make_nan_value ();
}
@@ -40,6 +40,7 @@ JERRY_STATIC_ASSERT (sizeof (jmem_cpointer_t) <= sizeof (jmem_cpointer_tag_t),
#ifdef ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY
/* cppcheck-suppress zerodiv */
JERRY_STATIC_ASSERT (sizeof (uintptr_t) <= sizeof (ecma_value_t),
uintptr_t_must_fit_in_ecma_value_t);
@@ -349,6 +349,7 @@ ecma_instantiate_builtin (ecma_builtin_id_t obj_builtin_id) /**< built-in id */
ecma_object_t *prototype_obj_p;
/* cppcheck-suppress arrayIndexOutOfBoundsCond */
if (JERRY_UNLIKELY (object_prototype_builtin_id == ECMA_BUILTIN_ID__COUNT))
{
prototype_obj_p = NULL;
@@ -1296,7 +1296,9 @@ ecma_op_lazy_instantiate_prototype_object (ecma_object_t *object_p) /**< the fun
}
#endif /* ENABLED (JERRY_ES2015) */
#if ENABLED (JERRY_ES2015)
if (proto_object_p == NULL)
#endif /* ENABLED (JERRY_ES2015) */
{
proto_object_p = ecma_op_create_object_object_noarg ();
}
+1
View File
@@ -288,6 +288,7 @@ jmem_heap_gc_and_alloc_block (const size_t size, /**< required memory size */
void *data_space_p = jmem_heap_alloc (size);
/* cppcheck-suppress memleak */
while (JERRY_UNLIKELY (data_space_p == NULL) && JERRY_LIKELY (pressure < max_pressure))
{
pressure++;