From 58d7b8a3f2d0e4b3eabbdd57beed1fe4f574d067 Mon Sep 17 00:00:00 2001 From: Martin Ettl Date: Sun, 16 Aug 2015 14:49:35 +0200 Subject: [PATCH] std.cfg: Added more test cases. --- cfg/std.cfg | 24 +----------------------- test/cfg/std.c | 13 +++++++++++++ test/cfg/std.cpp | 13 +++++++++++++ 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/cfg/std.cfg b/cfg/std.cfg index 0019661fc..ffbc5dccc 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -484,31 +484,9 @@ - - - - false - - - - - - - - - - - false - - - - - - - - + false diff --git a/test/cfg/std.c b/test/cfg/std.c index 71e72aa98..e11da2b90 100644 --- a/test/cfg/std.c +++ b/test/cfg/std.c @@ -793,6 +793,19 @@ void uninitvar_atan2(void) (void)atan2l(ld1,ld2); } +void uninitvar_atol(void) +{ + char * c; + // cppcheck-suppress uninitvar + (void)atoi(c); + + // cppcheck-suppress uninitvar + (void)atol(c); + + // cppcheck-suppress uninitvar + (void)atoll(c); +} + void ignoreretrn(void) { char szNumbers[] = "2001 60c0c0 -1101110100110100100000 0x6fffff"; diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 6653b9508..c63757ef1 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -341,3 +341,16 @@ void uninitvar_atan2(void) // cppcheck-suppress uninitvar (void)std::atan2(ld1,ld2); } + +void uninitvar_atol(void) +{ + char * c; + // cppcheck-suppress uninitvar + (void)std::atoi(c); + + // cppcheck-suppress uninitvar + (void)std::atol(c); + + // cppcheck-suppress uninitvar + (void)std::atoll(c); +}