[ipxe-devel] Cygwin - minor size_t changes

Steve Goodrich steve.goodrich at se-eng.com
Thu Mar 22 22:59:34 GMT 2012


I just built iPXE for my platform (my thanks to mcb30 for pointing out the
CROSS_COMPILE macro in the Makefile).  I found a couple of minor issues, so
I thought I'd present them here for comment.  Is this a worthwhile change?

Regards,
            -- Steve G.


>From e8b1cb6a84c2eefee2ce6eed6bc293b3def64a0d Mon Sep 17 00:00:00 2001
From: Steve Goodrich <steve.goodrich at se-eng.com>
Date: Thu, 22 Mar 2012 16:50:59 -0600
Subject: [PATCH] size_t fix-ups for DBGC

---
 src/arch/i386/core/runtime.c           |    2 +-
 src/arch/i386/interface/pcbios/int13.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/arch/i386/core/runtime.c b/src/arch/i386/core/runtime.c
index 7d410c9..36944d2 100644
--- a/src/arch/i386/core/runtime.c
+++ b/src/arch/i386/core/runtime.c
@@ -202,7 +202,7 @@ static int initrd_init ( void ) {
        image->data = umalloc ( initrd_len );
        if ( ! image->data ) {
                DBGC ( colour, "RUNTIME could not allocate %zd bytes for "
-                      "initrd\n", initrd_len );
+                      "initrd\n", (size_t) initrd_len );
                rc = -ENOMEM;
                goto err_umalloc;
        }
diff --git a/src/arch/i386/interface/pcbios/int13.c
b/src/arch/i386/interface/pcbios/int13.c
index 8ce77ad..3df2be7 100644
--- a/src/arch/i386/interface/pcbios/int13.c
+++ b/src/arch/i386/interface/pcbios/int13.c
@@ -666,7 +666,7 @@ static int int13_rw_sectors ( struct int13_drive *int13,
        if ( int13_blksize ( int13 ) != INT13_BLKSIZE ) {
                DBGC ( int13, "\nINT 13 drive %02x invalid blocksize (%zd) "
                       "for non-extended read/write\n",
-                      int13->drive, int13_blksize ( int13 ) );
+                      int13->drive, (size_t) int13_blksize ( int13 ) );
                return -INT13_STATUS_INVALID;
        }

@@ -757,7 +757,7 @@ static int int13_get_parameters ( struct int13_drive
*int13,
        if ( int13_blksize ( int13 ) != INT13_BLKSIZE ) {
                DBGC ( int13, "\nINT 13 drive %02x invalid blocksize (%zd) "
                       "for non-extended parameters\n",
-                      int13->drive, int13_blksize ( int13 ) );
+                      int13->drive, (size_t) int13_blksize ( int13 ) );
                return -INT13_STATUS_INVALID;
        }





More information about the ipxe-devel mailing list