Update jerry-libc unreachable asserts (#1379)

Newer compilers (especially clang) warn (and fail) on
`assert (!"message");` constructs typically used to assert on
unreachable code paths (multiple occurrences in jerry-libc). A more
up-to-date approach is to use `assert (false && "message");`. This
patch applies the pattern to all relevant asserts in jerry-libc.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2016-09-29 16:17:46 +02:00
committed by GitHub
parent e2aa714565
commit 509407bfd4
2 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -134,13 +134,13 @@ fopen (const char *path, /**< file path */
create_if_not_exist = true;
if (mode[1] == '+')
{
assert (!"unsupported mode a+");
assert (false && "unsupported mode a+");
}
break;
}
default:
{
assert (!"unsupported mode");
assert (false && "unsupported mode");
}
}