From: Ben Greear <[email protected]> It seems the compiler there gets confused and thinks a char gets converted to an int. This fixes the warning and should be equivalent code.
Signed-off-by: Ben Greear <[email protected]> --- lib/urlapi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/urlapi.c b/lib/urlapi.c index be9958c..0208412 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -1265,8 +1265,12 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what, if(plusencode) { /* space to plus */ i = part; - for(o = enc; *i; ++o, ++i) - *o = (*i == ' ') ? '+' : *i; + for(o = enc; *i; ++o, ++i) { + if (*i == ' ') + *o = '+'; + else + *o = *i; + } *o = 0; /* zero terminate */ part = strdup(enc); if(!part) { -- 2.7.5 ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
