From: Thomas Monjalon Date: Thu, 3 Jul 2014 14:06:04 +0000 (+0200) Subject: xen: fix build X-Git-Tag: spdx-start~10543 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=91873a652750c591baf5d568ccc38ca9661e56d3;p=dpdk.git xen: fix build There were 2 errors: lib/librte_pmd_xenvirt/rte_xen_lib.c:409:2: error: zero-length gnu_printf format string [-Werror=format-zero-length] lib/librte_pmd_xenvirt/rte_xen_lib.c:424:2: error: format '%p' expects argument of type 'void *', but argument 4 has type 'uintptr_t' [-Werror=format=] Signed-off-by: Thomas Monjalon --- diff --git a/lib/librte_pmd_xenvirt/rte_xen_lib.c b/lib/librte_pmd_xenvirt/rte_xen_lib.c index 85a1ed91bd..b3932f0e06 100644 --- a/lib/librte_pmd_xenvirt/rte_xen_lib.c +++ b/lib/librte_pmd_xenvirt/rte_xen_lib.c @@ -406,8 +406,6 @@ grant_gntalloc_mbuf_pool(struct rte_mempool *mpool, uint32_t pg_num, uint32_t *g char key_str[PATH_MAX] = {0}; char val_str[PATH_MAX] = {0}; - snprintf(val_str, sizeof(val_str), ""); - if (grant_node_create(pg_num, gref_arr, pa_arr, val_str, sizeof(val_str))) { return -1; } @@ -421,7 +419,7 @@ grant_gntalloc_mbuf_pool(struct rte_mempool *mpool, uint32_t pg_num, uint32_t *g if (snprintf(key_str, sizeof(key_str), DPDK_XENSTORE_PATH"%d"MEMPOOL_VA_XENSTORE_STR, mempool_idx) == -1) return -1; - if (snprintf(val_str, sizeof(val_str), "%p", (uintptr_t)mpool->elt_va_start) == -1) + if (snprintf(val_str, sizeof(val_str), "%"PRIxPTR, (uintptr_t)mpool->elt_va_start) == -1) return -1; if (xenstore_write(key_str, val_str) == -1) return -1;