[coreboot-gerrit] New patch to review for coreboot: 460483c cbmem: parse_cbtable: Use length modifier `ll` `u64` argument

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Sat Apr 13 18:40:00 CEST 2013


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3084

-gerrit

commit 460483c419dde788fc3fe2959412bbd87e051d28
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Sat Apr 13 18:35:32 2013 +0200

    cbmem: parse_cbtable: Use length modifier `ll` `u64` argument
    
    Currently on a 32-bit system cbmem fails to build due to `-Werror`
    and the following warning.
    
        $ make
        cc -O2 -Wall -Werror -iquote ../../src/include -iquote ../../src/src/arch/x86  -c -o cbmem.o cbmem.c
        […]
        cbmem.c: In function ‘parse_cbtable’:
        cbmem.c:135:2: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘u64’ [-Werror=format]
        cc1: all warnings being treated as errors
        […]
    
    Using the length modifier `ll` instead of `l` gets rid of this
    warning.
    
    Change-Id: Ib2656e27594c7aaa687aa84bf07042933f840e46
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 util/cbmem/cbmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index f3f5add..ae5dbf6 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -132,7 +132,7 @@ static int parse_cbtable(u64 address)
 	int i, found = 0;
 	void *buf;
 
-	debug("Looking for coreboot table at %lx\n", address);
+	debug("Looking for coreboot table at %llx\n", address);
 	buf = map_memory(address);
 
 	/* look at every 16 bytes within 4K of the base */



More information about the coreboot-gerrit mailing list