Re: [PATCH] perf kwork: Remove unreachable judgments
From: Feng Yang
Date: Mon Mar 17 2025 - 22:18:12 EST
On Mon, 17 Mar 2025 08:44:45 -0700 Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> On Thu, Mar 13, 2025 at 8:10 PM Feng Yang <yangfeng59949@xxxxxxx> wrote:
> >
> > From: Feng Yang <yangfeng@xxxxxxxxxx>
> >
> > 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