]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Clean up some more compile warnings
authorDonald Sharp <sharpd@cumulusnetwroks.com>
Wed, 25 May 2016 23:43:00 +0000 (19:43 -0400)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 26 May 2016 00:38:35 +0000 (20:38 -0400)
Turns out we were missing $(WERROR) for compiling pimd
so we were not catching compile warning issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/Makefile.am
pimd/pim_mroute.c
pimd/pim_register.c

index 954ffd91603b3bc384528d054fe29619050a8698..4477f024e3331c868e010f04361f1f2da8655c69 100644 (file)
@@ -39,7 +39,7 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" $(PIM_DEFS)
 INSTALL_SDATA=@INSTALL@ -m 600
 LIBS = @LIBS@
 
-AM_CFLAGS = $(PICFLAGS)
+AM_CFLAGS = $(PICFLAGS) $(WERROR)
 AM_LDFLAGS = $(PILDFLAGS)
 
 noinst_LIBRARIES = libpim.a
index eefa392799b57f39d907b9b0ae7008e8742f7565..5e1ab94b7c61b1b2336bc81a1dce960194287654 100644 (file)
@@ -308,7 +308,7 @@ int pim_mroute_msg(int fd, const char *buf, int buf_size)
     break;
   case IGMPMSG_WHOLEPKT:
     zlog_hexdump(buf, buf_size);
-    return pim_mroute_msg_wholepkt(fd, ifp, msg, src_str, grp_str);
+    return pim_mroute_msg_wholepkt(fd, ifp, (const char *)msg, src_str, grp_str);
     break;
   default:
     break;
index 3fc4a61ae46f5e4c082823774f778fc06c691b70..11717acf0c334ea56d5b60b11a48cf67714c02ef 100644 (file)
@@ -86,7 +86,7 @@ pim_register_send (const struct ip *ip_hdr, struct pim_rpf *rpg)
   b1 = buffer + PIM_MSG_REGISTER_LEN;
 
   plen = ntohs(ip_hdr->ip_len);
-  memcpy(b1, (unsigned char *)ip_hdr, plen);
+  memcpy(b1, (const unsigned char *)ip_hdr, plen);
 
   pim_msg_build_header(buffer, plen + PIM_MSG_HEADER_LEN, PIM_MSG_TYPE_REGISTER);
 
@@ -155,10 +155,10 @@ pim_register_recv (struct interface *ifp,
 {
   int sentRegisterStop = 0;
   struct ip *ip_hdr;
-  size_t hlen;
+  //size_t hlen;
   struct in_addr group = { .s_addr = 0 };
   struct in_addr source = { .s_addr = 0 };
-  uint8_t *msg;
+  //uint8_t *msg;
   uint32_t *bits;
 
   if (!pim_check_is_my_ip_address (dest_addr)) {
@@ -194,8 +194,8 @@ pim_register_recv (struct interface *ifp,
    */
   bits = (uint32_t *)tlv_buf;
   ip_hdr = (struct ip *)(tlv_buf + PIM_MSG_REGISTER_LEN);
-  hlen = (ip_hdr->ip_hl << 2) | PIM_MSG_REGISTER_LEN;
-  msg = (uint8_t *)tlv_buf + hlen;
+  //hlen = (ip_hdr->ip_hl << 2) | PIM_MSG_REGISTER_LEN;
+  //msg = (uint8_t *)tlv_buf + hlen;
   source = ip_hdr->ip_src;
   group = ip_hdr->ip_dst;