From 22e34d1211d3a5e274256effe8be6aadca28024e Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Tue, 3 Mar 2015 11:31:25 +0100 Subject: [PATCH] mempool: fix build with debug enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit error: format ‘%p’ expects argument of type ‘void *’, but argument 5 has type ‘const struct rte_mempool *’ [-Werror=format=] mp type is (const struct rte_mempool *) and must be casted into a simpler type to be printed. Signed-off-by: Thomas Monjalon Acked-by: Olivier Matz --- lib/librte_mempool/rte_mempool.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 974e8d748f..39f7233ee6 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -345,7 +345,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp, rte_log_set_history(0); RTE_LOG(CRIT, MEMPOOL, "obj=%p, mempool=%p, cookie=%" PRIx64 "\n", - obj, mp, cookie); + obj, (const void *) mp, cookie); rte_panic("MEMPOOL: bad header cookie (put)\n"); } __mempool_write_header_cookie(obj, 1); @@ -355,7 +355,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp, rte_log_set_history(0); RTE_LOG(CRIT, MEMPOOL, "obj=%p, mempool=%p, cookie=%" PRIx64 "\n", - obj, mp, cookie); + obj, (const void *) mp, cookie); rte_panic("MEMPOOL: bad header cookie (get)\n"); } __mempool_write_header_cookie(obj, 0); @@ -366,7 +366,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp, rte_log_set_history(0); RTE_LOG(CRIT, MEMPOOL, "obj=%p, mempool=%p, cookie=%" PRIx64 "\n", - obj, mp, cookie); + obj, (const void *) mp, cookie); rte_panic("MEMPOOL: bad header cookie (audit)\n"); } } @@ -375,7 +375,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp, rte_log_set_history(0); RTE_LOG(CRIT, MEMPOOL, "obj=%p, mempool=%p, cookie=%" PRIx64 "\n", - obj, mp, cookie); + obj, (const void *) mp, cookie); rte_panic("MEMPOOL: bad trailer cookie\n"); } } -- 2.20.1