[coreboot-gerrit] Patch set updated for coreboot: d2fcc0c cbfstool: compare pointer difference with ptrdiff_t value

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Tue Apr 28 13:24:03 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10015

-gerrit

commit d2fcc0ca55d3db1cb76e98c0c35b40bb32b88b41
Author: Patrick Georgi <pgeorgi at google.com>
Date:   Tue Apr 28 13:09:36 2015 +0200

    cbfstool: compare pointer difference with ptrdiff_t value
    
    Fixes building cbfstool in 32bit environments.
    
    Change-Id: I3c94afc9c961eb8b41d1e08f4a16e5cab2a6bb8b
    Signed-off-by: Patrick Georgi <pgeorgi at google.com>
---
 util/cbfstool/cbfs_image.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index e61664c..2581bef 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -19,6 +19,7 @@
 
 #include <inttypes.h>
 #include <libgen.h>
+#include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -449,7 +450,7 @@ static int cbfs_add_entry_at(struct cbfs_image *image,
 	      content_offset, (int)((char*)CBFS_SUBHEADER(entry) -
 				    image->buffer.data));
 	assert((char*)CBFS_SUBHEADER(entry) - image->buffer.data ==
-	       content_offset);
+	       (ptrdiff_t)content_offset);
 	memcpy(CBFS_SUBHEADER(entry), data, size);
 	if (verbose > 1) cbfs_print_entry_info(image, entry, stderr);
 



More information about the coreboot-gerrit mailing list