aboutsummaryrefslogtreecommitdiff
path: root/jerry-main
diff options
context:
space:
mode:
authorAkos Kiss <akiss@inf.u-szeged.hu>2018-05-24 08:48:34 +0200
committeryichoi <duddlf.choi@samsung.com>2018-05-24 15:48:34 +0900
commit06910b456e80d9f856630fca3a7d79036a640c6e (patch)
tree962e5adf595feeedae225a7f2094c2f398c582ce /jerry-main
parent9eb9fbf5f12fba7511481d0cabb25a2020d7b710 (diff)
Fix issues revealed by cppcheck 1.83 (#2355)
A more recent cppcheck has revealed some extra issues not detected by the old one running on CI. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Diffstat (limited to 'jerry-main')
-rw-r--r--jerry-main/cli.c2
-rw-r--r--jerry-main/main-unix.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/jerry-main/cli.c b/jerry-main/cli.c
index 77a7c755..1f8c878f 100644
--- a/jerry-main/cli.c
+++ b/jerry-main/cli.c
@@ -362,7 +362,7 @@ cli_print_help (const char *help) /**< the help message to print */
cli_print_prefix (help, length);
help += length;
- while (*help == ' ' && *help != 0)
+ while (*help == ' ')
{
help++;
}
diff --git a/jerry-main/main-unix.c b/jerry-main/main-unix.c
index d7dd3925..61d666c2 100644
--- a/jerry-main/main-unix.c
+++ b/jerry-main/main-unix.c
@@ -121,7 +121,7 @@ print_unhandled_exception (jerry_value_t error_value) /**< error value */
if (str_size >= 256)
{
- printf ("%3d: [Backtrace string too long]\n", i);
+ printf ("%3u: [Backtrace string too long]\n", i);
}
else
{
@@ -129,7 +129,7 @@ print_unhandled_exception (jerry_value_t error_value) /**< error value */
assert (string_end == str_size);
err_str_buf[string_end] = 0;
- printf ("%3d: %s\n", i, err_str_buf);
+ printf ("%3u: %s\n", i, err_str_buf);
}
}