[Olsr-cvs] olsrd-current/lib/tas/src glua.c, 1.5, 1.6 http.c, 1.8, 1.9 os_unix.c, 1.6, 1.7
Bernd Petrovitsch
(spam-protected)
Fri Nov 16 23:56:56 CET 2007
Update of /cvsroot/olsrd/olsrd-current/lib/tas/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15005/lib/tas/src
Modified Files:
glua.c http.c os_unix.c
Log Message:
* added -Wcast-qual: this killed lots of unnecessary type-casts
Index: glua.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/glua.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** glua.c 16 Nov 2007 19:12:55 -0000 1.5
--- glua.c 16 Nov 2007 22:56:54 -0000 1.6
***************
*** 295,299 ****
struct connInfo *info;
! lua_pushlightuserdata(lua, (void *)&infoKey);
lua_gettable(lua, LUA_REGISTRYINDEX);
--- 295,299 ----
struct connInfo *info;
! lua_pushlightuserdata(lua, &infoKey);
lua_gettable(lua, LUA_REGISTRYINDEX);
***************
*** 314,318 ****
return luaL_error(lua, "cannot convert value to string");
! writeBuff(&info->write[2], (unsigned char *)strConv, strlen(strConv));
lua_pop(lua, 1);
--- 314,318 ----
return luaL_error(lua, "cannot convert value to string");
! writeBuff(&info->write[2], (const unsigned char *)strConv, strlen(strConv));
lua_pop(lua, 1);
***************
*** 327,331 ****
char *line;
! lua_pushlightuserdata(lua, (void *)&infoKey);
lua_gettable(lua, LUA_REGISTRYINDEX);
--- 327,331 ----
char *line;
! lua_pushlightuserdata(lua, &infoKey);
lua_gettable(lua, LUA_REGISTRYINDEX);
***************
*** 336,341 ****
chomp(line, strlen(line));
! writeBuff(&info->write[1], (unsigned char *)line, strlen(line));
! writeBuff(&info->write[1], (unsigned char *)"\r\n", 2);
freeMem(line);
--- 336,341 ----
chomp(line, strlen(line));
! writeBuff(&info->write[1], (const unsigned char *)line, strlen(line));
! writeBuff(&info->write[1], (const unsigned char *)"\r\n", 2);
freeMem(line);
***************
*** 350,354 ****
char *s;
! lua_pushlightuserdata(lua, (void *)&infoKey);
lua_gettable(lua, LUA_REGISTRYINDEX);
--- 350,354 ----
char *s;
! lua_pushlightuserdata(lua, &infoKey);
lua_gettable(lua, LUA_REGISTRYINDEX);
***************
*** 367,371 ****
int *keepFlag;
! lua_pushlightuserdata(lua, (void *)&keepFlagKey);
lua_gettable(lua, LUA_REGISTRYINDEX);
--- 367,371 ----
int *keepFlag;
! lua_pushlightuserdata(lua, &keepFlagKey);
lua_gettable(lua, LUA_REGISTRYINDEX);
***************
*** 382,386 ****
char **argList;
! lua_pushlightuserdata(lua, (void *)&argListKey);
lua_gettable(lua, LUA_REGISTRYINDEX);
--- 382,386 ----
char **argList;
! lua_pushlightuserdata(lua, &argListKey);
lua_gettable(lua, LUA_REGISTRYINDEX);
***************
*** 449,462 ****
lua = *session;
! lua_pushlightuserdata(lua, (void *)&infoKey);
! lua_pushlightuserdata(lua, (void *)info);
lua_settable(lua, LUA_REGISTRYINDEX);
! lua_pushlightuserdata(lua, (void *)&argListKey);
! lua_pushlightuserdata(lua, (void *)argList);
lua_settable(lua, LUA_REGISTRYINDEX);
! lua_pushlightuserdata(lua, (void *)&keepFlagKey);
! lua_pushlightuserdata(lua, (void *)&keepFlag);
lua_settable(lua, LUA_REGISTRYINDEX);
--- 449,462 ----
lua = *session;
! lua_pushlightuserdata(lua, &infoKey);
! lua_pushlightuserdata(lua, info);
lua_settable(lua, LUA_REGISTRYINDEX);
! lua_pushlightuserdata(lua, &argListKey);
! lua_pushlightuserdata(lua, argList);
lua_settable(lua, LUA_REGISTRYINDEX);
! lua_pushlightuserdata(lua, &keepFlagKey);
! lua_pushlightuserdata(lua, &keepFlag);
lua_settable(lua, LUA_REGISTRYINDEX);
Index: http.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/http.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** http.c 16 Nov 2007 19:12:55 -0000 1.8
--- http.c 16 Nov 2007 22:56:54 -0000 1.9
***************
*** 865,869 ****
static void writeBuffString(struct inOutBuff *write, const char *string)
{
! writeBuff(write, (unsigned char *)string, strlen(string));
}
--- 865,869 ----
static void writeBuffString(struct inOutBuff *write, const char *string)
{
! writeBuff(write, (const unsigned char *)string, strlen(string));
}
***************
*** 949,953 ****
if (i > start)
! writeBuff(buff, (unsigned char *)(form + start), i - start);
if (form[i] == 0)
--- 949,953 ----
if (i > start)
! writeBuff(buff, (const unsigned char *)(form + start), i - start);
if (form[i] == 0)
***************
*** 955,959 ****
if (form[i + 1] == '%')
! writeBuff(buff, (unsigned char *)"%", 1);
else if (form[i + 1] == 's')
--- 955,959 ----
if (form[i + 1] == '%')
! writeBuff(buff, (const unsigned char *)"%", 1);
else if (form[i + 1] == 's')
Index: os_unix.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/os_unix.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** os_unix.c 19 Apr 2007 23:01:32 -0000 1.6
--- os_unix.c 16 Nov 2007 22:56:54 -0000 1.7
***************
*** 435,440 ****
static int addrFromSockAddr(struct ipAddr *addr, const struct sockaddr *sockAddr)
{
! struct sockaddr_in *sockAddr4 = (struct sockaddr_in *)sockAddr;
! struct sockaddr_in6 *sockAddr6 = (struct sockaddr_in6 *)sockAddr;
memset(addr, 0, sizeof (struct ipAddr));
--- 435,440 ----
static int addrFromSockAddr(struct ipAddr *addr, const struct sockaddr *sockAddr)
{
! const struct sockaddr_in *sockAddr4 = (const struct sockaddr_in *)sockAddr;
! const struct sockaddr_in6 *sockAddr6 = (const struct sockaddr_in6 *)sockAddr;
memset(addr, 0, sizeof (struct ipAddr));
More information about the Olsr-cvs
mailing list