[Olsr-cvs] olsrd-current/lib/tas/src glua.c, 1.1, 1.2 http.c, 1.4, 1.5 os_unix.c, 1.3, 1.4 plugin.c, 1.5, 1.6

Andreas T�nnesen (spam-protected)
Thu Nov 10 20:50:44 CET 2005


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

Modified Files:
	glua.c http.c os_unix.c plugin.c 
Log Message:
Removed warnings from over-eager gcc 4.0. Thomas: These are just quick cast fixes, you want to do this dirrerently

Index: glua.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/glua.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** glua.c	12 Apr 2005 17:17:25 -0000	1.1
--- glua.c	10 Nov 2005 19:50:42 -0000	1.2
***************
*** 158,162 ****
    for (;;)
    {
!     if (code == 0 && (i == lspLen || strncmp(buff + i, "<?lua", 5) == 0))
      {
        fprintf(file, "tas.write(\"");
--- 158,162 ----
    for (;;)
    {
!     if (code == 0 && (i == lspLen || strncmp((char *)(buff + i), "<?lua", 5) == 0))
      {
        fprintf(file, "tas.write(\"");
***************
*** 186,190 ****
      }
  
!     if (code == 1 && (i == lspLen || strncmp(buff + i, "?>", 2) == 0))
      {
        for (k = start; k < i; k++)
--- 186,190 ----
      }
  
!     if (code == 1 && (i == lspLen || strncmp((char *)(buff + i), "?>", 2) == 0))
      {
        for (k = start; k < i; k++)
***************
*** 299,303 ****
        return luaL_error(lua, "cannot convert value to string");
  
!     writeBuff(&info->write[2], strConv, strlen(strConv));
  
      lua_pop(lua, 1);
--- 299,303 ----
        return luaL_error(lua, "cannot convert value to string");
  
!     writeBuff(&info->write[2], (unsigned char *)strConv, strlen(strConv));
  
      lua_pop(lua, 1);
***************
*** 321,326 ****
    chomp(line, strlen(line));
  
!   writeBuff(&info->write[1], line, strlen(line));
!   writeBuff(&info->write[1], "\r\n", 2);
  
    freeMem(line);
--- 321,326 ----
    chomp(line, strlen(line));
  
!   writeBuff(&info->write[1], (unsigned char *)line, strlen(line));
!   writeBuff(&info->write[1], (unsigned char *)"\r\n", 2);
  
    freeMem(line);

Index: http.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/http.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** http.c	29 May 2005 12:47:44 -0000	1.4
--- http.c	10 Nov 2005 19:50:42 -0000	1.5
***************
*** 861,865 ****
  static void writeBuffString(struct inOutBuff *write, const char *string)
  {
!   writeBuff(write, string, strlen(string));
  }
  
--- 861,865 ----
  static void writeBuffString(struct inOutBuff *write, const char *string)
  {
!   writeBuff(write, (unsigned char *)string, strlen(string));
  }
  
***************
*** 945,949 ****
  
      if (i > start)
!       writeBuff(buff, form + start, i - start);
  
      if (form[i] == 0)
--- 945,949 ----
  
      if (i > start)
!       writeBuff(buff, (unsigned char *)(form + start), i - start);
  
      if (form[i] == 0)
***************
*** 951,955 ****
  
      if (form[i + 1] == '%')
!       writeBuff(buff, "%", 1);
  
      else if (form[i + 1] == 's')
--- 951,955 ----
  
      if (form[i + 1] == '%')
!       writeBuff(buff, (unsigned char *)"%", 1);
  
      else if (form[i + 1] == 's')
***************
*** 1123,1127 ****
      line = allocBuff(info, len);
  
!     readBuff(&info->read, line, len);
      chomp(line, len);
  
--- 1123,1127 ----
      line = allocBuff(info, len);
  
!     readBuff(&info->read, (unsigned char *)line, len);
      chomp(line, len);
  
***************
*** 1246,1250 ****
      line = allocBuff(info, len);
  
!     readBuff(&info->read, line, len);
      chomp(line, len);
  
--- 1246,1250 ----
      line = allocBuff(info, len);
  
!     readBuff(&info->read, (unsigned char *)line, len);
      chomp(line, len);
  
***************
*** 1381,1385 ****
        tmp2 = allocBuff(info, strlen(tmp) * 3 / 4 + 1);
  
!       if (decBase64(tmp2, tmp) < 0)
        {
          error("base-64 decode failed\n");
--- 1381,1385 ----
        tmp2 = allocBuff(info, strlen(tmp) * 3 / 4 + 1);
  
!       if (decBase64((unsigned char *)tmp2, tmp) < 0)
        {
          error("base-64 decode failed\n");

Index: plugin.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/plugin.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** plugin.c	29 May 2005 12:47:44 -0000	1.5
--- plugin.c	10 Nov 2005 19:50:42 -0000	1.6
***************
*** 86,95 ****
  
  static int iterIndex;
  static struct interface *iterIntTab = NULL;
  static struct link_entry *iterLinkTab = NULL;
  static struct neighbor_entry *iterNeighTab = NULL;
- static struct mid_entry *iterMidTab = NULL;
  static struct tc_entry *iterTcTab = NULL;
- static struct hna_entry *iterHnaTab = NULL;
  static struct rt_entry *iterRouteTab = NULL;
  
--- 86,99 ----
  
  static int iterIndex;
+ #if 0
+ /* not used */
  static struct interface *iterIntTab = NULL;
+ static struct mid_entry *iterMidTab = NULL;
+ static struct hna_entry *iterHnaTab = NULL;
+ #endif
+ 
  static struct link_entry *iterLinkTab = NULL;
  static struct neighbor_entry *iterNeighTab = NULL;
  static struct tc_entry *iterTcTab = NULL;
  static struct rt_entry *iterRouteTab = NULL;
  
***************
*** 327,333 ****
  }
  
! static void parserFunc(unsigned char *mess, struct interface *inInt,
                         union olsr_ip_addr *neighIntAddr)
  {
    union olsr_ip_addr *orig = (union olsr_ip_addr *)(mess + 4);
    unsigned short seqNo = (mess[ipAddrLen + 6] << 8) | mess[ipAddrLen + 7];
--- 331,338 ----
  }
  
! static void parserFunc(union olsr_message *msg, struct interface *inInt,
                         union olsr_ip_addr *neighIntAddr)
  {
+   char *mess = (char *)msg;
    union olsr_ip_addr *orig = (union olsr_ip_addr *)(mess + 4);
    unsigned short seqNo = (mess[ipAddrLen + 6] << 8) | mess[ipAddrLen + 7];
***************
*** 384,388 ****
    }
  
!   olsr_forward_message((union olsr_message *)mess, orig, seqNo, inInt, neighIntAddr);
  }
  
--- 389,393 ----
    }
  
!   olsr_forward_message(msg, orig, seqNo, inInt, neighIntAddr);
  }
  

Index: os_unix.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/os_unix.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** os_unix.c	29 May 2005 12:47:44 -0000	1.3
--- os_unix.c	10 Nov 2005 19:50:42 -0000	1.4
***************
*** 498,502 ****
  {
    struct sockaddr sockAddr;
!   int len;
    int sock;
    int flags;
--- 498,502 ----
  {
    struct sockaddr sockAddr;
!   socklen_t len;
    int sock;
    int flags;





More information about the Olsr-cvs mailing list