[Crosstoolchain-logs] [device-tree-compiler] 29/57: dtc: check.c fix compile error

Vagrant Cascadian vagrant at moszumanska.debian.org
Thu Sep 28 22:03:58 UTC 2017


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

vagrant pushed a commit to branch upstream/latest
in repository device-tree-compiler.

commit 2a42b14d0d0332a8b24d17dca1b68c154bf4d484
Author: Shuah Khan <shuahkh at osg.samsung.com>
Date:   Tue May 16 10:08:08 2017 -0600

    dtc: check.c fix compile error
    
    Fix the following compile error found on odroid-xu4:
    
    checks.c: In function ‘check_simple_bus_reg’:
    checks.c:876:41: error: format ‘%lx’ expects argument of type
    ‘long unsigned int’, but argument 4 has type
    ‘uint64_t{aka long long unsigned int}’ [-Werror=format=]
      snprintf(unit_addr, sizeof(unit_addr), "%lx", reg);
                                             ^
    checks.c:876:41: error: format ‘%lx’ expects argument of type
    ‘long unsigned int’, but argument 4 has type
    ‘uint64_t {aka long long unsigned int}’ [-Werror=format=]
    cc1: all warnings being treated as errors
    Makefile:304: recipe for target 'checks.o' failed
    make: *** [checks.o] Error 1
    
    Signed-off-by: Shuah Khan <shuahkh at osg.samsung.com>
    [dwg: Correct new format to be correct in general]
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 checks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/checks.c b/checks.c
index 5adfc8f..4b72b53 100644
--- a/checks.c
+++ b/checks.c
@@ -873,7 +873,7 @@ static void check_simple_bus_reg(struct check *c, struct dt_info *dti, struct no
 	while (size--)
 		reg = (reg << 32) | fdt32_to_cpu(*(cells++));
 
-	snprintf(unit_addr, sizeof(unit_addr), "%lx", reg);
+	snprintf(unit_addr, sizeof(unit_addr), "%zx", reg);
 	if (!streq(unitname, unit_addr))
 		FAIL(c, dti, "Node %s simple-bus unit address format error, expected \"%s\"",
 		     node->fullpath, unit_addr);

-- 
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