Tangent128 / luasdl2

A pure C binding of SDL 2.0 for Lua 5.1, Lua 5.2, and LuaJIT.
ISC License
385 stars 74 forks source link

fix warning gcc 6.3.1 #65

Closed fperrad closed 3 years ago

fperrad commented 7 years ago
/home/user/build/linaro/build/lua-sdl2-v2.0.5-6.0/common/surface.c: In function 'l_surface_getRawPixel':
/home/user/build/linaro/build/lua-sdl2-v2.0.5-6.0/common/surface.c:892:21: warning: pointer targets in passing argument 2 of 'lua_pushlstring' differ in signedness [-Wpointer-sign]
  lua_pushlstring(L, ptr, size);
                     ^~~
In file included from /home/user/build/linaro/build/lua-sdl2-v2.0.5-6.0/common/common.h:25:0,
                 from /home/user/build/linaro/build/lua-sdl2-v2.0.5-6.0/common/rwops.h:22,
                 from /home/user/build/linaro/build/lua-sdl2-v2.0.5-6.0/common/surface.c:24:
/home/user/build/linaro/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/lua.h:227:22: note: expected 'const char *' but argument is of type 'Uint8 * {aka unsigned char *}'
 LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t len);
                      ^~~~~~~~~~~~~~~
markand commented 3 years ago

Thanks for the patch!