]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Quagga: Fixup some compile warnings
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 23 Nov 2015 20:43:15 +0000 (12:43 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 23 Nov 2015 21:31:11 +0000 (13:31 -0800)
Fixup compile warnings for when you turn on --enable-gcc-ultra-verbose=yes

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_main.c
isisd/isis_main.c
isisd/topology/random.c
lib/sockunion.c
ospfclient/ospfclient.c
ospfd/ospf_spf.c
ripngd/ripng_offset.c
ripngd/ripng_route.c
vtysh/vtysh_config.c
vtysh/vtysh_user.c
zebra/zebra_fpm.c

index bf154db046ce3b61a1e82a20b6ee8af8fd648633..c61940833c28ba12c50bab4a1af0b70961c610fd 100644 (file)
@@ -192,7 +192,7 @@ sighup (void)
 }
 
 /* SIGINT handler. */
-void
+__attribute__((__noreturn__)) void
 sigint (void)
 {
   zlog_notice ("Terminating on signal");
@@ -218,7 +218,7 @@ sigusr1 (void)
   Zebra route removal and protocol teardown are not meant to be done here.
   For example, "retain_mode" may be set.
 */
-static void
+static __attribute__((__noreturn__)) void
 bgp_exit (int status)
 {
   struct bgp *bgp;
index a19399c5a2a66c782a8f36a0b09b7751daeee36c..e28846bf6fb64845eaaac8baf97e64f9c2bbd1de 100644 (file)
@@ -164,7 +164,7 @@ reload ()
       safe_strerror (errno));
 }
 
-static void
+static __attribute__((__noreturn__)) void
 terminate (int i)
 {
   exit (i);
@@ -183,14 +183,14 @@ sighup (void)
   return;
 }
 
-void
+__attribute__((__noreturn__)) void
 sigint (void)
 {
   zlog_notice ("Terminating on signal SIGINT");
   terminate (0);
 }
 
-void
+__attribute__((__noreturn__)) void
 sigterm (void)
 {
   zlog_notice ("Terminating on signal SIGTERM");
index c49c08202191e3349015d229dbe527af6c2ec24c..157cbdb274b0fdb84003e2612db2a76c43cca36b 100644 (file)
@@ -20,7 +20,7 @@ double randg01(void);
 long nrand(long);
 void free_arc(void *);
 
-unsigned long timer ()
+unsigned long timer (void)
    { struct tms hold;
 
         times(&hold);
@@ -88,7 +88,7 @@ long init_seed;
 #define  B   2147483647
 #define  BF  2147483647.
 
-static long irand ()
+static long irand (void)
 
 { internal_seed = ( internal_seed * A ) & B;
   return (long) internal_seed ;
@@ -107,7 +107,7 @@ static long irand ()
 #define A1   37252
 #define A2   29589
 
-static long xrand()
+static long xrand(void)
 
 { unsigned long is1, is2;
 
@@ -122,7 +122,7 @@ static long xrand()
 /*********************************************************************/
 
 
-double rand01()
+double rand01(void)
 
 { return  (double) (irand() / BF) ;
 }
@@ -131,7 +131,7 @@ double rand01()
 
 #define NK  12
 
-double randg01()
+double randg01(void)
 
 { int i;
   double sum = 0;
index 7e9e78628c494b79f0aa984830d1eb774300a9a7..2dbe34c21a0418f6ca6d27985dca8b05fc511b58 100644 (file)
@@ -758,10 +758,10 @@ static int
 in6addr_cmp (struct in6_addr *addr1, struct in6_addr *addr2)
 {
   unsigned int i;
-  u_char *p1, *p2;
+  const u_char *p1, *p2;
 
-  p1 = (u_char *)addr1;
-  p2 = (u_char *)addr2;
+  p1 = (const u_char *)addr1;
+  p2 = (const u_char *)addr2;
 
   for (i = 0; i < sizeof (struct in6_addr); i++)
     {
index 3608ebaca3e0db3e10a3cf8d0465fa20e0583666..1cc9ea6299de39c8ebf2e50b4eb1989b3aefb520 100644 (file)
@@ -250,7 +250,7 @@ nsm_change_callback (struct in_addr ifaddr, struct in_addr nbraddr,
  * ---------------------------------------------------------
  */
 
-static int usage()
+static int usage(void)
 {
   printf("Usage: ospfclient <ospfd> <lsatype> <opaquetype> <opaqueid> <ifaddr> <areaid>\n");
   printf("where ospfd     : router where API-enabled OSPF daemon is running\n");
index 71ba8e9ea72b84f5f3ab55fa02731a32346f14f1..f50d82e2e0217eda61fdf634d0241e13d1223905 100644 (file)
@@ -50,7 +50,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 static unsigned int spf_reason_flags = 0;
 
-static void ospf_clear_spf_reason_flags ()
+static void ospf_clear_spf_reason_flags (void )
 {
   spf_reason_flags = 0;
 }
index 5bc2568e8db10fbafae8b8ab95c7afe21924bf82..4ed6e9b0c45e99041d49eb9978600c48eca2535c 100644 (file)
@@ -65,7 +65,7 @@ strcmp_safe (const char *s1, const char *s2)
 }
 
 static struct ripng_offset_list *
-ripng_offset_list_new ()
+ripng_offset_list_new (void)
 {
   struct ripng_offset_list *new;
 
index d4bf0262ba4df19c19093cb2e4eb3a4501c8755b..ab37dfcdbb9b8ad3b583ae71d3cdfb9bafadfe70 100644 (file)
@@ -32,7 +32,7 @@
 #include "ripngd/ripng_route.h"
 
 static struct ripng_aggregate *
-ripng_aggregate_new ()
+ripng_aggregate_new (void)
 {
   struct ripng_aggregate *new;
 
index 0bd82b95d8185717707e9e976329763200ccea91..d8a568f7697833e2d70fa1d8f63f1c97553b06dc 100644 (file)
@@ -76,7 +76,7 @@ line_del (char *line)
 }
 
 struct config *
-config_new ()
+config_new (void)
 {
   struct config *config;
   config = XCALLOC (MTYPE_VTYSH_CONFIG, sizeof (struct config));
index 985c53dcebf566e151bd63a30447d4cdc059101e..0e314bcbbda0d5e872f1f000782dd84d0f588fc9 100644 (file)
@@ -116,7 +116,7 @@ struct vtysh_user
 struct list *userlist;
 
 struct vtysh_user *
-user_new ()
+user_new (void)
 {
   return XCALLOC (0, sizeof (struct vtysh_user));
 }
index 54a13654c6db64881fdee8d45ce0da4d7cb94000..b827b994e3535b70f9e847a97f3dc25dc0aff5cd 100644 (file)
@@ -603,7 +603,7 @@ zfpm_connection_up (const char *detail)
  * Check if an asynchronous connect() to the FPM is complete.
  */
 static void
-zfpm_connect_check ()
+zfpm_connect_check (void)
 {
   int status;
   socklen_t slen;