From 362678728b8232c9490e14ba14ff323d9a92d6be Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Fri, 27 Jun 2008 21:00:41 +0000 Subject: made gcc 4.3 a bit happier Signed-off-by: Michael Krelin --- (limited to 'lib/util.cc') diff --git a/lib/util.cc b/lib/util.cc index b702291..d979502 100644 --- a/lib/util.cc +++ b/lib/util.cc @@ -211,7 +211,7 @@ namespace opkele { tmp[1] = *i; if(!(isxdigit(tmp[0]) && isxdigit(tmp[1]))) throw failed_conversion(OPKELE_CP_ "non-hex follows percent in url-encoded string"); - *(ii++) = strtol(tmp,0,16); + *(ii++) = (char)strtol(tmp,0,16); break; default: *(ii++) = *i; break; @@ -348,10 +348,10 @@ namespace opkele { throw bad_input(OPKELE_CP_ "Invalid percent-encoded character in URI being normalized"); int cc = strtol(tmp,0,16); if( isalpha(cc) || isdigit(cc) || strchr("._~-",cc) ) - pseg += cc; + pseg += (char)cc; else{ pseg += '%'; - pseg += toupper(tmp[0]); pseg += toupper(tmp[1]); + pseg += (char)toupper(tmp[0]); pseg += (char)toupper(tmp[1]); } }else if(qf) { rv += pseg; rv += c; -- cgit v0.9.0.2