[Olsr-cvs] olsrd-current/src/olsr_switch commands.h, 1.8, 1.9 ohs_cmd.c, 1.24, 1.25 ohs_cmd.h, 1.6, 1.7

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


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

Modified Files:
	commands.h ohs_cmd.c ohs_cmd.h 
Log Message:
* added -Wwrite-strings

Index: ohs_cmd.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_switch/ohs_cmd.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** ohs_cmd.c	28 Jul 2007 12:58:23 -0000	1.24
--- ohs_cmd.c	16 Nov 2007 19:12:55 -0000	1.25
***************
*** 2,6 ****
  /*
   * The olsr.org Optimized Link-State Routing daemon(olsrd)
!  * Copyright (c) 2005, Andreas Tønnesen((spam-protected))
   * All rights reserved.
   *
--- 2,6 ----
  /*
   * The olsr.org Optimized Link-State Routing daemon(olsrd)
!  * Copyright (c) 2005, Andreas Tønnesen((spam-protected))
   * All rights reserved.
   *
***************
*** 63,67 ****
  
  static int
! get_next_token(char *src, char *dst, size_t buflen)
  {
    int i = 0, j = 0;
--- 63,67 ----
  
  static int
! get_next_token(const char *src, char *dst, size_t buflen)
  {
    int i = 0, j = 0;
***************
*** 89,93 ****
  
  int
! ohs_set_olsrd_path(char *path)
  {
    strncpy(olsrd_path, path, FILENAME_MAX);
--- 89,93 ----
  
  int
! ohs_set_olsrd_path(const char *path)
  {
    strncpy(olsrd_path, path, FILENAME_MAX);
***************
*** 104,110 ****
  #else
  int
! ohs_cmd_olsrd(char *args)
  {
!   char *olsrd_args[MAX_OLSRD_ARGS];
    struct in_addr iaddr;
  
--- 104,110 ----
  #else
  int
! ohs_cmd_olsrd(const char *args)
  {
!   const char *olsrd_args[MAX_OLSRD_ARGS];
    struct in_addr iaddr;
  
***************
*** 153,157 ****
  	return 1;
  
!       if(execve(olsrd_path, olsrd_args, NULL) < 0)
  	{
  	  printf("Error executing olsrd: %s\n", strerror(errno));
--- 153,157 ----
  	return 1;
  
!       if(execve(olsrd_path, (char * const *)olsrd_args, NULL) < 0)
  	{
  	  printf("Error executing olsrd: %s\n", strerror(errno));
***************
*** 237,241 ****
  
  int
! ohs_cmd_link(char *args)
  {
    olsr_u8_t bi = 0, wildc_src = 0, wildc_dst = 0;
--- 237,241 ----
  
  int
! ohs_cmd_link(const char *args)
  {
    olsr_u8_t bi = 0, wildc_src = 0, wildc_dst = 0;
***************
*** 391,395 ****
  
  int
! ohs_cmd_list(char *args)
  {
    struct ohs_connection *oc = ohs_conns;
--- 391,395 ----
  
  int
! ohs_cmd_list(const char *args)
  {
    struct ohs_connection *oc = ohs_conns;
***************
*** 440,444 ****
  
  int
! ohs_cmd_help(char *args)
  {
    int i;
--- 440,444 ----
  
  int
! ohs_cmd_help(const char *args)
  {
    int i;
***************
*** 480,484 ****
  
  int
! ohs_cmd_log(char *args)
  {
    olsr_u8_t set = 0;
--- 480,484 ----
  
  int
! ohs_cmd_log(const char *args)
  {
    olsr_u8_t set = 0;
***************
*** 541,545 ****
  
  int
! ohs_cmd_exit(char *args __attribute__((unused)))
  {
  
--- 541,545 ----
  
  int
! ohs_cmd_exit(const char *args __attribute__((unused)))
  {
  

Index: ohs_cmd.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_switch/ohs_cmd.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ohs_cmd.h	28 Jul 2007 12:53:15 -0000	1.6
--- ohs_cmd.h	16 Nov 2007 19:12:55 -0000	1.7
***************
*** 2,6 ****
  /*
   * The olsr.org Optimized Link-State Routing daemon(olsrd)
!  * Copyright (c) 2005, Andreas Tønnesen((spam-protected))
   * All rights reserved.
   *
--- 2,6 ----
  /*
   * The olsr.org Optimized Link-State Routing daemon(olsrd)
!  * Copyright (c) 2005, Andreas Tønnesen((spam-protected))
   * All rights reserved.
   *
***************
*** 49,61 ****
  struct ohs_command
  {
!   char *cmd;
!   char *syntax;
!   char *helptext_brief;
!   char *helptext_long;
!   int (*cmd_cb)(char *);
  };
  
  int
! ohs_set_olsrd_path(char *);
  
  void
--- 49,61 ----
  struct ohs_command
  {
!   const char *cmd;
!   const char *syntax;
!   const char *helptext_brief;
!   const char *helptext_long;
!   int (*cmd_cb)(const char *);
  };
  
  int
! ohs_set_olsrd_path(const char *);
  
  void
***************
*** 63,82 ****
  
  int
! ohs_cmd_olsrd(char *);
  
  int
! ohs_cmd_list(char *);
  
  int
! ohs_cmd_help(char *);
  
  int
! ohs_cmd_exit(char *) __attribute__((noreturn));
  
  int
! ohs_cmd_log(char *);
  
  int
! ohs_cmd_link(char *);
  
  #endif
--- 63,82 ----
  
  int
! ohs_cmd_olsrd(const char *);
  
  int
! ohs_cmd_list(const char *);
  
  int
! ohs_cmd_help(const char *);
  
  int
! ohs_cmd_exit(const char *) __attribute__((noreturn));
  
  int
! ohs_cmd_log(const char *);
  
  int
! ohs_cmd_link(const char *);
  
  #endif

Index: commands.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_switch/commands.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** commands.h	31 May 2007 00:16:52 -0000	1.8
--- commands.h	16 Nov 2007 19:12:55 -0000	1.9
***************
*** 2,6 ****
  /*
   * The olsr.org Optimized Link-State Routing daemon(olsrd)
!  * Copyright (c) 2005, Andreas Tønnesen((spam-protected))
   * All rights reserved.
   *
--- 2,6 ----
  /*
   * The olsr.org Optimized Link-State Routing daemon(olsrd)
!  * Copyright (c) 2005, Andreas Tønnesen((spam-protected))
   * All rights reserved.
   *
***************
*** 48,52 ****
  
  
! static struct ohs_command ohs_commands[] =
    {
      { "help", "help",
--- 48,52 ----
  
  
! static const struct ohs_command ohs_commands[] =
    {
      { "help", "help",





More information about the Olsr-cvs mailing list