From: Sebastian Pipping Date: Mon, 28 Aug 2017 19:38:44 +0000 (+0200) Subject: xmlwf: Address Clang Static Analyzer warning X-Git-Tag: R_2_2_5~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4661bfb85d02a32cc821a1fef582dd054263415;p=libexpat xmlwf: Address Clang Static Analyzer warning --- diff --git a/expat/Changes b/expat/Changes index 2c0cf103..26df63db 100644 --- a/expat/Changes +++ b/expat/Changes @@ -19,6 +19,7 @@ Release 2.2.5 ??????????????????? #126 #127 Windows: Fix compilation for Visual Studio 2012 #129 examples: Fix compilation for XML_UNICODE_WCHAR_T #130 benchmark: Fix compilation for XML_UNICODE_WCHAR_T + xmlwf: Address Clang Static Analyzer warning Special thanks to: Benbuck Nason diff --git a/expat/xmlwf/xmlwf.c b/expat/xmlwf/xmlwf.c index aca16415..a2e88df5 100644 --- a/expat/xmlwf/xmlwf.c +++ b/expat/xmlwf/xmlwf.c @@ -30,6 +30,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include #include #include #include @@ -105,6 +106,7 @@ attributeValue(FILE *fp, const XML_Char *s) { puttc(T('='), fp); puttc(T('"'), fp); + assert(s); for (;;) { switch (*s) { case 0: