diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2011-11-14 12:40:34 -0800 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-03-30 20:26:50 +0200 |
commit | a7b296d450c5d948b95c1342f726334b4e5a4c68 (patch) | |
tree | 2e4939509d1ba3f74fd460a152cfa84c2b4b96f5 /util/inteltool/memory.c | |
parent | 8acbc2a8865ca74f0f80c51c6511b9ab4c03d552 (diff) | |
download | coreboot-staging-a7b296d450c5d948b95c1342f726334b4e5a4c68.zip coreboot-staging-a7b296d450c5d948b95c1342f726334b4e5a4c68.tar.gz |
Fix warnings in coreboot utilities.
- Fix some poor programming practice (breaks of strict aliasing as well
as not checking the return value of read)
- Use PRIx64 instead of %llx to prevent compilation warnings with both
32bit and 64bit compilers
- Use same compiler command options when linking inteltool and when
detecting libpci for inteltool
Change-Id: I08b2e8d1bbc908f6b1f26d25cb3a4b03d818e124
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/752
Tested-by: build bot (Jenkins)
Reviewed-by: Mathias Krause <minipli@googlemail.com>
Diffstat (limited to 'util/inteltool/memory.c')
-rw-r--r-- | util/inteltool/memory.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util/inteltool/memory.c b/util/inteltool/memory.c index 9230419..18300ac 100644 --- a/util/inteltool/memory.c +++ b/util/inteltool/memory.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> +#include <inttypes.h> #include "inteltool.h" /* @@ -130,9 +131,9 @@ int print_mchbar(struct pci_dev *nb, struct pci_access *pacc) } if (nb->device_id == PCI_DEVICE_ID_INTEL_82865) - printf("BAR6 = 0x%08llx (MEM)\n\n", mchbar_phys); + printf("BAR6 = 0x%08" PRIx64 " (MEM)\n\n", mchbar_phys); else - printf("MCHBAR = 0x%08llx (MEM)\n\n", mchbar_phys); + printf("MCHBAR = 0x%08" PRIx64 " (MEM)\n\n", mchbar_phys); for (i = 0; i < size; i += 4) { if (*(uint32_t *)(mchbar + i)) |