Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.bin/stat



    Date:        Fri, 16 May 2025 07:50:28 +0000
    From:        nia <nia%NetBSD.org@localhost>
    Message-ID:  <aCbuRP9RzzDzDgig%homeworld.netbsd.org@localhost>

  | I wasn't insinuating it's undefined behaviour, just obfuscating.

I disagree.   And one should always read (at least) surrounding code
before trying to understand any small part of any code.

How about we make it
	&"lstat"[usestat]
then?

Or even
	&usestat["lstat"]
?

They all mean the same thing, but those might almost be considered obfuscated.
The first sounds as if it is what the clang warning was saying should be used
to avoid producing that warning.

They all avoid the code needing to do 2 jumps in at least some cases
(or one in all), and having two strings (though a good compiler might
avoid that).

And I agree with uwe@ and martin@ - that clang warning is absurd.

kre



Home | Main Index | Thread Index | Old Index