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() {