[Crosstoolchain-logs] [device-tree-compiler] 276/357: dtc: Fix some printf() format warnings when compiling 64-bit

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.

commit 6aaee513ddcb9f1ee1a0c6294f129546c99d8b5c
Author: David Gibson <david at gibson.dropbear.id.au>
Date:   Fri May 30 11:34:18 2008 +1000

    dtc: Fix some printf() format warnings when compiling 64-bit
    
    Currently, dtc generates a few gcc build warnings if built for a
    64-bit target, due to the altered type of uint64_t and size_t.  This
    patch fixes the warnings (without generating new warnings for 32-bit).
    
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 tests/dtbs_equal_ordered.c | 5 ++++-
 tests/references.c         | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/dtbs_equal_ordered.c b/tests/dtbs_equal_ordered.c
index 2847bbd..a0b42ae 100644
--- a/tests/dtbs_equal_ordered.c
+++ b/tests/dtbs_equal_ordered.c
@@ -49,7 +49,10 @@ void compare_mem_rsv(const void *fdt1, const void *fdt2)
 		if ((addr1 != addr2) || (size1 != size2))
 			FAIL("Mismatch in reserve entry %d: "
 			     "(0x%llx, 0x%llx) != (0x%llx, 0x%llx)", i,
-			     addr1, size1, addr2, size2);
+			     (unsigned long long)addr1,
+			     (unsigned long long)size1,
+			     (unsigned long long)addr2,
+			     (unsigned long long)size2);
 	}
 }
 
diff --git a/tests/references.c b/tests/references.c
index affc1d7..e98d450 100644
--- a/tests/references.c
+++ b/tests/references.c
@@ -38,7 +38,7 @@ void check_ref(const void *fdt, int node, uint32_t checkref)
 	if (!p)
 		FAIL("fdt_getprop(%d, \"ref\"): %s", node, fdt_strerror(len));
 	if (len != sizeof(*p))
-		FAIL("'ref' in node at %d has wrong size (%d instead of %d)",
+		FAIL("'ref' in node at %d has wrong size (%d instead of %zd)",
 		     node, len, sizeof(*p));
 	ref = fdt32_to_cpu(*p);
 	if (ref != checkref)
@@ -49,7 +49,7 @@ void check_ref(const void *fdt, int node, uint32_t checkref)
 	if (!p)
 		FAIL("fdt_getprop(%d, \"lref\"): %s", node, fdt_strerror(len));
 	if (len != sizeof(*p))
-		FAIL("'lref' in node at %d has wrong size (%d instead of %d)",
+		FAIL("'lref' in node at %d has wrong size (%d instead of %zd)",
 		     node, len, sizeof(*p));
 	ref = fdt32_to_cpu(*p);
 	if (ref != checkref)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list