Update cppcheck (#5108)

Re-enable cppcheck CI job

Update cppcheck suppression list:
    The new version of cppcheck raises warnings for many potential
    issues that are guarded against, so those warnings have been
    supressed.

Handle realloc failures:
    - jerry-ext/util/sources.c
    - jerry-port/common/jerry-port-io.c

Refactor test-snapshot: move each test to separate functions like some
others already were.

Rename `handler` variables inside `main` of `test-api.c` as they
shadowed the `handler` function in the same file.

JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
This commit is contained in:
Máté Tokodi
2023-11-22 11:36:45 +01:00
committed by GitHub
parent ff9ff8f36c
commit ef4cb2bf74
9 changed files with 293 additions and 235 deletions
+4
View File
@@ -71,6 +71,10 @@ jerry_port_line_read (jerry_size_t *out_size_p)
{
allocated += 64;
line_p = realloc (line_p, allocated);
if (line_p == NULL)
{
jerry_port_fatal (JERRY_FATAL_OUT_OF_MEMORY);
}
while (bytes < allocated - 1)
{