[CRIU] [PATCH] arm: proc_parse -- Fix u64 format warnings
Cyrill Gorcunov
gorcunov at openvz.org
Fri Dec 25 02:16:39 PST 2015
Use explicit type to placate the compiler.
| proc_parse.c: In function 'vma_get_mapfile':
| proc_parse.c:282:6: error: format '%lx' expects argument of type 'long unsigned
| int', but argument 5 has type 'uint64_t' [-Werror=format=]
| pr_err("Strange file mapped at %lx [%s]:%d.%d.%ld\n",
| ^
| proc_parse.c:335:5: error: format '%lx' expects argument of type 'long unsigned
| int', but argument 5 has type 'uint64_t' [-Werror=format=]
| pr_err("Failed to resolve mapping %lx filename\n",
| ^
| cc1: all warnings being treated as errors
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
proc_parse.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/proc_parse.c b/proc_parse.c
index 7ffc87317820..e51d0ef154eb 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -280,8 +280,8 @@ static int vma_get_mapfile(char *fname, struct vma_area *vma, DIR *mfd,
if (vfi->dev_maj != 0 || vfi->dev_min != 0 || vfi->ino != 0) {
pr_err("Strange file mapped at %lx [%s]:%d.%d.%ld\n",
- vma->e->start, fname,
- vfi->dev_maj, vfi->dev_min, vfi->ino);
+ (unsigned long)vma->e->start, fname,
+ vfi->dev_maj, vfi->dev_min, vfi->ino);
return -1;
}
@@ -333,7 +333,7 @@ static int vma_get_mapfile(char *fname, struct vma_area *vma, DIR *mfd,
if (vma->vmst->st_dev != vfi_dev ||
vma->vmst->st_ino != vfi->ino) {
pr_err("Failed to resolve mapping %lx filename\n",
- vma->e->start);
+ (unsigned long)vma->e->start);
close(fd);
return -1;
}
--
2.5.0
More information about the CRIU
mailing list