Re: [PATCH] iio: temperature: ltc2983: avoid string comparison for leak detector
From: Nathan Chancellor
Date: Wed Sep 30 2026 - 13:53:27 EST
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.
--
Cheers,
Nathan