From 10da5d6d2f45a9ce7bce658b77ffc5ab53eee4e1 Mon Sep 17 00:00:00 2001 From: Martin Ettl Date: Mon, 21 Sep 2015 23:01:51 +0200 Subject: [PATCH] std.cfg: Added configuration for std::string:find. --- cfg/std.cfg | 15 +++++++++++++++ test/cfg/std.cpp | 16 +++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/cfg/std.cfg b/cfg/std.cfg index 96c1453c3..7842dc05f 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -3929,6 +3929,21 @@ + + + + + + false + + + + + + + + + diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 8a06c546a..73bb1d150 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -2852,7 +2852,7 @@ void uninitvar_setbase(void) std::cout << std::setbase(p); } -void uninivar_find(std::string s) +void uninitvar_find(std::string s) { // testing of size_t find (const string& str, size_t pos = 0) size_t pos; @@ -2860,11 +2860,21 @@ void uninivar_find(std::string s) (void)s.find("find",pos); // #6991 // testing of size_t find (const char* s, size_t pos = 0) const; - char *c; + char *pc; // cppcheck-suppress uninitvar - (void)s.find(c,0); + (void)s.find(pc,0); + // cppcheck-suppress uninitvar + (void)s.find(pc,pos); + + // testing of size_t find (char c, size_t pos = 0) const; + char c; // cppcheck-suppress uninitvar (void)s.find(c,pos); + + // testing of size_t find (const char* pc, size_t pos, size_t n) const; + size_t n; + // cppcheck-suppress uninitvar + (void)s.find(pc,pos,n); } void invalidFunctionArgBool_abs(bool b, double x, double y)