Remove the ENABLED/DISABLED macros (#4515)

The removal of these macros enabled cppcheck to reveal new errors.
These errors are also fixed by the patch.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2021-02-04 23:47:05 +01:00
committed by GitHub
parent e01c2549d7
commit 0628ae1e7b
337 changed files with 5186 additions and 5191 deletions
+6 -6
View File
@@ -73,11 +73,11 @@ main (void)
ecma_free_value (negative);
TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));
#if ENABLED (JERRY_ESNEXT)
#if JERRY_ESNEXT
TEST_ASSERT (num == 0);
#else /* !ENABLED (JERRY_ESNEXT) */
#else /* !JERRY_ESNEXT */
TEST_ASSERT (num == 4294967270);
#endif /* ENABLED (JERRY_ESNEXT) */
#endif /* JERRY_ESNEXT */
/* +infinity */
ecma_value_t positive_infinity = ecma_make_number_value (ecma_number_make_infinity (false));
@@ -87,11 +87,11 @@ main (void)
ecma_free_value (positive_infinity);
TEST_ASSERT (!ECMA_IS_VALUE_ERROR (result));
#if ENABLED (JERRY_ESNEXT)
#if JERRY_ESNEXT
TEST_ASSERT ((ecma_number_t) num == ECMA_NUMBER_MAX_SAFE_INTEGER);
#else /* !ENABLED (JERRY_ESNEXT) */
#else /* !JERRY_ESNEXT */
TEST_ASSERT (num == 0);
#endif /* ENABLED (JERRY_ESNEXT) */
#endif /* JERRY_ESNEXT */
/* -infinity */
ecma_value_t negative_infinity = ecma_make_number_value (ecma_number_make_infinity (true));