mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Feng Yang <yangfeng59949@163.com>
To: irogers@google.com
Cc: acme@kernel.org, adrian.hunter@intel.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	kan.liang@linux.intel.com, linux-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org, mark.rutland@arm.com,
	mingo@redhat.com, namhyung@kernel.org, peterz@infradead.org,
	yangfeng59949@163.com
Subject: Re: [PATCH] perf kwork: Remove unreachable judgments
Date: Tue, 18 Mar 2025 10:17:03 +0800	[thread overview]
Message-ID: <20250318021703.78297-1-yangfeng59949@163.com> (raw)
In-Reply-To: <CAP-5=fUPz9R60Lay=k-0k5Q8C9AdStAMycOgsKqA5MJ_o7Ag3Q@mail.gmail.com>

On Mon, 17 Mar 2025 08:44:45 -0700 Ian Rogers <irogers@google.com> wrote:
> 
> On Thu, Mar 13, 2025 at 8:10 PM Feng Yang <yangfeng59949@163.com> wrote:
> >
> > From: Feng Yang <yangfeng@kylinos.cn>
> >
> > When s2[i] = '\0', if s1[i] != '\0', it will be judged by ret,
> > and if s1[i] = '\0', it will be judegd by !s1[i].
> > So in reality, s2 [i] will never make a judgment
> 
> Sgtm. Out of curiosity, was this tripping a compiler warning? If so,
> could you provide the details?
> 
> Thanks,
> Ian

There was no warning during compilation,
I just accidentally discovered it while testing and analyzing this code.

Feng


  reply	other threads:[~2025-03-18  2:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14  3:10 Feng Yang
2025-03-17 15:44 ` Ian Rogers
2025-03-18  2:17   ` Feng Yang [this message]
2025-03-18 15:44     ` Ian Rogers
2025-03-19 20:13 ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250318021703.78297-1-yangfeng59949@163.com \
    --to=yangfeng59949@163.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®