curl / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Sat, 1 Dec 2018 00:01:17 +0100 (CET)

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.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-12-01