]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add assert in language_is_preprocessed
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 15 Oct 2018 19:04:51 +0000 (21:04 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 15 Oct 2018 19:04:51 +0000 (21:04 +0200)
This seems to make scan-build happy.

src/language.c

index fb72411f42cd0aed0d807d80e746d8e3aacba932..4c4a998bc8461ac9fe2a385ff7a1dbd9dc9ddad1 100644 (file)
@@ -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);
 }