Bladeren bron

[misc] Fix building on OpenBSD

OpenBSD throws compiler warnings that we can't reproduce on Linux, for
some reason.

Original patch from Dewey Hylton <dewey@hyltown.com>.
tags/v0.9.4
Michael Brown 16 jaren geleden
bovenliggende
commit
2596a9aa9c
2 gewijzigde bestanden met toevoegingen van 3 en 4 verwijderingen
  1. 2
    3
      src/image/embedded.c
  2. 1
    1
      src/interface/pxe/pxe_tftp.c

+ 2
- 3
src/image/embedded.c Bestand weergeven

@@ -4,7 +4,6 @@
4 4
  * data structure.
5 5
  */
6 6
 
7
-#include <stdio.h>
8 7
 #include <gpxe/image.h>
9 8
 #include <gpxe/malloc.h>
10 9
 #include <gpxe/uaccess.h>
@@ -25,8 +24,8 @@ struct image *embedded_image(void)
25 24
 	if ( reclaimed )
26 25
 		return NULL;	/* Already reclaimed */
27 26
 
28
-	printf("Embedded image: %d bytes at %p\n",
29
-	       eisize, _embedded_image_start);
27
+	DBG ( "Embedded image: %zd bytes at %p\n",
28
+	      eisize, _embedded_image_start );
30 29
 
31 30
 	image = alloc_image();
32 31
 	if (!image)

+ 1
- 1
src/interface/pxe/pxe_tftp.c Bestand weergeven

@@ -189,7 +189,7 @@ static int pxe_tftp_open ( uint32_t ipaddress, unsigned int port,
189 189
 	if ( blksize < TFTP_DEFAULT_BLKSIZE )
190 190
 		blksize = TFTP_DEFAULT_BLKSIZE;
191 191
 	snprintf ( uri_string, sizeof ( uri_string ),
192
-		   "tftp://%s:%d%s%s?blksize=%d",
192
+		   "tftp://%s:%d%s%s?blksize=%zd",
193 193
 		   inet_ntoa ( address ), ntohs ( port ),
194 194
 		   ( ( filename[0] == '/' ) ? "" : "/" ), filename, blksize );
195 195
 	DBG ( " %s", uri_string );

Laden…
Annuleren
Opslaan