News for hackers. Stuff that matters.
Re:Weekend projects: getting silly with C by tialaramex on Sunday June 30, 2024 @06:55AM (#40836446)
The warning says to add parentheses, which sure enough silences the warning, your foot, however, still has a bullet hole in it.
Re:Weekend projects: getting silly with C by uecker on Sunday June 30, 2024 @07:12AM (#40836531)
The warning is very clear. If you did intend to use the result of an assignment as truth value, you would notice. In any case, did not have a single problem with this type of error in the last decades, working with programmers of various skill levels including beginners.
Re:Weekend projects: getting silly with C by lelanthran on Sunday June 30, 2024 @11:08AM (#40837583)
> The warning says to add parentheses, which sure enough silences the warning, your foot, however, still has a bullet hole in it.

The warning also says that it's an assignment. It's a pretty clear warning meant to force the programmer to do extra work to get the error.