[CRIU] [PATCH] files-reg: fixed a format string

Andrey Vagin avagin at openvz.org
Fri Apr 4 11:55:08 PDT 2014


From: Andrew Vagin <avagin at openvz.org>

Use the format specifier PRIx64 instead of %lx.

Fix compilation on Raspberry Pi:

files-reg.c: In function ‘get_filemap_fd’:
files-reg.c:724:3: error: format ‘%lx’ expects argument of type ‘long
unsigned int’, but argument 5 has type ‘uint64_t’ [-Werror=format]

Reported-by: Mr Jenkins
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 files-reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/files-reg.c b/files-reg.c
index 57312f9..5e01b14 100644
--- a/files-reg.c
+++ b/files-reg.c
@@ -721,7 +721,7 @@ int get_filemap_fd(struct vma_area *vma)
 	if (vma->e->has_fdflags)
 		rfi->rfe->flags = vma->e->fdflags;
 	else {
-		pr_err("vma %#lx missing fdflags", vma->e->start);
+		pr_err("vma %#"PRIx64" missing fdflags", vma->e->start);
 		return -1;
 	}
 	return open_path(vma->fd, do_open_reg_noseek, NULL);
-- 
1.8.5.3



More information about the CRIU mailing list