From 3bdb9aa8fa3d1f8a7b074f7e10c94beea441b20c Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 15 Oct 2018 21:04:51 +0200 Subject: [PATCH] Add assert in language_is_preprocessed This seems to make scan-build happy. --- src/language.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); } -- 2.47.2