From b3f685edb7b8d040182b9e4d83bf34f2883cc385 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 30 Apr 2013 09:08:08 +0200 Subject: xsm: fix printf format string for strlen result MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit strlen returns size_t: policydb.c: In function ‘policydb_read’: policydb.c:1779: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘size_t’ This is probably benign on 64-bit x86 but was found by Dharshini on 32-bit Xen 4.2.x. I expect it affects ARM too. Reported-by: Dharshini Tharmaraj Signed-off-by: Ian Campbell Acked-by: Daniel De Graaf --- xen/xsm/flask/ss/policydb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xen/xsm') diff --git a/xen/xsm/flask/ss/policydb.c b/xen/xsm/flask/ss/policydb.c index fefcd59171..bdec4ac264 100644 --- a/xen/xsm/flask/ss/policydb.c +++ b/xen/xsm/flask/ss/policydb.c @@ -1737,7 +1737,7 @@ int policydb_read(struct policydb *p, void *fp) if ( len != strlen(POLICYDB_STRING) ) { printk(KERN_ERR "Flask: policydb string length %d does not " - "match expected length %lu\n", + "match expected length %zu\n", len, strlen(POLICYDB_STRING)); goto bad; } -- cgit v1.2.3