Bladeren bron

Warnings purge: src/{crypto,hci,net}

tags/v0.9.3
Marty Connor 17 jaren geleden
bovenliggende
commit
c77704cb60

+ 1
- 1
src/crypto/axtls/bigint.c Bestand weergeven

@@ -482,7 +482,7 @@ bigint *bi_divide(BI_CTX *ctx, bigint *u, bigint *v, int is_mod)
482 482
 /*
483 483
  * Perform an integer divide on a bigint.
484 484
  */
485
-static bigint *bi_int_divide(BI_CTX *ctx, bigint *biR, comp denom)
485
+static bigint *bi_int_divide(__unused BI_CTX *ctx, bigint *biR, comp denom)
486 486
 {
487 487
     int i = biR->size - 1;
488 488
     long_comp r = 0;

+ 5
- 0
src/hci/commands/dhcp_cmd.c Bestand weergeven

@@ -16,9 +16,14 @@
16 16
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
  */
18 18
 
19
+#include <stdio.h>
19 20
 #include <stdint.h>
20 21
 #include <stdlib.h>
21 22
 #include <stdio.h>
23
+#include <errno.h>
24
+#include <stddef.h>
25
+#include <string.h>
26
+#include <assert.h>
22 27
 #include <getopt.h>
23 28
 #include <gpxe/netdevice.h>
24 29
 #include <gpxe/command.h>

+ 1
- 0
src/hci/mucurses/ansi_screen.c Bestand weergeven

@@ -1,3 +1,4 @@
1
+#include <stdio.h>
1 2
 #include <curses.h>
2 3
 #include <console.h>
3 4
 

+ 1
- 0
src/hci/readline.c Bestand weergeven

@@ -16,6 +16,7 @@
16 16
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
  */
18 18
 
19
+#include <stdio.h>
19 20
 #include <string.h>
20 21
 #include <stdlib.h>
21 22
 #include <console.h>

+ 1
- 0
src/hci/shell_banner.c Bestand weergeven

@@ -16,6 +16,7 @@
16 16
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
  */
18 18
 
19
+#include <stdio.h>
19 20
 #include <console.h>
20 21
 #include <latch.h>
21 22
 #include <gpxe/shell_banner.h>

+ 1
- 0
src/hci/tui/settings_ui.c Bestand weergeven

@@ -16,6 +16,7 @@
16 16
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
  */
18 18
 
19
+#include <stdio.h>
19 20
 #include <stdarg.h>
20 21
 #include <unistd.h>
21 22
 #include <string.h>

+ 1
- 1
src/include/gpxe/ip6.h Bestand weergeven

@@ -24,7 +24,7 @@
24 24
 #define MIN_IOB_LEN	MAX_HDR_LEN + 100 /* To account for padding by LL */
25 25
 
26 26
 #define IP6_EQUAL( in6_addr1, in6_addr2 ) \
27
-        ( strncmp ( ( char* ) &( in6_addr1 ), ( char* ) &( in6_addr2 ),\
27
+        ( memcmp ( ( char* ) &( in6_addr1 ), ( char* ) &( in6_addr2 ),\
28 28
 	sizeof ( struct in6_addr ) ) == 0 )
29 29
 
30 30
 #define IS_UNSPECIFIED( addr ) \

+ 4
- 4
src/net/ipv6.c Bestand weergeven

@@ -204,7 +204,7 @@ static int ipv6_tx ( struct io_buffer *iobuf,
204 204
 	 */
205 205
 	next_hop = dest->sin6_addr;
206 206
 	list_for_each_entry ( miniroute, &miniroutes, list ) {
207
-		if ( ( strncmp ( &ip6hdr->dest, &miniroute->prefix,
207
+		if ( ( memcmp ( &ip6hdr->dest, &miniroute->prefix,
208 208
 					miniroute->prefix_len ) == 0 ) ||
209 209
 		     ( IP6_EQUAL ( miniroute->gateway, ip6_none ) ) ) {
210 210
 			netdev = miniroute->netdev;
@@ -295,8 +295,8 @@ static int ipv6_process_nxt_hdr ( struct io_buffer *iobuf, uint8_t nxt_hdr,
295 295
  * This function processes a IPv6 packet
296 296
  */
297 297
 static int ipv6_rx ( struct io_buffer *iobuf,
298
-		     struct net_device *netdev,
299
-		     const void *ll_source ) {
298
+		     __unused struct net_device *netdev,
299
+		     __unused const void *ll_source ) {
300 300
 
301 301
 	struct ip6_header *ip6hdr = iobuf->data;
302 302
 	union {
@@ -316,7 +316,7 @@ static int ipv6_rx ( struct io_buffer *iobuf,
316 316
 	ipv6_dump ( ip6hdr );
317 317
 
318 318
 	/* Check header version */
319
-	if ( ip6hdr->ver_traffic_class_flow_label & 0xf0000000 != 0x60000000 ) {
319
+	if ( ( ip6hdr->ver_traffic_class_flow_label & 0xf0000000 ) != 0x60000000 ) {
320 320
 		DBG ( "Invalid protocol version\n" );
321 321
 		goto drop;
322 322
 	}

Laden…
Annuleren
Opslaan