From: Kefu Chai Date: Sat, 30 Jan 2016 17:38:51 +0000 (+0800) Subject: rgw: fix the signed/unsigned comparison warning X-Git-Tag: v10.0.4~97^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2699c474b2b2d877d6c6ec60e2912cca7ffa047b;p=ceph.git rgw: fix the signed/unsigned comparison warning Signed-off-by: Kefu Chai --- diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index d19d380d0b39..e2cb905847b4 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -1290,7 +1290,7 @@ int RGWHandler_ObjStore::allocate_formatter(struct req_state *s, int default_typ int RGWHandler_ObjStore::validate_tenant_name(string const& t) { const char *p = t.c_str(); - for (int i = 0; i < t.size(); i++) { + for (unsigned i = 0; i < t.size(); i++) { char ch = p[i]; if (!(isalnum(ch) || ch == '_')) return -ERR_INVALID_TENANT_NAME;