[Olsr-cvs] olsrd-current/src plugin_util.c,1.3,1.4

Bernd Petrovitsch (spam-protected)
Sun Sep 2 23:04:45 CEST 2007


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

Modified Files:
	plugin_util.c 
Log Message:
* use "__attribute__((unused))" instead of empty code

Index: plugin_util.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/plugin_util.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** plugin_util.c	25 Aug 2007 19:48:42 -0000	1.3
--- plugin_util.c	2 Sep 2007 21:04:42 -0000	1.4
***************
*** 45,53 ****
  #include "defs.h"
  
! int set_plugin_port(const char *value, void *data, unsigned int addon)
  {
      char *endptr;
      const unsigned int port = strtoul(value, &endptr, 0);
-     if (addon) {}
      if (*endptr != '\0' || endptr == value) {
          OLSR_PRINTF(0, "Illegal port number \"%s\"", value);
--- 45,52 ----
  #include "defs.h"
  
! int set_plugin_port(const char *value, void *data, unsigned int addon __attribute__((unused)))
  {
      char *endptr;
      const unsigned int port = strtoul(value, &endptr, 0);
      if (*endptr != '\0' || endptr == value) {
          OLSR_PRINTF(0, "Illegal port number \"%s\"", value);
***************
*** 68,76 ****
  }
  
! int set_plugin_ipaddress(const char *value, void *data, unsigned int addon)
  {
      char buf[INET6_ADDRSTRLEN];
      union olsr_ip_addr ip_addr;
-     if (addon) {}
      if (inet_pton(olsr_cnf->ip_version, value, &ip_addr) <= 0) {
          OLSR_PRINTF(0, "Illegal IP address \"%s\"", value);
--- 67,74 ----
  }
  
! int set_plugin_ipaddress(const char *value, void *data, unsigned int addon __attribute__((unused)))
  {
      char buf[INET6_ADDRSTRLEN];
      union olsr_ip_addr ip_addr;
      if (inet_pton(olsr_cnf->ip_version, value, &ip_addr) <= 0) {
          OLSR_PRINTF(0, "Illegal IP address \"%s\"", value);
***************
*** 89,96 ****
  
  
! int set_boolean(const char *value, void *data, unsigned int addon)
  {
      int *v = data;
-     if (addon) {}
      if (strcasecmp (value, "yes") == 0) {
          *v = 1;
--- 87,93 ----
  
  
! int set_boolean(const char *value, void *data, unsigned int addon __attribute__((unused)))
  {
      int *v = data;
      if (strcasecmp (value, "yes") == 0) {
          *v = 1;
***************
*** 103,111 ****
  }
  
! int set_plugin_int(const char *value, void *data, unsigned int addon)
  {
      char *endptr;
      const int theint = strtol(value, &endptr, 0);
-     if (addon) {}
      if (*endptr != '\0' || endptr == value) {
          OLSR_PRINTF(0, "Illegal int \"%s\"", value);
--- 100,107 ----
  }
  
! int set_plugin_int(const char *value, void *data, unsigned int addon __attribute__((unused)))
  {
      char *endptr;
      const int theint = strtol(value, &endptr, 0);
      if (*endptr != '\0' || endptr == value) {
          OLSR_PRINTF(0, "Illegal int \"%s\"", value);





More information about the Olsr-cvs mailing list