[nixio] clean up compiler warnings

This commit is contained in:
Bart Van Der Meerssche 2011-01-24 13:34:30 +01:00
parent 528a121b2e
commit 3cc10bde7d
2 changed files with 4 additions and 2 deletions

View File

@ -121,7 +121,7 @@ static int nixio_sock__recvfrom(lua_State *L, int from) {
char buffer[NIXIO_BUFFERSIZE];
struct sockaddr_storage addrobj;
struct sockaddr_un addrobj_un;
struct sockaddr *addr;
struct sockaddr *addr = NULL;
socklen_t alen;
uint req = luaL_checkinteger(L, 2);
int readc;
@ -177,6 +177,8 @@ static int nixio_sock__recvfrom(lua_State *L, int from) {
return 2;
}
#endif
else
return 1;
}
}

View File

@ -48,7 +48,7 @@ static int nixio_spi_read(lua_State *L) {
int fd = nixio__checkfd(L, 1);
char buffer[NIXIO_BUFFERSIZE];
int readc;
size_t len;
size_t len =0;
char last = 0;
for (size_t i = 0; i < NIXIO_BUFFERSIZE; i++) {