[coreboot-gerrit] New patch to review for coreboot: 69f78c5 inteltool: Use `ll` instead of `l` as the length modifier for `uint64_t`

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Sun Mar 31 22:12:51 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/2994

-gerrit

commit 69f78c59ef8882ab2f5d29dc78ed01310f111ebe
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Sun Mar 31 22:02:16 2013 +0200

    inteltool: Use `ll` instead of `l` as the length modifier for `uint64_t`
    
    When buidling inteltool with GCC, the following warning is printed.
    
        $ make
        […]
        gcc -O2 -g -Wall -W   -c -o memory.o memory.c
        memory.c: In function ‘print_mchbar’:
        memory.c:287:7: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat]
        […]
    
    This was introduced in commit »inteltool: Add support for H65 Express
    chipset« (c7fc4422) [1].
    
    Address this warning, by using `%llx` instead of `%lx`.
    
    [1] http://review.coreboot.org/1258
    
    Change-Id: I4f714edce7e8b405e1a7a417d02fa498322c88a8
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 util/inteltool/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/inteltool/memory.c b/util/inteltool/memory.c
index 72a2de4..6847e5c 100644
--- a/util/inteltool/memory.c
+++ b/util/inteltool/memory.c
@@ -197,7 +197,7 @@ int print_mchbar(struct pci_dev *nb, struct pci_access *pacc)
 		for (i = 0; i < size; i++) {
 			switch (mch_registers[i].size) {
 				case 8:
-					printf("mchbase+0x%04x: 0x%016lx (%s)\n",
+					printf("mchbase+0x%04x: 0x%016llx (%s)\n",
 						mch_registers[i].addr,
 						*(uint64_t *)(mchbar+mch_registers[i].addr),
 						mch_registers[i].name);



More information about the coreboot-gerrit mailing list