summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2018-10-15 21:04:51 +0200
committerJoel Rosdahl <joel@rosdahl.net>2018-10-15 21:04:51 +0200
commit3bdb9aa8fa3d1f8a7b074f7e10c94beea441b20c (patch)
tree8e12d9d7aad85fc785ae77be25610edd3d40cc87
parent9aee2de100ca21aaed1e0c4780da54d1266e2116 (diff)
downloadccache-3bdb9aa8fa3d1f8a7b074f7e10c94beea441b20c.tar.gz
Add assert in language_is_preprocessed
This seems to make scan-build happy.
-rw-r--r--src/language.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/language.c b/src/language.c
index fb72411f..4c4a998b 100644
--- a/src/language.c
+++ b/src/language.c
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
@@ -176,5 +176,7 @@ language_is_supported(const char *language)
bool
language_is_preprocessed(const char *language)
{
- return str_eq(language, p_language_for_language(language));
+ const char *p_language = p_language_for_language(language);
+ assert(p_language);
+ return str_eq(language, p_language);
}