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') diff --git a/lib/discovery.cc b/lib/discovery.cc index d1989ec..984e308 100644 --- a/lib/discovery.cc +++ b/lib/discovery.cc @@ -339,7 +339,7 @@ namespace opkele { const char *hv = ++colon; size_t hnl = colon-h; int rb; - for(rb = bytes-hnl-1;rb>0 && isspace(*hv);++hv,--rb); + for(rb = bytes-hnl-1;rb>0 && isspace(*hv);++hv,--rb) ; while(rb>0 && isspace(hv[rb-1])) --rb; if(rb) { if( (hnl>=sizeof(XRDS_HEADER)) @@ -500,7 +500,7 @@ namespace opkele { rels.assign(a[1]); }else if( !strcasecmp(a[0],"href") ) { const char *ns = a[1]; - for(;*ns && isspace(*ns);++ns); + for(;*ns && isspace(*ns);++ns) ; href.assign(ns); string::size_type lns=href.find_last_not_of(data::_whitespace_chars); href.erase(lns+1); diff --git a/lib/message.cc b/lib/message.cc index 524946a..c1f8088 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -158,7 +158,7 @@ namespace opkele { string rv = pfx; if(has_field("ns."+rv)) { string::reference c=rv[rv.length()]; - for(c='a';c<='z' && has_field("ns."+rv);++c); + for(c='a';c<='z' && has_field("ns."+rv);++c) ; if(c=='z') throw exception(OPKELE_CP_ "Failed to allocate namespace"); } diff --git a/lib/prequeue_rp.cc b/lib/prequeue_rp.cc index e499d08..886efae 100644 --- a/lib/prequeue_rp.cc +++ b/lib/prequeue_rp.cc @@ -42,9 +42,9 @@ namespace opkele { OP_verifier& operator++(int) { return *this; } }; - void prequeue_RP::verify_OP(const string& OP,const string& claimed_id,const string& id) const { + void prequeue_RP::verify_OP(const string& OP,const string& _claimed_id,const string& id) const { try { - discover(OP_verifier(OP,id),claimed_id); + discover(OP_verifier(OP,id),_claimed_id); throw id_res_unauthorized(OPKELE_CP_ "OP is not authorized to make an assertion regarding the identity"); }catch(__OP_verifier_good_input& ovgi) { diff --git a/lib/secret.cc b/lib/secret.cc index d538890..3f1e39c 100644 --- a/lib/secret.cc +++ b/lib/secret.cc @@ -10,7 +10,7 @@ namespace opkele { template struct bitwise_xor : public binary_function<__a1,__a2,__r> { __r operator() (const __a1& a1,const __a2& a2) const { - return a1^a2; + return (__r)(a1^a2); } }; 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