summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2012-01-08 16:52:36 +0400
committerPaul Jakma <paul@quagga.net>2012-03-25 17:06:52 +0100
commit3dbda0ceebe369a1071600fe7d8d8ecf45f1027c (patch)
tree1df830052d1a516bc4ec6b213b36b16d28c9868d
parentef4de4d36c2dc10a68d41e518057d04b262ec867 (diff)
babeld: address some compilation warnings
Including system headers is not necessary with zebra.h included and sometimes results in "__ASSERT_FUNCTION redefined" compilation warning. * babeld.c * babel_distribute_update_interface(): make static * babel_interface.c * interface_config_write(): unused 'babel_ifp' * don't include system headers * message.c * send_request(): unused 'babel_ifp' * send_multihop_request(): idem * don't include system headers * route.c: don't include system headers * xroute.c: idem * source.h: newline at EOF * message.h: idem
-rw-r--r--babeld/babel_interface.c14
-rw-r--r--babeld/babeld.c2
-rw-r--r--babeld/message.c12
-rw-r--r--babeld/route.c7
-rw-r--r--babeld/xroute.c8
5 files changed, 1 insertions, 42 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 0130f26b..ff9c5eb4 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -37,17 +37,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
-#include <arpa/inet.h>
-
#include <zebra.h>
#include "memory.h"
#include "log.h"
@@ -724,12 +713,9 @@ interface_config_write (struct vty *vty)
{
struct listnode *node;
struct interface *ifp;
- babel_interface_nfo *babel_ifp;
int write = 0;
for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp)) {
- babel_ifp = babel_get_if_nfo(ifp);
-
/* Do not display the interface if there is no configuration about it */
if (ifp->desc == NULL)
continue;
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 18b4e34f..3dc35b5d 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -560,7 +560,7 @@ babel_distribute_update (struct distribute *dist)
}
}
-void
+static void
babel_distribute_update_interface (struct interface *ifp)
{
struct distribute *dist;
diff --git a/babeld/message.c b/babeld/message.c
index 57d875fb..7930a1b1 100644
--- a/babeld/message.c
+++ b/babeld/message.c
@@ -37,14 +37,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <assert.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
#include <zebra.h>
#include "if.h"
@@ -1216,7 +1208,6 @@ void
send_request(struct interface *ifp,
const unsigned char *prefix, unsigned char plen)
{
- babel_interface_nfo *babel_ifp = NULL;
int v4, len;
if(ifp == NULL) {
@@ -1236,7 +1227,6 @@ send_request(struct interface *ifp,
if(!if_up(ifp))
return;
- babel_ifp = babel_get_if_nfo(ifp);
debugf(BABEL_DEBUG_COMMON,"sending request to %s for %s.",
ifp->name, prefix ? format_prefix(prefix, plen) : "any");
v4 = plen >= 96 && v4mapped(prefix);
@@ -1288,7 +1278,6 @@ send_multihop_request(struct interface *ifp,
unsigned short seqno, const unsigned char *id,
unsigned short hop_count)
{
- babel_interface_nfo *babel_ifp = NULL;
int v4, pb, len;
/* Make sure any buffered updates go out before this request. */
@@ -1308,7 +1297,6 @@ send_multihop_request(struct interface *ifp,
if(!if_up(ifp))
return;
- babel_ifp = babel_get_if_nfo(ifp);
debugf(BABEL_DEBUG_COMMON,"Sending request (%d) on %s for %s.",
hop_count, ifp->name, format_prefix(prefix, plen));
v4 = plen >= 96 && v4mapped(prefix);
diff --git a/babeld/route.c b/babeld/route.c
index a92018fd..aa181be7 100644
--- a/babeld/route.c
+++ b/babeld/route.c
@@ -37,13 +37,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <errno.h>
-#include <assert.h>
-#include <sys/time.h>
-
#include <zebra.h>
#include "if.h"
diff --git a/babeld/xroute.c b/babeld/xroute.c
index 7b09cb87..eb4aaeb5 100644
--- a/babeld/xroute.c
+++ b/babeld/xroute.c
@@ -37,14 +37,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <assert.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-
#include <zebra.h>
#include "if.h"
#include "log.h"