From c77704cb60731a8d4b3c5301720aeacfad83592f Mon Sep 17 00:00:00 2001 From: Marty Connor Date: Tue, 3 Jul 2007 13:20:22 -0400 Subject: [PATCH] Warnings purge: src/{crypto,hci,net} --- src/crypto/axtls/bigint.c | 2 +- src/hci/commands/dhcp_cmd.c | 5 +++++ src/hci/mucurses/ansi_screen.c | 1 + src/hci/readline.c | 1 + src/hci/shell_banner.c | 1 + src/hci/tui/settings_ui.c | 1 + src/include/gpxe/ip6.h | 2 +- src/net/ipv6.c | 8 ++++---- 8 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/crypto/axtls/bigint.c b/src/crypto/axtls/bigint.c index 55482f0a..253707e7 100644 --- a/src/crypto/axtls/bigint.c +++ b/src/crypto/axtls/bigint.c @@ -482,7 +482,7 @@ bigint *bi_divide(BI_CTX *ctx, bigint *u, bigint *v, int is_mod) /* * Perform an integer divide on a bigint. */ -static bigint *bi_int_divide(BI_CTX *ctx, bigint *biR, comp denom) +static bigint *bi_int_divide(__unused BI_CTX *ctx, bigint *biR, comp denom) { int i = biR->size - 1; long_comp r = 0; diff --git a/src/hci/commands/dhcp_cmd.c b/src/hci/commands/dhcp_cmd.c index 208f3557..07acc615 100644 --- a/src/hci/commands/dhcp_cmd.c +++ b/src/hci/commands/dhcp_cmd.c @@ -16,9 +16,14 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include +#include +#include +#include +#include #include #include #include diff --git a/src/hci/mucurses/ansi_screen.c b/src/hci/mucurses/ansi_screen.c index aef86f41..e77fcdc6 100644 --- a/src/hci/mucurses/ansi_screen.c +++ b/src/hci/mucurses/ansi_screen.c @@ -1,3 +1,4 @@ +#include #include #include diff --git a/src/hci/readline.c b/src/hci/readline.c index 420df648..7df8b6bb 100644 --- a/src/hci/readline.c +++ b/src/hci/readline.c @@ -16,6 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/src/hci/shell_banner.c b/src/hci/shell_banner.c index 0448f99c..1413fe16 100644 --- a/src/hci/shell_banner.c +++ b/src/hci/shell_banner.c @@ -16,6 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c index 112eadeb..3524f3c3 100644 --- a/src/hci/tui/settings_ui.c +++ b/src/hci/tui/settings_ui.c @@ -16,6 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/src/include/gpxe/ip6.h b/src/include/gpxe/ip6.h index 37c0781d..22989ec9 100644 --- a/src/include/gpxe/ip6.h +++ b/src/include/gpxe/ip6.h @@ -24,7 +24,7 @@ #define MIN_IOB_LEN MAX_HDR_LEN + 100 /* To account for padding by LL */ #define IP6_EQUAL( in6_addr1, in6_addr2 ) \ - ( strncmp ( ( char* ) &( in6_addr1 ), ( char* ) &( in6_addr2 ),\ + ( memcmp ( ( char* ) &( in6_addr1 ), ( char* ) &( in6_addr2 ),\ sizeof ( struct in6_addr ) ) == 0 ) #define IS_UNSPECIFIED( addr ) \ diff --git a/src/net/ipv6.c b/src/net/ipv6.c index 86074065..3b7429b8 100644 --- a/src/net/ipv6.c +++ b/src/net/ipv6.c @@ -204,7 +204,7 @@ static int ipv6_tx ( struct io_buffer *iobuf, */ next_hop = dest->sin6_addr; list_for_each_entry ( miniroute, &miniroutes, list ) { - if ( ( strncmp ( &ip6hdr->dest, &miniroute->prefix, + if ( ( memcmp ( &ip6hdr->dest, &miniroute->prefix, miniroute->prefix_len ) == 0 ) || ( IP6_EQUAL ( miniroute->gateway, ip6_none ) ) ) { netdev = miniroute->netdev; @@ -295,8 +295,8 @@ static int ipv6_process_nxt_hdr ( struct io_buffer *iobuf, uint8_t nxt_hdr, * This function processes a IPv6 packet */ static int ipv6_rx ( struct io_buffer *iobuf, - struct net_device *netdev, - const void *ll_source ) { + __unused struct net_device *netdev, + __unused const void *ll_source ) { struct ip6_header *ip6hdr = iobuf->data; union { @@ -316,7 +316,7 @@ static int ipv6_rx ( struct io_buffer *iobuf, ipv6_dump ( ip6hdr ); /* Check header version */ - if ( ip6hdr->ver_traffic_class_flow_label & 0xf0000000 != 0x60000000 ) { + if ( ( ip6hdr->ver_traffic_class_flow_label & 0xf0000000 ) != 0x60000000 ) { DBG ( "Invalid protocol version\n" ); goto drop; }