From: Joel Rosdahl Date: Mon, 15 Oct 2018 19:04:51 +0000 (+0200) Subject: Add assert in language_is_preprocessed X-Git-Tag: v3.5~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bdb9aa8fa3d1f8a7b074f7e10c94beea441b20c;p=thirdparty%2Fccache.git Add assert in language_is_preprocessed This seems to make scan-build happy. --- diff --git a/src/language.c b/src/language.c index fb72411f4..4c4a998bc 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); }