summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-11-23 21:43:15 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-11-23 22:31:11 +0100
commit35dece848d46456441d75181953290a23193e84c (patch)
tree9d3b79f1f811fb0d3c24bcba27b923a026d0a490
parentlib: Fixup of NULL calls to XSTRDUP (diff)
downloadfrr-35dece848d46456441d75181953290a23193e84c.tar.xz
frr-35dece848d46456441d75181953290a23193e84c.zip
Quagga: Fixup some compile warnings
Fixup compile warnings for when you turn on --enable-gcc-ultra-verbose=yes Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--bgpd/bgp_main.c4
-rw-r--r--isisd/isis_main.c6
-rw-r--r--isisd/topology/random.c10
-rw-r--r--lib/sockunion.c6
-rw-r--r--ospfclient/ospfclient.c2
-rw-r--r--ospfd/ospf_spf.c2
-rw-r--r--ripngd/ripng_offset.c2
-rw-r--r--ripngd/ripng_route.c2
-rw-r--r--vtysh/vtysh_config.c2
-rw-r--r--vtysh/vtysh_user.c2
-rw-r--r--zebra/zebra_fpm.c2
11 files changed, 20 insertions, 20 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index bf154db04..c61940833 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -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;
diff --git a/isisd/isis_main.c b/isisd/isis_main.c
index a19399c5a..e28846bf6 100644
--- a/isisd/isis_main.c
+++ b/isisd/isis_main.c
@@ -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");
diff --git a/isisd/topology/random.c b/isisd/topology/random.c
index c49c08202..157cbdb27 100644
--- a/isisd/topology/random.c
+++ b/isisd/topology/random.c
@@ -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;
diff --git a/lib/sockunion.c b/lib/sockunion.c
index 7e9e78628..2dbe34c21 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -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++)
{
diff --git a/ospfclient/ospfclient.c b/ospfclient/ospfclient.c
index 3608ebaca..1cc9ea629 100644
--- a/ospfclient/ospfclient.c
+++ b/ospfclient/ospfclient.c
@@ -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");
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 71ba8e9ea..f50d82e2e 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -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;
}
diff --git a/ripngd/ripng_offset.c b/ripngd/ripng_offset.c
index 5bc2568e8..4ed6e9b0c 100644
--- a/ripngd/ripng_offset.c
+++ b/ripngd/ripng_offset.c
@@ -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;
diff --git a/ripngd/ripng_route.c b/ripngd/ripng_route.c
index d4bf0262b..ab37dfcdb 100644
--- a/ripngd/ripng_route.c
+++ b/ripngd/ripng_route.c
@@ -32,7 +32,7 @@
#include "ripngd/ripng_route.h"
static struct ripng_aggregate *
-ripng_aggregate_new ()
+ripng_aggregate_new (void)
{
struct ripng_aggregate *new;
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c
index 0bd82b95d..d8a568f76 100644
--- a/vtysh/vtysh_config.c
+++ b/vtysh/vtysh_config.c
@@ -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));
diff --git a/vtysh/vtysh_user.c b/vtysh/vtysh_user.c
index 985c53dce..0e314bcbb 100644
--- a/vtysh/vtysh_user.c
+++ b/vtysh/vtysh_user.c
@@ -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));
}
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index 54a13654c..b827b994e 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -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;