aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/crypto/axtls/bigint.c2
-rw-r--r--src/hci/commands/dhcp_cmd.c5
-rw-r--r--src/hci/mucurses/ansi_screen.c1
-rw-r--r--src/hci/readline.c1
-rw-r--r--src/hci/shell_banner.c1
-rw-r--r--src/hci/tui/settings_ui.c1
-rw-r--r--src/include/gpxe/ip6.h2
-rw-r--r--src/net/ipv6.c8
8 files changed, 15 insertions, 6 deletions
diff --git a/src/crypto/axtls/bigint.c b/src/crypto/axtls/bigint.c
index 55482f0..253707e 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 208f355..07acc61 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 <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
+#include <errno.h>
+#include <stddef.h>
+#include <string.h>
+#include <assert.h>
#include <getopt.h>
#include <gpxe/netdevice.h>
#include <gpxe/command.h>
diff --git a/src/hci/mucurses/ansi_screen.c b/src/hci/mucurses/ansi_screen.c
index aef86f4..e77fcdc 100644
--- a/src/hci/mucurses/ansi_screen.c
+++ b/src/hci/mucurses/ansi_screen.c
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include <curses.h>
#include <console.h>
diff --git a/src/hci/readline.c b/src/hci/readline.c
index 420df64..7df8b6b 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 <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <console.h>
diff --git a/src/hci/shell_banner.c b/src/hci/shell_banner.c
index 0448f99..1413fe1 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 <stdio.h>
#include <console.h>
#include <latch.h>
#include <gpxe/shell_banner.h>
diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c
index 112eade..3524f3c 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 <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <string.h>
diff --git a/src/include/gpxe/ip6.h b/src/include/gpxe/ip6.h
index 37c0781..22989ec 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 8607406..3b7429b 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;
}