From ef82477d111e4ad90dc8834f565e2a5558974a36 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Wed, 30 May 2018 16:04:40 +0200 Subject: [PATCH] std.cfg: Do not take the return value of std::locale::global() into account. --- cfg/std.cfg | 3 +-- test/cfg/std.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cfg/std.cfg b/cfg/std.cfg index 2fbfa571e..e0a76e0a6 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -4898,9 +4898,8 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun false - + - false diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 9ad14ddd4..db51d4f9d 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -3071,6 +3071,12 @@ void ignoredReturnValue_string_compare(std::string teststr, std::wstring testwst testwstr.compare(L"wtest"); } +void ignoredReturnValue_locale_global(const std::locale& loc) +{ + // no ignoredReturnValue shall be shown for + std::locale::global(loc); +} + void ignoredReturnValue_make_pair() { // cppcheck-suppress ignoredReturnValue