[Olsr-cvs] olsrd-current/lib/tas/src glua.c, 1.4, 1.5 glua_ext.c, 1.3, 1.4 http.c, 1.7, 1.8 http.h, 1.3, 1.4 lib.c, 1.2, 1.3 lib.h, 1.3, 1.4

Bernd Petrovitsch (spam-protected)
Fri Nov 16 20:12:57 CET 2007


Update of /cvsroot/olsrd/olsrd-current/lib/tas/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27640/lib/tas/src

Modified Files:
	glua.c glua_ext.c http.c http.h lib.c lib.h 
Log Message:
* added -Wwrite-strings

Index: glua_ext.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/glua_ext.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** glua_ext.c	13 Apr 2005 22:53:13 -0000	1.3
--- glua_ext.c	16 Nov 2007 19:12:55 -0000	1.4
***************
*** 175,179 ****
  }
  
! static void addTable(lua_State *lua, char *name, void (*init)(void),
                       int (*next)(char *buff, int len))
  {
--- 175,179 ----
  }
  
! static void addTable(lua_State *lua, const char *name, void (*init)(void),
                       int (*next)(char *buff, int len))
  {

Index: lib.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/lib.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** lib.c	12 Apr 2005 19:57:26 -0000	1.2
--- lib.c	16 Nov 2007 19:12:55 -0000	1.3
***************
*** 55,59 ****
  static unsigned int debugMask = 0;
  
! void error(char *form, ...)
  {
    va_list args;
--- 55,59 ----
  static unsigned int debugMask = 0;
  
! void error(const char *form, ...)
  {
    va_list args;
***************
*** 64,68 ****
  }
  
! void debug(int facility, char *form, ...)
  {
    va_list args;
--- 64,68 ----
  }
  
! void debug(int facility, const char *form, ...)
  {
    va_list args;

Index: lib.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/lib.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** lib.h	20 Apr 2007 13:46:03 -0000	1.3
--- lib.h	16 Nov 2007 19:12:55 -0000	1.4
***************
*** 51,56 ****
  #define DEBUG_QUANTUM 32
  
! extern void error(char *form, ...) __attribute__((format(printf,1,2)));
! extern void debug(int facility, char *form, ...) __attribute__((format(printf,2,3)));
  extern char *strdupAdd(const char *string, int add);
  extern char *myStrdup(const char *string);
--- 51,56 ----
  #define DEBUG_QUANTUM 32
  
! extern void error(const char *form, ...) __attribute__((format(printf,1,2)));
! extern void debug(int facility, const char *form, ...) __attribute__((format(printf,2,3)));
  extern char *strdupAdd(const char *string, int add);
  extern char *myStrdup(const char *string);

Index: http.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/http.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** http.c	17 Sep 2007 21:57:06 -0000	1.7
--- http.c	16 Nov 2007 19:12:55 -0000	1.8
***************
*** 69,79 ****
  static struct ipAddr confAddr;
  static int confPort;
! static char *confRootDir;
! static char *confWorkDir;
! static char *confIndexFile;
  static char *confUser;
  static char *confPassword;
  static int confSessTime;
! static char *confPubDir;
  static int confQuantum;
  static int confMessTime;
--- 69,79 ----
  static struct ipAddr confAddr;
  static int confPort;
! static const char *confRootDir;
! static const char *confWorkDir;
! static const char *confIndexFile;
  static char *confUser;
  static char *confPassword;
  static int confSessTime;
! static const char *confPubDir;
  static int confQuantum;
  static int confMessTime;
***************
*** 105,110 ****
  static struct extMap
  {
!   char *ext;
!   char *type;
    int state;
  }
--- 105,110 ----
  static struct extMap
  {
!   const char *ext;
!   const char *type;
    int state;
  }
***************
*** 201,205 ****
  static void encHexString(char *hexString, unsigned char *hex, int len)
  {
!   static char *map = "0123456789ABCDEF";
  
    while (len-- > 0)
--- 201,205 ----
  static void encHexString(char *hexString, unsigned char *hex, int len)
  {
!   static const char map[] = "0123456789ABCDEF";
  
    while (len-- > 0)
***************
*** 975,979 ****
  }
  
! static char *errNoToErrStr(int errNo)
  {
    switch (errNo)
--- 975,979 ----
  }
  
! static const char *errNoToErrStr(int errNo)
  {
    switch (errNo)

Index: glua.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/glua.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** glua.c	20 Apr 2007 13:46:03 -0000	1.4
--- glua.c	16 Nov 2007 19:12:55 -0000	1.5
***************
*** 348,351 ****
--- 348,352 ----
    struct connInfo *info;
    const char *contType;
+   char *s;
  
    lua_pushlightuserdata(lua, (void *)&infoKey);
***************
*** 356,361 ****
    contType = luaL_checkstring(lua, 1);
  
!   info->contType = allocBuff(info, strlen(contType) + 1);
!   strcpy(info->contType, contType);
  
    return 0;
--- 357,362 ----
    contType = luaL_checkstring(lua, 1);
  
!   s = allocBuff(info, strlen(contType) + 1);
!   strcpy(s, contType);
  
    return 0;

Index: http.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/http.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** http.h	17 Sep 2007 21:57:06 -0000	1.3
--- http.h	16 Nov 2007 19:12:55 -0000	1.4
***************
*** 107,111 ****
    char *proto;
  
!   char *contType;
    int contLen;
  
--- 107,111 ----
    char *proto;
  
!   const char *contType;
    int contLen;
  





More information about the Olsr-cvs mailing list