From f8f66aeea9ea7896e4c842fab2cdbf0e6b01c242 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Mon, 16 Jan 2023 22:08:31 +0100 Subject: [PATCH] Improve std.cfg: std::addressof(), std::stringstream::str() (#4710) * Improve std.cfg: std::addressof(), std::stringstream::str() * Format * Add --- cfg/std.cfg | 18 ++++++++++++++++++ test/cfg/std.cpp | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/cfg/std.cfg b/cfg/std.cfg index e6fc7c9cd..54543bded 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -6426,6 +6426,13 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + false + + + false @@ -6764,6 +6771,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + false @@ -6773,6 +6781,16 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + + + false + & arg1 + + + false diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 7605f5577..b0422ec2a 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -4550,3 +4550,9 @@ public: for (std::vector::reverse_iterator it = m_str.rbegin(); it != m_str.rend(); ++it) {;} } }; + +void addressof(int a) +{ + // cppcheck-suppress ignoredReturnValue + std::addressof(a); +} \ No newline at end of file