[Olsr-dev] [PATCH 01/12] ip_frontend: remove unused variable

Ferry Huberts (spam-protected)
Thu Jun 9 13:42:47 CEST 2011


From: Ferry Huberts <(spam-protected)>

src/ipc_frontend.c:355:9: warning: variable ‘msg’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 src/ipc_frontend.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/ipc_frontend.c b/src/ipc_frontend.c
index 50f52c4..0673da7 100644
--- a/src/ipc_frontend.c
+++ b/src/ipc_frontend.c
@@ -351,13 +351,9 @@ static int
 ipc_send_net_info(int fd)
 {
   struct ipc_net_msg *net_msg;
-  //int x, i;
-  char *msg;
 
   net_msg = olsr_malloc(sizeof(struct ipc_net_msg), "send net info");
 
-  msg = (char *)net_msg;
-
   OLSR_PRINTF(1, "Sending net-info to front end...\n");
 
   memset(net_msg, 0, sizeof(struct ipc_net_msg));
@@ -389,8 +385,10 @@ ipc_send_net_info(int fd)
   net_msg->main_addr = olsr_cnf->main_addr;
 
   /*
+  {
+     unsigned int x, i;
+
      printf("\t");
-     x = 0;
      for(i = 0; i < sizeof(struct ipc_net_msg);i++)
      {
      if(x == 4)
@@ -399,11 +397,12 @@ ipc_send_net_info(int fd)
      printf("\n\t");
      }
      x++;
-     printf(" %03i", (u_char) msg[i]);
+     printf(" %03i", ((u_char *)net_msg)[i]);
      }
 
      printf("\n");
-   */
+  }
+  */
 
   if (send(fd, (char *)net_msg, sizeof(struct ipc_net_msg), MSG_NOSIGNAL) < 0) {
     OLSR_PRINTF(1, "(NETINFO)IPC connection lost!\n");
-- 
1.7.5.2





More information about the Olsr-dev mailing list