On 11/30/2018 03:01 PM, Daniel Stenberg wrote:
On Wed, 28 Nov 2018, Ben Greear via curl-library wrote:

        i = part;
-        for(o = enc; *i; ++o, ++i)
-          *o = (*i == ' ') ? '+' : *i;
+        for(o = enc; *i; ++o, ++i) {
+          if (*i == ' ')
+            *o = '+';
+          else
+            *o = *i;
+        }

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.

Thanks,
Ben

--
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to