Browse Source

[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 years ago
parent
commit
2596a9aa9c
2 changed files with 3 additions and 4 deletions
  1. 2
    3
      src/image/embedded.c
  2. 1
    1
      src/interface/pxe/pxe_tftp.c

+ 2
- 3
src/image/embedded.c View File

4
  * data structure.
4
  * data structure.
5
  */
5
  */
6
 
6
 
7
-#include <stdio.h>
8
 #include <gpxe/image.h>
7
 #include <gpxe/image.h>
9
 #include <gpxe/malloc.h>
8
 #include <gpxe/malloc.h>
10
 #include <gpxe/uaccess.h>
9
 #include <gpxe/uaccess.h>
25
 	if ( reclaimed )
24
 	if ( reclaimed )
26
 		return NULL;	/* Already reclaimed */
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
 	image = alloc_image();
30
 	image = alloc_image();
32
 	if (!image)
31
 	if (!image)

+ 1
- 1
src/interface/pxe/pxe_tftp.c View File

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

Loading…
Cancel
Save