<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Activity for cppcheck</title><link>https://sourceforge.net/p/cppcheck/activity/</link><description>Recent activity for cppcheck</description><language>en</language><lastBuildDate>Wed, 23 Sep 2026 07:52:04 -0000</lastBuildDate><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/2a77b49dd0/?limit=25#eac2</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15061</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Wed, 23 Sep 2026 07:52:04 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/2a77b49dd0/?limit=25#eac2</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/8153adffbd/?limit=25#e245</link><description>Added here: https://trac.cppcheck.net/ticket/11563</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 22 Sep 2026 13:44:53 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/8153adffbd/?limit=25#e245</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/27c47ba02a/?limit=25#7fc6</link><description>The false negative with visible function definition looks similar to https://trac.cppcheck.net/ticket/14804</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 22 Sep 2026 11:05:05 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/27c47ba02a/?limit=25#7fc6</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/6959e3f9b9/?limit=25#a9bb</link><description>Added here: https://trac.cppcheck.net/ticket/15058</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 22 Sep 2026 07:45:38 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/6959e3f9b9/?limit=25#a9bb</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/170605db86/?limit=25#28b0</link><description>I don't get a syntaxError with latest head.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 22 Sep 2026 07:31:20 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/170605db86/?limit=25#28b0</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/e5253f7d19/?limit=25#5deb</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15059</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 22 Sep 2026 07:30:32 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/e5253f7d19/?limit=25#5deb</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/e5253f7d19/?limit=25#a440</link><description>Hi, I found a false negative in Cppcheck 2.21.0 when a boolean comparison result is multiplied into the divisor. Affected tool Cppcheck 2.21.0 Affected checker Cppcheck CheckOther::checkZeroDivision (zerodiv / zerodivcond) Minimal reproducer int divide_by_boolean_product(int x, int y) { int divisor = (x &lt; 0) * y; return 1 / divisor; } Reproduction command cppcheck --version cppcheck --enable=warning --std=c11 --checkers-report=checkers.txt --template='{file}:{line}:{column}: [{id}] {message}' cppcheck-zerodiv-fn-boolean-product.c...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Mon, 21 Sep 2026 19:15:38 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/e5253f7d19/?limit=25#a440</guid></item><item><title>lamoda posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/170605db86/?limit=25#d0eb</link><description>template &lt;typename T&gt; concept TQueue = requires(const T &amp; t) { { t.empty() } -&gt; std::same_as&lt;bool&gt;; }; it seems all ok was till version 2.20.0</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">lamoda</dc:creator><pubDate>Mon, 21 Sep 2026 19:04:59 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/170605db86/?limit=25#d0eb</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/7d21e27a45/?limit=25#6618</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15058</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Mon, 21 Sep 2026 14:19:38 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/7d21e27a45/?limit=25#6618</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/71f44d08b6/?limit=25#2f18</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15057</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Mon, 21 Sep 2026 14:06:09 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/71f44d08b6/?limit=25#2f18</guid></item><item><title>Nikita Leontiev posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/27c47ba02a/?limit=25#372f</link><description>Ticket is marked as fixed, but initial case is not fixed in cppcheck 2.22.0.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nikita Leontiev</dc:creator><pubDate>Mon, 21 Sep 2026 12:08:53 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/27c47ba02a/?limit=25#372f</guid></item><item><title>Nikita Leontiev posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/6959e3f9b9/?limit=25#7505</link><description>cppcheck 2.22.0 generates unusedPrivateFunction and unusedFunction for the following code: #define CASE(msg, handler) \ case msg: CASE_##msg((handler)) #define MSG1 1 #define CASE_MSG1(handler) handler() class Object { private: int m_num; public: Object() : m_num(0) {} static void msg_proc(int msg, void *context) { switch (msg) { CASE(MSG1, reinterpret_cast&lt;Object*&gt;(context)-&gt;msg1_handler); } } private: void msg1_handler() { m_num = 1; } }; int main() { Object obj; Object::msg_proc(MSG1, reinterpret_cast&lt;void*&gt;(&amp;obj));...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nikita Leontiev</dc:creator><pubDate>Mon, 21 Sep 2026 11:54:56 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/6959e3f9b9/?limit=25#7505</guid></item><item><title>Nikita Leontiev posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/7d21e27a45/?limit=25#7858</link><description>cppcheck 2.22.0 generates functionStatic for the following code: #define CASE(index, method) \ case index: return CASE_##method((method)) #define CASE_method1(method) method() class Object { private: int m_num; public: Object() : m_num(0) {} void call(int index) { switch (index) { CASE(1, method1); } } private: void method1() { m_num = 1; } }; int main() { Object().call(1); return 0; } test\main.cpp:11:7: style: The member function 'Object::call' can be static. [functionStatic] void call(int index)...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nikita Leontiev</dc:creator><pubDate>Mon, 21 Sep 2026 10:47:57 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/7d21e27a45/?limit=25#7858</guid></item><item><title>Nikita Leontiev posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/71f44d08b6/?limit=25#af9c</link><description>cppcheck 2.22.0 generates noDestructor for the following code: #include &lt;windows.h&gt; class NonCopyable { protected: NonCopyable() {} private: NonCopyable(const NonCopyable&amp;); NonCopyable&amp; operator=(const NonCopyable&amp;); }; class Brush : public NonCopyable { private: HBRUSH m_brush; public: explicit Brush(HBRUSH brush) : m_brush(brush) {} ~Brush() { if (m_brush) DeleteObject(m_brush); } }; class GDI : public NonCopyable { private: Brush m_brush; public: GDI() : m_brush(CreateSolidBrush(RGB(0, 0, 0)))...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nikita Leontiev</dc:creator><pubDate>Mon, 21 Sep 2026 09:23:03 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/71f44d08b6/?limit=25#af9c</guid></item><item><title>cppcheck released /cppcheck/2.22/README.md</title><link>https://sourceforge.net/projects/cppcheck/files/cppcheck/2.22/README.md/download</link><description/><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">cppcheck</dc:creator><pubDate>Sun, 20 Sep 2026 07:14:07 -0000</pubDate><guid>https://sourceforge.net/projects/cppcheck/files/cppcheck/2.22/README.md/download</guid></item><item><title>cppcheck released /cppcheck/2.22/cppcheck-2.22.0.zip</title><link>https://sourceforge.net/projects/cppcheck/files/cppcheck/2.22/cppcheck-2.22.0.zip/download</link><description/><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">cppcheck</dc:creator><pubDate>Sun, 20 Sep 2026 07:14:07 -0000</pubDate><guid>https://sourceforge.net/projects/cppcheck/files/cppcheck/2.22/cppcheck-2.22.0.zip/download</guid></item><item><title>cppcheck released /cppcheck/2.22/cppcheck-2.22.0.tar.gz</title><link>https://sourceforge.net/projects/cppcheck/files/cppcheck/2.22/cppcheck-2.22.0.tar.gz/download</link><description/><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">cppcheck</dc:creator><pubDate>Sun, 20 Sep 2026 07:14:07 -0000</pubDate><guid>https://sourceforge.net/projects/cppcheck/files/cppcheck/2.22/cppcheck-2.22.0.tar.gz/download</guid></item><item><title>cppcheck released /cppcheck/2.22/cppcheck-2.22.0.tar.bz2</title><link>https://sourceforge.net/projects/cppcheck/files/cppcheck/2.22/cppcheck-2.22.0.tar.bz2/download</link><description/><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">cppcheck</dc:creator><pubDate>Sun, 20 Sep 2026 07:14:07 -0000</pubDate><guid>https://sourceforge.net/projects/cppcheck/files/cppcheck/2.22/cppcheck-2.22.0.tar.bz2/download</guid></item><item><title>Daniel Marjamäki created a blog post</title><link>https://sourceforge.net/p/cppcheck/news/2026/09/cppcheck-2220/</link><description>Cppcheck 2.22.0</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Marjamäki</dc:creator><pubDate>Sat, 19 Sep 2026 18:48:18 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/news/2026/09/cppcheck-2220/</guid></item><item><title>cppcheck released /cppcheck/2.22/cppcheck-2.22.0-x64-Setup.msi</title><link>https://sourceforge.net/projects/cppcheck/files/cppcheck/2.22/cppcheck-2.22.0-x64-Setup.msi/download</link><description/><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">cppcheck</dc:creator><pubDate>Sat, 19 Sep 2026 18:26:08 -0000</pubDate><guid>https://sourceforge.net/projects/cppcheck/files/cppcheck/2.22/cppcheck-2.22.0-x64-Setup.msi/download</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/8e23bd1078/?limit=25#38a4</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15052</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Fri, 18 Sep 2026 07:55:52 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/8e23bd1078/?limit=25#38a4</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/da4d0975cb/?limit=25#09d8</link><description>Example added here: https://trac.cppcheck.net/ticket/14239</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Fri, 18 Sep 2026 07:43:36 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/da4d0975cb/?limit=25#09d8</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/e34e317956/?limit=25#f4e1</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15051</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Fri, 18 Sep 2026 07:41:00 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/e34e317956/?limit=25#f4e1</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/58b1fee0e3/?limit=25#05db</link><description>See https://trac.cppcheck.net/ticket/10</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Fri, 18 Sep 2026 07:29:24 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/58b1fee0e3/?limit=25#05db</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/b103de764f/?limit=25#28cd</link><description>See https://trac.cppcheck.net/ticket/14239</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Fri, 18 Sep 2026 06:44:13 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/b103de764f/?limit=25#28cd</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/8153adffbd/?limit=25#e45b</link><description>Hi, I found a false negative in Cppcheck 2.21.0 and 2.22 dev when destruction of a temporary object changes a global value to zero before a division. Affected tool Cppcheck 2.21.0; also reproduced with Cppcheck 2.22 dev Affected checker Cppcheck CheckOther::checkZeroDivision (zerodiv / zerodivcond) Minimal reproducer int global; struct Value { Value() { global = 1; } ~Value() { global = 0; } }; int test() { Value{}; return 1 / global; } Reproduction command cppcheck --version cppcheck --enable=warning...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Thu, 17 Sep 2026 17:21:32 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/8153adffbd/?limit=25#e45b</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/e34e317956/?limit=25#f969</link><description>Hi, I found a false negative in Cppcheck 2.21.0 and 2.22 dev when a constant argument makes a division inside a function-template instantiation divide by zero. Affected tool Cppcheck 2.21.0; also reproduced with Cppcheck 2.22 dev Affected checker Cppcheck CheckOther::checkZeroDivision (zerodiv / zerodivcond) Minimal reproducer bool unknown(); template &lt;class T&gt; void divide(T value) { if (unknown()) value = 1 / (value - 5); } void test() { divide&lt;int&gt;(5); } Reproduction command cppcheck --version...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Thu, 17 Sep 2026 17:20:09 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/e34e317956/?limit=25#f969</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/58b1fee0e3/?limit=25#edfd</link><description>Hi, I found a false negative in Cppcheck 2.21.0 when a switch case constrains the divisor to zero. Affected tool Cppcheck 2.21.0 Affected checker Cppcheck CheckOther::checkZeroDivision (zerodiv / zerodivcond) Minimal reproducer int divide_in_zero_case(int value) { switch (value) { case 0: return 1 / value; default: return 0; } } Reproduction command cppcheck --version cppcheck --enable=warning --std=c11 --checkers-report=checkers.txt --template='{file}:{line}:{column}: [{id}] {message}' cppcheck-zerodiv-fn-switch-case.c...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Thu, 17 Sep 2026 17:19:34 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/58b1fee0e3/?limit=25#edfd</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/da4d0975cb/?limit=25#3fe6</link><description>Hi, I found a false negative in Cppcheck 2.21.0 and 2.22 dev when a helper writes zero through a pointer before the pointed-to value is used as a divisor. Affected tool Cppcheck 2.21.0; also reproduced with Cppcheck 2.22 dev Affected checker Cppcheck CheckOther::checkZeroDivision (zerodiv / zerodivcond) Minimal reproducer void set_zero(int *value) { *value = 0; } int test() { int value; set_zero(&amp;value); return 1 / value; } Reproduction command cppcheck --version cppcheck --enable=warning --std=c++17...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Thu, 17 Sep 2026 17:18:25 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/da4d0975cb/?limit=25#3fe6</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/2a77b49dd0/?limit=25#78f6</link><description>Hi, I found a false negative in Cppcheck 2.21.0 when two branch constraints establish that an expression used as a divisor is zero. Affected tool Cppcheck 2.21.0 Affected checker Cppcheck CheckOther::checkZeroDivision (zerodiv / zerodivcond) Minimal reproducer int divide_after_two_constraints(int x, int y) { if (y != 0) return 0; if (x + y != 0) return 0; return y / (x + y); } Reproduction command cppcheck --version cppcheck --enable=warning --std=c++11 --checkers-report=checkers.txt --template='{file}:{line}:{column}:...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Thu, 17 Sep 2026 17:17:24 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/2a77b49dd0/?limit=25#78f6</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/b103de764f/?limit=25#bb83</link><description>Hi, I found a false negative in Cppcheck 2.21.0 and 2.22 dev when memset zeroes a local integer before it is used as a divisor. Affected tool Cppcheck 2.21.0; also reproduced with Cppcheck 2.22 dev Affected checker Cppcheck CheckOther::checkZeroDivision (zerodiv / zerodivcond) Minimal reproducer #include &lt;cstring&gt; int test() { int value = 1; std::memset(&amp;value, 0, sizeof(value)); return 1 / value; } Reproduction command cppcheck --version cppcheck --enable=warning --std=c++17 --checkers-report=checkers.txt...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Thu, 17 Sep 2026 17:16:20 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/b103de764f/?limit=25#bb83</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/8e23bd1078/?limit=25#2be2</link><description>Hi, I found a false negative in Cppcheck 2.21.0 when a logical expression selects a zero-valued ternary branch. Affected tool Cppcheck 2.21.0 Affected checker Cppcheck CheckOther::checkZeroDivision (zerodiv / zerodivcond) Minimal reproducer int divide_after_logical_ternary(bool left, bool right) { int divisor = (left || right) ? 0 : 1; return 1 / divisor; } Reproduction command cppcheck --version cppcheck --enable=warning --std=c++11 --checkers-report=checkers.txt --template='{file}:{line}:{column}:...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Thu, 17 Sep 2026 17:15:05 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/8e23bd1078/?limit=25#2be2</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/963ff0ed40/?limit=25#2923</link><description>We don't warn about the expression return true || divisor;, which is arguably dubious, but may be intentional, similar to if (false) etc. So we won't report the induced unreadVariable either.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 15 Sep 2026 07:18:58 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/963ff0ed40/?limit=25#2923</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/8f14f6d1dc/?limit=25#5072</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15037</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 15 Sep 2026 07:17:01 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/8f14f6d1dc/?limit=25#5072</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/c6a25afc43/?limit=25#7676</link><description>There is a deliberate bailout to allow "trivial" initialization.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 15 Sep 2026 07:12:27 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/c6a25afc43/?limit=25#7676</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/152652bf34/?limit=25#9354</link><description>See https://trac.cppcheck.net/ticket/14405</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 15 Sep 2026 06:49:54 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/152652bf34/?limit=25#9354</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/f36c96deb6/?limit=25#1d3f</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15036</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 15 Sep 2026 06:47:43 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/f36c96deb6/?limit=25#1d3f</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/f10111e8e2/?limit=25#1ef6</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15035</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 15 Sep 2026 06:41:07 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/f10111e8e2/?limit=25#1ef6</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/963ff0ed40/?limit=25#c5e0</link><description>Hi, I found a false negative in Cppcheck 2.21.0 when a local variable is used only on the unevaluated right-hand side of a short-circuit expression. Affected tool Cppcheck 2.21.0 Affected checker unreadVariable Minimal reproducer int test() { int source = 0; int divisor = source; return true || divisor; } Reproduction command cppcheck --version cppcheck --enable=all --inconclusive --check-level=exhaustive --std=c++17 --output-format=xmlv2 mutant-cppcheck-unreadvariable-fn-short-circuit-rhs.cpp Current...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Mon, 14 Sep 2026 19:22:22 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/963ff0ed40/?limit=25#c5e0</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/152652bf34/?limit=25#aacc</link><description>Cppcheck 2.21.0 misses a scalar store that is never read before a switch completes. The minimal trigger contains no loop or continue. Affected tool and checker Cppcheck 2.21.0, unreadVariable / CheckUnusedVar liveness handling. Minimal reproducer void test(int input) { int value; value = 0; switch (input) { case 0: break; default: break; } } Reproduction command cppcheck --enable=all --inconclusive --check-level=exhaustive --std=c++17 \ --template='{file}:{line}:{column}: [{id}] {message}' \ mutant-cppcheck-unreadvariable-fn-switch-dead-store.cpp...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Mon, 14 Sep 2026 19:21:21 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/152652bf34/?limit=25#aacc</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/8f14f6d1dc/?limit=25#d709</link><description>Cppcheck 2.21.0 misses an initialization whose explicit floating conversion is overwritten before the initialized value is read. Affected tool and checker Cppcheck 2.21.0, redundantInitialization. Minimal reproducer void initialize(double &amp;); float test() { double input; initialize(input); float value = (float)input; value = 3.14f; return value; } Reproduction command cppcheck --enable=all --inconclusive --check-level=exhaustive --std=c++17 \ --template='{file}:{line}:{column}: [{id}] {message}'...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Mon, 14 Sep 2026 19:18:57 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/8f14f6d1dc/?limit=25#d709</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/c6a25afc43/?limit=25#8bc7</link><description>Cppcheck 2.21.0 does not report a dead first store when its value is zero, although the otherwise equivalent nonzero store is reported as redundantAssignment. Affected tool and checker Cppcheck 2.21.0, redundantAssignment. Minimal reproducer void test() { int value; value = 0; value = 1; (void)value; } Reproduction command cppcheck --enable=all --inconclusive --check-level=exhaustive --std=c++17 \ --template='{file}:{line}:{column}: [{id}] {message}' \ mutant-cppcheck-redundantassignment-fn-zero-overwrite.cpp...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Mon, 14 Sep 2026 19:17:22 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/c6a25afc43/?limit=25#8bc7</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/f36c96deb6/?limit=25#1d7a</link><description>Hi, I found a false negative in Cppcheck 2.21.0 when a pointer allocated by scalar new is stored in an object member and released with delete[]. Affected tool Cppcheck 2.21.0 Affected checker mismatchAllocDealloc Minimal reproducer struct Owner { int *data; }; void test() { Owner owner; owner.data = new int; delete[] owner.data; } Reproduction command cppcheck --version cppcheck --enable=warning --inconclusive --check-level=exhaustive --std=c++17 --checkers-report=checkers.txt --template='{file}:{line}:{column}:...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Mon, 14 Sep 2026 19:16:11 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/f36c96deb6/?limit=25#1d7a</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/f10111e8e2/?limit=25#ecb8</link><description>Hi, I found a false negative in Cppcheck 2.21.0 when an indexed member access occurs between a scalar allocation and mismatched array deletion. Affected tool Cppcheck 2.21.0 Affected checker mismatchAllocDealloc Minimal reproducer struct Item { int value; }; void test() { Item *item = new Item; item[0].value = 0; delete[] item; } Reproduction command cppcheck --version cppcheck --enable=warning --inconclusive --check-level=exhaustive --std=c++17 --checkers-report=checkers.txt --template='{file}:{line}:{column}:...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Mon, 14 Sep 2026 19:14:39 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/f10111e8e2/?limit=25#ecb8</guid></item><item><title>Andrew C Aitchison posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/9d401f665f/?limit=25#edc7</link><description>it is because in cfg/posix.cfg the return value is calculated as &lt;returnValue type="int"&gt;arg1==0 &amp;amp;0&lt;/returnValue&gt; Is it as simple as that ? That stanza is for &lt;function name="ffsl,ffsll"&gt; but not ffs itself.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrew C Aitchison</dc:creator><pubDate>Thu, 10 Sep 2026 08:01:12 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/9d401f665f/?limit=25#edc7</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/2bef5d6716/?limit=25#c99e</link><description>Thanks for reporting, example added here: https://trac.cppcheck.net/ticket/11222</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Thu, 10 Sep 2026 07:01:14 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/2bef5d6716/?limit=25#c99e</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/9d401f665f/?limit=25#3c7b</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15022</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Thu, 10 Sep 2026 06:56:13 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/9d401f665f/?limit=25#3c7b</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/5580483a4c/?limit=25#a27d</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15021</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Thu, 10 Sep 2026 06:48:12 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/5580483a4c/?limit=25#a27d</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/c3fc96cd6f/?limit=25#48a0</link><description>This seems like a bad fit for unreadVariable/unusedVariable because there would be no loop without declaring the variable. Currently we don't flag empty loop/if/... scopes.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Thu, 10 Sep 2026 06:27:46 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/c3fc96cd6f/?limit=25#48a0</guid></item><item><title>Aaron Danen posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/9d401f665f/?limit=25#a556</link><description>void f() { const int y = ffs(5); if (y == 0) {} } analyzing with ./cppcheck --enable=all --library=posix throws Checking examples/ffs.c ... examples/ffs.c:3:11: style: Condition 'y==0' is always true [knownConditionTrueFalse] if (y == 0) {} ^ examples/ffs.c:2:22: note: Assignment 'y=ffs(5)', assigned value is 0 const int y = ffs(5); ^ examples/ffs.c:3:11: note: Condition 'y==0' is always true if (y == 0) {} ^ it is because in cfg/posix.cfg the return value is calculated as &lt;returnValue type="int"&gt;arg1==0...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aaron Danen</dc:creator><pubDate>Wed, 09 Sep 2026 18:25:52 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/9d401f665f/?limit=25#a556</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/5ef9188cde/?limit=25#8757</link><description>See https://trac.cppcheck.net/ticket/3172</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Wed, 09 Sep 2026 18:22:42 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/5ef9188cde/?limit=25#8757</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/459accec1d/?limit=25#856f</link><description>See https://trac.cppcheck.net/ticket/12957</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Wed, 09 Sep 2026 18:08:39 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/459accec1d/?limit=25#856f</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/5580483a4c/?limit=25#d3de</link><description>Hi, I found a false negative in Cppcheck 2.21.0 and 2.22 dev when both values from a structured binding are overwritten before either initial value is read. Affected tool Cppcheck 2.21.0; also reproduced with Cppcheck 2.22 dev Affected checker Cppcheck unreadVariable Minimal reproducer struct Pair { int left; int right; }; Pair make_pair(); int test() { auto [left, right] = make_pair(); left = 1; right = 2; return left + right; } Reproduction command cppcheck --version cppcheck --enable=style --inconclusive...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Wed, 09 Sep 2026 12:10:12 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/5580483a4c/?limit=25#d3de</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/c3fc96cd6f/?limit=25#26c8</link><description>Hi, I found a false negative in Cppcheck 2.21.0 and 2.22 dev when a range-based for loop initializes its loop variable but the body never reads it. Affected tool Cppcheck 2.21.0; also reproduced with Cppcheck 2.22 dev Affected checker Cppcheck unreadVariable Minimal reproducer void test(int (&amp;values)[3]) { for (int value : values) { } } Reproduction command cppcheck --version cppcheck --enable=style --inconclusive --std=c++17 --checkers-report=checkers.txt --template='{file}:{line}:{column}: [{id}]...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Wed, 09 Sep 2026 12:08:43 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/c3fc96cd6f/?limit=25#26c8</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/2bef5d6716/?limit=25#6e48</link><description>Hi, I found a false negative in Cppcheck 2.21.0 and 2.22 dev when an assignment's expression value is returned but the value stored in the local variable is never read. Affected tool Cppcheck 2.21.0; also reproduced with Cppcheck 2.22 dev Affected checker Cppcheck unreadVariable Minimal reproducer int make_value(); int test() { int value; return value = make_value(); } Reproduction command cppcheck --version cppcheck --enable=style --inconclusive --std=c++17 --checkers-report=checkers.txt --template='{file}:{line}:{column}:...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Wed, 09 Sep 2026 12:07:54 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/2bef5d6716/?limit=25#6e48</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/459accec1d/?limit=25#283e</link><description>Hi, I found a false negative in Cppcheck 2.21.0 and 2.22 dev when a local lambda object is initialized but never read. Affected tool Cppcheck 2.21.0; also reproduced with Cppcheck 2.22 dev Affected checker Cppcheck unreadVariable Minimal reproducer void test(int value) { auto callback = [value] {}; } Reproduction command cppcheck --version cppcheck --enable=style --inconclusive --std=c++17 --checkers-report=checkers.txt --template='{file}:{line}:{column}: [{id}] {message}' cppcheck-unreadvariable-fn-lambda.cpp...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Wed, 09 Sep 2026 12:07:09 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/459accec1d/?limit=25#283e</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/5ef9188cde/?limit=25#f835</link><description>Hi, I found a false negative in Cppcheck 2.22 dev when an array allocated with new[] is returned by a function and deallocated with delete. Affected tool Cppcheck 2.22 dev (Git commit 71de6753d64f) Affected checker Cppcheck mismatchAllocDealloc Minimal reproducer int *allocate_array() { return new int[1]; } void release_array() { int *p = allocate_array(); delete p; } Reproduction command cppcheck --version cppcheck --enable=warning --std=c++17 --checkers-report=checkers.txt --template='{file}:{line}:{column}:...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Wed, 09 Sep 2026 12:04:25 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/5ef9188cde/?limit=25#f835</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/5c014814d7/?limit=25#9493</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15020</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Wed, 09 Sep 2026 08:17:54 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/5c014814d7/?limit=25#9493</guid></item><item><title>Marcin Pytel posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/5c014814d7/?limit=25#a60d</link><description>I'm using cppcheck 2.21.1 Here is code: enum type { ONE, TWO, THREE, LAST = THREE, }; static_assert(THREE == LAST, "error"); int main() { static_assert(THREE == LAST, "error"); } When running cppcheck --enable=all I have issue: file.c:13:22: style: The comparison 'THREE == LAST' is always true because 'THREE' and 'LAST' represent the same value. [knownConditionTrueFalse] static_assert(THREE == LAST, "error"); Although the cppcheck has right, the assert is to make sure the last enumerator is set to...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcin Pytel</dc:creator><pubDate>Wed, 09 Sep 2026 07:51:47 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/5c014814d7/?limit=25#a60d</guid></item><item><title>Lugnier posted a comment on discussion Development</title><link>https://sourceforge.net/p/cppcheck/discussion/development/thread/93eed1fde7/?limit=25#1394/126b</link><description>Hi all, I really don’t understand why you don’t want to integrate my modification… It drops down execution timings… I already send 2 mails… Can you please take my request into account! Cédric From: discussion@cppcheck.p.re.sourceforge.net discussion@cppcheck.p.re.sourceforge.net On Behalf Of Daniel Marjamäki Sent: 06 September 2026 13:03 To: [cppcheck:discussion] development@discussion.cppcheck.p.re.sourceforge.net Subject: [EXTERNAL EMAIL] [cppcheck:discussion] Cppcheck 2.22 EXPÉDITEUR EXTERNE /...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lugnier</dc:creator><pubDate>Mon, 07 Sep 2026 07:46:06 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/development/thread/93eed1fde7/?limit=25#1394/126b</guid></item><item><title>Daniel Marjamäki posted a comment on discussion Development</title><link>https://sourceforge.net/p/cppcheck/discussion/development/thread/93eed1fde7/?limit=25#1394</link><description>Let's start preparing for Cppcheck 2.22 release. My goal is to tag in ~ 14 days. If it looks stable enough. Let's try to focus on bug fixes for a while. Features I want to finish before the release: the "warning hash" related functionality to make it possible to create a baseline, to speedup cppcheck integration speedups in simplecpp, errorlogger, suppressions etc</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Marjamäki</dc:creator><pubDate>Sun, 06 Sep 2026 11:02:51 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/development/thread/93eed1fde7/?limit=25#1394</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/0615d0441c/?limit=25#9085</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15005</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Wed, 02 Sep 2026 10:26:46 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/0615d0441c/?limit=25#9085</guid></item><item><title>Aaron Danen posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/0615d0441c/?limit=25#88c6</link><description>Hello malloc() initializes buf, but not buf[0]. The following is valid because buf is never dereferenced void f() { char *buf = (char *)malloc(1); if (!buf) return NULL; buf += 1; free(buf - 1); } however, cppcheck throws examples/buf.c:5:5: error: Memory is allocated but not initialized: buf [uninitdata] buf += 1; ^ For this similar code, cppcheck correctly throws no errors void f() { char *buf = (char *)malloc(1); if (!buf) return NULL; buf = buf + 1; free(buf - 1); } I think this is because checkuninitvar...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aaron Danen</dc:creator><pubDate>Tue, 01 Sep 2026 16:34:07 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/0615d0441c/?limit=25#88c6</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/edc20d832b/?limit=25#62f9</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15003</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 01 Sep 2026 13:05:05 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/edc20d832b/?limit=25#62f9</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/e9ecc97bf2/?limit=25#56f2</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15002</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 01 Sep 2026 12:59:48 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/e9ecc97bf2/?limit=25#56f2</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/ad63e9f5f3/?limit=25#5857</link><description>Looks like an instance of https://trac.cppcheck.net/ticket/14969 There already is a condition attached to the error message.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 01 Sep 2026 12:55:48 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/ad63e9f5f3/?limit=25#5857</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/ad63e9f5f3/?limit=25#3d1d</link><description>Hi, I found a false positive in Cppcheck 2.21.0 when a helper either calls a noreturn function or returns zero. Affected tool Cppcheck 2.21.0 Affected checker Cppcheck zerodiv Minimal reproducer void stop(void) __attribute__((noreturn)); int zero_or_stop(int condition) { if (condition) stop(); return 0; } int unreachable_division(int condition) { int zero = 0; if (zero_or_stop(condition)) return 1 / zero; return 0; } Reproduction command cppcheck --version cppcheck --enable=warning --std=c11 --checkers-report=checkers.txt...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Tue, 01 Sep 2026 12:04:00 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/ad63e9f5f3/?limit=25#3d1d</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/e9ecc97bf2/?limit=25#e3b7</link><description>Hi, I found a false positive in Cppcheck 2.21.0 when a division is guarded by an infeasible pointer equality. Affected tool Cppcheck 2.21.0 Affected checker Cppcheck zerodiv Minimal reproducer int divide_on_impossible_pointer_equality(char *pointer) { int zero = 0; if (pointer == pointer + 1) return 1 / zero; return 0; } Reproduction command cppcheck --version cppcheck --enable=warning --std=c11 --checkers-report=checkers.txt --template='{file}:{line}:{column}: [{id}] {message}' cppcheck-zerodiv-fp-impossible-pointer-equality.c...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Tue, 01 Sep 2026 12:03:17 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/e9ecc97bf2/?limit=25#e3b7</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/edc20d832b/?limit=25#ef58</link><description>Hi, I found a false positive in Cppcheck 2.21.0 when equivalent pointer expressions constrain an aliased divisor to be nonzero. Affected tool Cppcheck 2.21.0 Affected checker Cppcheck zerodiv Minimal reproducer int divide_after_alias_check(void *data) { int *value = (int *)data; *value = 0; if (*(int *)data == 0) return 0; return 1 / *value; } Reproduction command cppcheck --version cppcheck --enable=warning --std=c11 --checkers-report=checkers.txt --template='{file}:{line}:{column}: [{id}] {message}'...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Tue, 01 Sep 2026 12:02:25 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/edc20d832b/?limit=25#ef58</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/3d45f1995e/?limit=25#35f2</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14996</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Sun, 30 Aug 2026 20:19:22 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/3d45f1995e/?limit=25#35f2</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/03581df95e/?limit=25#aa8d</link><description>See https://trac.cppcheck.net/ticket/1025, https://trac.cppcheck.net/ticket/6294</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Sun, 30 Aug 2026 20:18:14 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/03581df95e/?limit=25#aa8d</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/c883a5fb4e/?limit=25#0f28</link><description>See https://trac.cppcheck.net/ticket/8832, https://trac.cppcheck.net/ticket/14049</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Sun, 30 Aug 2026 17:14:31 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/c883a5fb4e/?limit=25#0f28</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/03581df95e/?limit=25#0a21</link><description>Hi, I found a false negative in Cppcheck 2.21.0 when the most-derived class default-initializes a virtual base member to zero. Affected checker Cppcheck zerodiv Minimal reproducer struct Base { int value; Base() : value(0) {} Base(int input) : value(input) {} }; struct Derived : virtual Base { int result; Derived() : Base(1), result(1 / value) {} }; struct MostDerived : Derived {}; void construct() { MostDerived object; } Reproduction command cppcheck --version cppcheck --enable=warning --std=c++11...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Sat, 29 Aug 2026 12:34:54 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/03581df95e/?limit=25#0a21</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/c883a5fb4e/?limit=25#af5a</link><description>FALSE NEGATIVE: zerodiv misses a zero-initialized object member Hi, I found a false negative in Cppcheck 2.21.0 when a zero stored in an aggregate member is used as the divisor. Affected checker Cppcheck zerodiv Minimal reproducer struct Value { int number; }; int divide_by_zero_initialized_member() { Value value{0}; return 1 / value.number; } Reproduction command cppcheck --version cppcheck --enable=warning --std=c++11 --checkers-report=checkers.txt --template='{file}:{line}:{column}: [{id}] {message}'...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Sat, 29 Aug 2026 12:29:49 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/c883a5fb4e/?limit=25#af5a</guid></item><item><title>Rodri posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/3d45f1995e/?limit=25#196c</link><description>Hi, I found a false negative in Cppcheck 2.21.0 when a lambda captures a known zero value used as the divisor. Affected checker Cppcheck zerodiv Minimal reproducer int divide_by_lambda_capture() { int value = 0; return [=] { return 1 / value; }(); } Reproduction command cppcheck --version cppcheck --enable=warning --std=c++11 --checkers-report=checkers.txt --template='{file}:{line}:{column}: [{id}] {message}' cppcheck-zerodiv-fn-lambda-capture.cpp Current behavior Cppcheck produces neither a zerodiv...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rodri</dc:creator><pubDate>Sat, 29 Aug 2026 12:28:17 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/3d45f1995e/?limit=25#196c</guid></item><item><title>Aaron Danen posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/e409dbdba3/?limit=25#58a4</link><description>Thanks, pr is here: https://github.com/cppcheck-opensource/cppcheck/pull/8813</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aaron Danen</dc:creator><pubDate>Thu, 27 Aug 2026 15:04:22 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/e409dbdba3/?limit=25#58a4</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/25a909818b/?limit=25#9895</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14991</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Thu, 27 Aug 2026 07:16:58 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/25a909818b/?limit=25#9895</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/e409dbdba3/?limit=25#de4a</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14990</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Thu, 27 Aug 2026 07:12:27 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/e409dbdba3/?limit=25#de4a</guid></item><item><title>Aaron Danen posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/e409dbdba3/?limit=25#cf28</link><description>Hello When analyzing this function with ./cppcheck test.c void f(void (*fptr)(void *)) { void *buf = malloc(1); (*fptr)(buf); } I get test.c:4:1: error: Memory leak: buf [memleak] } ^ even though the call to whatever fptr points to might free or take ownership of buf. However, this similar function correctly reports no errors. void f() { void *buf = malloc(1); g(buf); } It is because in lib/checkleakautovar.cpp the "do we call a function" code only matches functions that are called with the standard...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aaron Danen</dc:creator><pubDate>Tue, 25 Aug 2026 16:25:51 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/e409dbdba3/?limit=25#cf28</guid></item><item><title>Fraser posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/25a909818b/?limit=25#ca85</link><description>With the following code when there is failure to allocate memory std::bad_alloc is thrown. The following test of the pointer is useless. This is from C++ Gotchas P172. I think it would be worthwhile to catch this with CPPCheck. int * ip = new int; if (ip) std::cout &lt;&lt; "Always executed"; else std::cout &lt;&lt; "Never executed";</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Fraser</dc:creator><pubDate>Fri, 21 Aug 2026 11:10:57 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/25a909818b/?limit=25#ca85</guid></item><item><title>Aaron Danen posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/f9a0097d12/?limit=25#6fb0</link><description>this sort of code is analyzed properly and throws no errors typedef char ** STR; void f() { void *buf; STR s = (STR) &amp;buf; } however, if the typedefs are not present and cppcheck doesn't know what STR is void f() { void *buf; STR s = (STR) &amp;buf; } iscast() in tokenlist.cpp returns false for (STR) and the &amp; is parsed as a bitwise AND, instead of the address-of operator. Because the &amp; is a binary operator on unitialized data, this example throws a false positive: examples/uninit.c:3:19: error: Uninitialized...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aaron Danen</dc:creator><pubDate>Wed, 12 Aug 2026 19:07:59 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/f9a0097d12/?limit=25#6fb0</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/16cd794b49/?limit=25#eb9c</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14973</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Wed, 12 Aug 2026 06:38:14 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/16cd794b49/?limit=25#eb9c</guid></item><item><title>correctmost posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/16cd794b49/?limit=25#bd43</link><description>I am seeing a false positive assertWithSideEffect warning when an assert contains a function pointer comparison. Here is sample code based on code from glib-networking: #include &lt;assert.h&gt; typedef struct { bool field; } st; static bool handshake () { st *priv; priv-&gt;field = true; return true; } int main() { bool (*fptr)() = handshake; assert (handshake == fptr); # warning: Assert statement calls a function which may have desired side effects: 'handshake'. [assertWithSideEffect] return 0; } I don't...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">correctmost</dc:creator><pubDate>Wed, 12 Aug 2026 05:46:48 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/16cd794b49/?limit=25#bd43</guid></item><item><title>Aaron Danen posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/6bc232307a/?limit=25#9ac5</link><description>in cli/filelister.cpp:addFiles2 there is struct stat file_stat; if (stat(path.c_str(), &amp;file_stat) == -1) return ""; // TODO: return error? if we returned an error here we could help users who are in this situation. I don't know what situation there would be for a user to specify the analysis of a nonexistent file. The most common thing would probably be people mistyping the name of a file or something similar, in which case proceeding as usual is probably an annoying behavior.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aaron Danen</dc:creator><pubDate>Wed, 12 Aug 2026 01:04:12 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/6bc232307a/?limit=25#9ac5</guid></item><item><title>CHR posted a comment on discussion Development</title><link>https://sourceforge.net/p/cppcheck/discussion/development/thread/ddfa205ff5/?limit=25#10c1</link><description>See https://github.com/cppcheck-opensource/cppcheck/pull/7893</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Wed, 05 Aug 2026 12:53:29 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/development/thread/ddfa205ff5/?limit=25#10c1</guid></item><item><title>gruenich posted a comment on discussion Development</title><link>https://sourceforge.net/p/cppcheck/discussion/development/thread/ddfa205ff5/?limit=100#19ca</link><description>Hi! PCRE is no longer maintained [1]. It is used for regular expression in the "HAVE_RULES" feature. Cppcheck should move away from using it, as more and more distributions remove its packages and it might break with every new compiler version. This would replace an external dependency by an already required C++ language standard. The idea is not new, Daniel posted the idea 8 years ago. It would be an answer to ticket #14902, too. It will be some work but will reduce the project complexity. [1] https://www.pcre.org...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">gruenich</dc:creator><pubDate>Wed, 05 Aug 2026 12:21:40 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/development/thread/ddfa205ff5/?limit=100#19ca</guid></item><item><title>Aaron Danen posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/530f041ccd/?limit=25#e323</link><description>What version of cppcheck did you use to create this bug? I tried to reproduce this using the current master branch and this issue you describe didn't happen, even with --library=qt with --debug it looks like its working properly now: using the first namespace Checking examples/namespace.cpp ... ##file examples/namespace.cpp 3: namespace TetheringState 4: { 5: constexpr int NUMBER_OF_RESPONSE_FIELDS@var1 = 2 ; 6: } 7: 8: namespace TetheringStateV2 9: { 10: constexpr int NUMBER_OF_RESPONSE_FIELDS@var2...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aaron Danen</dc:creator><pubDate>Tue, 04 Aug 2026 23:10:50 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/530f041ccd/?limit=25#e323</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#a337</link><description>10) functionStatic doesn't detect that a member function requires an instance when its only "member use" is an unqualified call to a non-static sibling overload The provided example does not compile.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 04 Aug 2026 20:39:45 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#a337</guid></item><item><title>Long Huang posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/530f041ccd/?limit=25#a93e</link><description>containerOutOfBounds flags container accesses gated by a same-named constant from a different namespace, pulled in via using namespace Minimal reproduction: #include &lt;QStringList&gt; namespace TetheringState { constexpr int NUMBER_OF_RESPONSE_FIELDS = 2; } namespace TetheringStateV2 { constexpr int NUMBER_OF_RESPONSE_FIELDS = 5; } void Parse(const QStringList&amp; message) { using namespace TetheringStateV2; if(NUMBER_OF_RESPONSE_FIELDS == message.count()) { auto a = message.at(0); auto b = message.at(1);...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Long Huang</dc:creator><pubDate>Tue, 04 Aug 2026 20:37:56 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/530f041ccd/?limit=25#a93e</guid></item><item><title>Long Huang posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#ae7c/c6c8</link><description>Thank you, there're a few more in the initial and 2nd posts that are still awaiting sourceforge moderator approval in this thread.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Long Huang</dc:creator><pubDate>Tue, 04 Aug 2026 20:35:21 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#ae7c/c6c8</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#ae7c</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14958</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Tue, 04 Aug 2026 20:32:46 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#ae7c</guid></item><item><title>Long Huang modified a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#babe</link><description>9) danglingLifetime doesn't account for ownership being transferred to a longer-lived owner via std::move immediately after capturing a raw pointer Minimal reproduction: #include &lt;memory&gt; class Bar { public: virtual ~Bar() = default; }; class Consumer { public: explicit Consumer(std::unique_ptr&lt;Bar&gt; bar) : Owned(std::move(bar)) { } private: std::unique_ptr&lt;Bar&gt; Owned; }; class Foo { public: void CreateConsumer() { std::unique_ptr&lt;Bar&gt; tmp = std::make_unique&lt;Bar&gt;(); RawPtr = tmp.get(); ConsumerInstance.reset(new...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Long Huang</dc:creator><pubDate>Tue, 04 Aug 2026 20:16:39 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#babe</guid></item><item><title>Long Huang modified a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#babe</link><description>danglingLifetime doesn't account for ownership being transferred to a longer-lived owner via std::move immediately after capturing a raw pointer Minimal reproduction: #include &lt;memory&gt; class Bar { public: virtual ~Bar() = default; }; class Consumer { public: explicit Consumer(std::unique_ptr&lt;Bar&gt; bar) : Owned(std::move(bar)) { } private: std::unique_ptr&lt;Bar&gt; Owned; }; class Foo { public: void CreateConsumer() { std::unique_ptr&lt;Bar&gt; tmp = std::make_unique&lt;Bar&gt;(); RawPtr = tmp.get(); ConsumerInstance.reset(new...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Long Huang</dc:creator><pubDate>Tue, 04 Aug 2026 20:16:22 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#babe</guid></item><item><title>Long Huang modified a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#babe</link><description>danglingLifetime doesn't account for ownership being transferred to a longer-lived owner via std::move immediately after capturing a raw pointer Minimal reproduction: #include &lt;memory&gt; class Bar { public: virtual ~Bar() = default; }; class Consumer { public: explicit Consumer(std::unique_ptr&lt;Bar&gt; bar) : Owned(std::move(bar)) { } private: std::unique_ptr&lt;Bar&gt; Owned; }; class Foo { public: void CreateConsumer() { std::unique_ptr&lt;Bar&gt; tmp = std::make_unique&lt;Bar&gt;(); RawPtr = tmp.get(); ConsumerInstance.reset(new...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Long Huang</dc:creator><pubDate>Tue, 04 Aug 2026 20:15:56 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#babe</guid></item><item><title>Long Huang modified a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#babe</link><description>danglingLifetime doesn't account for ownership being transferred to a longer-lived owner via std::move immediately after capturing a raw pointer Minimal reproduction: #include &lt;memory&gt; class Bar { public: virtual ~Bar() = default; }; class Consumer { public: explicit Consumer(std::unique_ptr&lt;Bar&gt; bar) : Owned(std::move(bar)) { } private: std::unique_ptr&lt;Bar&gt; Owned; }; class Foo { public: void CreateConsumer() { std::unique_ptr&lt;Bar&gt; tmp = std::make_unique&lt;Bar&gt;(); RawPtr = tmp.get(); ConsumerInstance.reset(new...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Long Huang</dc:creator><pubDate>Tue, 04 Aug 2026 20:14:19 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#babe</guid></item><item><title>Aaron Danen posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#79b3</link><description>Hah I was just trying to make a minimal example for the dangling lifetime issue. Here is what I have right now: class A {}; std::unique_ptr&lt;A&gt; saved; A *f(int x) { std::unique_ptr&lt;A&gt; tmp = std::make_unique&lt;A&gt;(); A *ptr = tmp.get(); saved = std::move(tmp); return ptr; } expected result: no errors actual result: error: Returning pointer to local variable 'tmp' that will be invalid when returning. [returnDanglingLifetime]</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aaron Danen</dc:creator><pubDate>Tue, 04 Aug 2026 17:42:44 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#79b3</guid></item><item><title>Long Huang posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#babe</link><description>danglingLifetime doesn't account for ownership being transferred to a longer-lived owner via std::move immediately after capturing a raw pointer Minimal reproduction: #include &lt;memory&gt; class Bar { public: virtual ~Bar() = default; }; class Consumer { public: explicit Consumer(std::unique_ptr&lt;Bar&gt; bar) : Owned(std::move(bar)) { } private: std::unique_ptr&lt;Bar&gt; Owned; }; class Foo { public: void CreateConsumer() { std::unique_ptr&lt;Bar&gt; tmp = std::make_unique&lt;Bar&gt;(); RawPtr = tmp.get(); ConsumerInstance.reset(new...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Long Huang</dc:creator><pubDate>Tue, 04 Aug 2026 16:41:27 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/1f1830e32f/?limit=25#babe</guid></item><item><title>Torsten Rupp posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/6bc232307a/?limit=25#b495</link><description>It seems non existing files are silently ignored if a least one source file is found. Reproduce: touch a.cpp cppcheck a.cpp missing.cpp echo $? Result: 0 Expected behavior: some error message like cppcheck: error: could not find 'missing.cpp' However this produce an error message as expected: cppcheck missing.cpp cppcheck: error: could not find or open any of the paths given. Thus if at least one source file is found all not existing other source files are silently ignored.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Torsten Rupp</dc:creator><pubDate>Tue, 04 Aug 2026 12:23:13 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/6bc232307a/?limit=25#b495</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/f548446de1/?limit=25#fa30</link><description>Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14957</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Mon, 03 Aug 2026 06:29:16 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/f548446de1/?limit=25#fa30</guid></item><item><title>CHR posted a comment on discussion General Discussion</title><link>https://sourceforge.net/p/cppcheck/discussion/general/thread/bc56926b5c/?limit=25#91e2</link><description>Looks like an instance of https://trac.cppcheck.net/ticket/2565</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHR</dc:creator><pubDate>Mon, 03 Aug 2026 06:25:04 -0000</pubDate><guid>https://sourceforge.net/p/cppcheck/discussion/general/thread/bc56926b5c/?limit=25#91e2</guid></item></channel></rss>