Linux Perf Users
 help / color / mirror / Atom feed
* linux-6.16/tools/perf/util/tool_pmu.c:242: Pointless test ?
@ 2025-08-06  6:09 David Binderman
  2025-08-06 23:12 ` Namhyung Kim
  0 siblings, 1 reply; 3+ messages in thread
From: David Binderman @ 2025-08-06  6:09 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, acme@kernel.org, namhyung@kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com,
	kan.liang@linux.intel.com, linux-perf-users@vger.kernel.org,
	Linux Kernel Mailing List

Hello there,

Static analyser cppcheck says:

linux-6.16/tools/perf/util/tool_pmu.c:242:15: warning: Opposite inner 'if' condition leads to a dead code block. [oppositeInnerCondition]

Source code is

        for (thread = 0; thread < nthreads; thread++) {
            if (thread >= nthreads)
                break;

Suggest remove if test.

Regards

David Binderman

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-07  5:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06  6:09 linux-6.16/tools/perf/util/tool_pmu.c:242: Pointless test ? David Binderman
2025-08-06 23:12 ` Namhyung Kim
2025-08-07  5:24   ` David Binderman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox