curl / Mailing Lists / curl-library / Single Mail


Re: [PATCH 1/2] urlapi: Fix compiler warning on fedora-17.

From: Daniel Stenberg via curl-library <>
Date: Sun, 9 Dec 2018 11:31:03 +0100 (CET)

On Fri, 30 Nov 2018, Ben Greear wrote:

>> This is a broken compiler that warns about this. I really prefer the
>> existing one-line version to this 4-line replacement.
> Well yes, it would be great if the compiler wasn't broken, but still nice to
> allow curl to compile (with -Werror) on weird/broken-ish compilers.
> I think a few lines of extra code is a small price to pay.

Everything's a ballance of course. What's the price/benefit trade-off?

We would gain an ancient compiler to build warning-free at the price of
slightly less readable code (which of course is debatable and we could argue
how much of a problem it would be, but I also don't want to open the flood
gates for fixing warnings when it is so obviously wrong in the compiler).

In this case, it seems mostly one or two persons will gain from fixing the
build for the ancient compiler (that even could be updated) while more than
one or two persons will potentially risk something by needlessly complicating
the code.

So my stance on this patch is still: thanks, but no thanks.

Received on 2018-12-09