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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user