# HG changeset patch # User Kim Alvefur # Date 1488478927 -3600 # Node ID 8067828e7e403369f3c5f7a7fadbb5f7442b1a2a # Parent e520dc0c3af4fd109a66d0ca5b7c02590c9baf23 util.ringbuffer: Change types of length related variables to size_t [-Wsign-compare] diff -r e520dc0c3af4 -r 8067828e7e40 util-src/ringbuffer.c --- a/util-src/ringbuffer.c Thu Mar 02 15:21:07 2017 +0100 +++ b/util-src/ringbuffer.c Thu Mar 02 19:22:07 2017 +0100 @@ -31,7 +31,7 @@ b->wpos = b->wpos % b->alen; } -int find(ringbuffer *b, const char *s, int l) { +int find(ringbuffer *b, const char *s, size_t l) { size_t i, j; int m; @@ -74,7 +74,7 @@ int rb_read(lua_State *L) { ringbuffer *b = luaL_checkudata(L, 1, "ringbuffer_mt"); - int r = luaL_checkinteger(L, 2); + size_t r = luaL_checkinteger(L, 2); int peek = lua_toboolean(L, 3); if(r > b->blen) {