diff options
author | Shuah Khan <shuahkh@osg.samsung.com> | 2017-05-16 10:08:08 -0600 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-05-17 12:10:51 +1000 |
commit | 2a42b14d0d0332a8b24d17dca1b68c154bf4d484 (patch) | |
tree | a325a39a468d65c488dc75dfb0328b80a351c4de | |
parent | a10cb3c818d3024caad1efccce1b11947cf316c9 (diff) | |
download | dtc-2a42b14d0d0332a8b24d17dca1b68c154bf4d484.zip dtc-2a42b14d0d0332a8b24d17dca1b68c154bf4d484.tar.gz dtc-2a42b14d0d0332a8b24d17dca1b68c154bf4d484.tar.bz2 |
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@osg.samsung.com>
[dwg: Correct new format to be correct in general]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | checks.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |