Mathias Krause ([email protected]) just uploaded a new patch set to 
gerrit, which you can find at http://review.coreboot.org/1236

-gerrit

commit ed54c4c0ea2be438d3c94478525001ab55581f5f
Author: Mathias Krause <[email protected]>
Date:   Tue Jul 17 21:17:15 2012 +0200

    cbfstool: signed vs. unsigned fixes
    
    Use the right data types to fix compiler warnings.
    
    Change-Id: Id23739421ba9e4a35599355fac9a17300ae4bda9
    Signed-off-by: Mathias Krause <[email protected]>
---
 util/cbfstool/cbfstool.c |    2 +-
 util/cbfstool/common.c   |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index 721bf33..913fd33 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -348,7 +348,7 @@ static void which_endian(void)
 
 int main(int argc, char **argv)
 {
-       int i;
+       size_t i;
 
        if (argc < 3) {
                usage();
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
index 7a6e2c2..648bfa8 100644
--- a/util/cbfstool/common.c
+++ b/util/cbfstool/common.c
@@ -164,7 +164,7 @@ void print_supported_filetypes(void)
 
 const char *strfiletype(uint32_t number)
 {
-       int i;
+       size_t i;
        for (i = 0; i < (sizeof(filetypes) / sizeof(struct filetypes_t)); i++)
                if (filetypes[i].type == number)
                        return filetypes[i].name;
@@ -173,7 +173,7 @@ const char *strfiletype(uint32_t number)
 
 uint64_t intfiletype(const char *name)
 {
-       int i;
+       size_t i;
        for (i = 0; i < (sizeof(filetypes) / sizeof(struct filetypes_t)); i++)
                if (strcmp(filetypes[i].name, name) == 0)
                        return filetypes[i].type;
@@ -497,12 +497,12 @@ uint32_t cbfs_find_location(const char *romfile, uint32_t 
filesize,
                            const char *filename, uint32_t alignment)
 {
        loadrom(romfile);
-       int filename_size = strlen(filename);
+       size_t filename_size = strlen(filename);
 
-       int headersize =
+       size_t headersize =
            sizeof(struct cbfs_file) + ALIGN(filename_size + 1,
                                             16) + sizeof(struct cbfs_stage);
-       int totalsize = headersize + filesize;
+       size_t totalsize = headersize + filesize;
 
        uint32_t current = phys_start;
        while (current < phys_end) {

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to