summaryrefslogtreecommitdiff
path: root/kexec/kexec-iomem.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2021-03-17 13:14:48 +0100
committerSimon Horman <horms@verge.net.au>2021-04-02 11:56:03 +0200
commit8519b01f584ff941706ac8b11659e78ef1c5b5f0 (patch)
treea23c66aeadca36348adda480856af010a9e844d5 /kexec/kexec-iomem.c
parent84a6ef00376cc179eb555952b08d9bc5bfcfa67a (diff)
kexec: Use %llu/%llx and casts to format uint64_t
When compiling for 32-bit: kexec/kexec.c: In function ‘cmdline_add_liveupdate’: kexec/kexec.c:1192:30: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] 1192 | sprintf(buf, " liveupdate=%luM@0x%lx", lu_sizeM, lu_start); | ~~^ ~~~~~~~~ | | | | | uint64_t {aka long long unsigned int} | long unsigned int | %llu kexec/kexec.c:1192:37: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] 1192 | sprintf(buf, " liveupdate=%luM@0x%lx", lu_sizeM, lu_start); | ~~^ ~~~~~~~~ | | | | | uint64_t {aka long long unsigned int} | long unsigned int | %llx Indeed, "uint64_t" is "unsigned long long" on 32-bit formats, and "unsigned long" on 64-bit formats. Fix this by casting to "unsigned long long", and formatting using "%llu" or "%llx". Fixes: b13984c6f9ec7fdd ("kexec: Introduce --load-live-update for xen") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec-iomem.c')
0 files changed, 0 insertions, 0 deletions