Re: [PATCH] iio: temperature: ltc2983: avoid string comparison for leak detector

From: Andy Shevchenko

Date: Fri Oct 02 2026 - 09:34:30 EST


On Wed, Sep 30, 2026 at 05:03:36PM +0200, Nathan Chancellor wrote:
> On Wed, Sep 30, 2026 at 12:52:16PM +0300, Andy Shevchenko wrote:
> > Hmm... I consider that the compiler warning is just a noise which we should
> > ignore or disable. It's doubtfully useful as if it may prove the always false
> > or always true cases, it doesn't mean there won't be other cases in the future.
> > Do we have any discussion on that warning before?
>
> I don't think there has been a discussion around -Wstring-compare
> before. Unfortunately, it seems like clang's -Wstring-compare is
> different from GCC's -Wstring-compare. clang's is basically a subwarning
> in GCC's -Waddress and GCC's -Wstring-compare does not really have an
> equivalent in clang proper (it seems like it might be a clang-tidy
> check IIUC?):
>
> https://godbolt.org/z/zzT4WsoT8
>
> So if we want to disable -Wstring-compare, we should only do it for GCC
> in my opinion.

I don't know if we really want this. Since Arnd also stumbled over this and
issues somewhat similar change perhaps flag approach is fine (and Nuno also
leans towards it even without relation to this warning).

--
With Best Regards,
Andy Shevchenko