From eace8e32954eb6152e8df06f5a18905c235f0156 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Wed, 13 May 2015 16:23:35 -0700 Subject: Enable Travis for Clang, and enable -Werror for all Travis builds. Also added an extra Clang-only warning flag. --- upb/bindings/googlepb/bridge.cc | 2 +- upb/bindings/lua/upb/table.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'upb/bindings') diff --git a/upb/bindings/googlepb/bridge.cc b/upb/bindings/googlepb/bridge.cc index 2a2bbbf..394f7b4 100644 --- a/upb/bindings/googlepb/bridge.cc +++ b/upb/bindings/googlepb/bridge.cc @@ -99,7 +99,7 @@ const MessageDef* DefBuilder::GetMaybeUnfrozenMessageDef( fields.push_back(d->field(i)); } - for (int i = 0; i < fields.size(); i++) { + for (size_t i = 0; i < fields.size(); i++) { const goog::FieldDescriptor* proto2_f = fields[i]; assert(proto2_f); md->AddField(NewFieldDef(proto2_f, m), &status); diff --git a/upb/bindings/lua/upb/table.c b/upb/bindings/lua/upb/table.c index 0907f58..e574ab0 100644 --- a/upb/bindings/lua/upb/table.c +++ b/upb/bindings/lua/upb/table.c @@ -88,7 +88,7 @@ static void lupbtable_pushtable(lua_State *L, const upb_table *t, bool inttab) { lupbtable_setnum(L, -1, "size_lg2", t->size_lg2); lua_newtable(L); - for (int i = 0; i < upb_table_size(t); i++) { + for (size_t i = 0; i < upb_table_size(t); i++) { lupbtable_pushent(L, &t->entries[i], inttab, t->ctype); lua_rawseti(L, -2, i + 1); } @@ -102,7 +102,7 @@ static void lupbtable_pushinttable(lua_State *L, const upb_inttable *t) { lupbtable_setnum(L, -1, "array_count", t->array_count); lua_newtable(L); - for (int i = 0; i < t->array_size; i++) { + for (size_t i = 0; i < t->array_size; i++) { lua_newtable(L); if (upb_arrhas(t->array[i])) { lupbtable_pushval(L, t->array[i], t->t.ctype); -- cgit v1.2.3