From 3aeecb8a056e99352c5dff2a937e98af44d05f12 Mon Sep 17 00:00:00 2001 From: Alexander Mai Date: Wed, 27 Aug 2014 19:32:53 +0200 Subject: [PATCH] #6100 False positive nullPointer - calling mbstowcs(NULL,). wcstombs has also been fixed --- cfg/std.cfg | 4 ++-- test/testnullpointer.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cfg/std.cfg b/cfg/std.cfg index 098f6aa02..b30583835 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -197,14 +197,14 @@ false - + false - + diff --git a/test/testnullpointer.cpp b/test/testnullpointer.cpp index 8aea7490f..c4b45f59f 100644 --- a/test/testnullpointer.cpp +++ b/test/testnullpointer.cpp @@ -2562,6 +2562,12 @@ private: check("void f(char * p,char * q){ strtol (p,q,0);if(!p){}}"); ASSERT_EQUALS(errp,errout.str()); + + // #6100 False positive nullPointer - calling mbstowcs(NULL,) + check("size_t get (char *value) { return mbstowcs (NULL, value, 0); }"); + ASSERT_EQUALS("",errout.str()); + check("size_t get (wchar_t *value) { return wcstombs (NULL, value, 0); }"); + ASSERT_EQUALS("",errout.str()); } void nullpointerFputc() {