From: Thomas Monjalon Date: Tue, 3 Mar 2015 10:31:25 +0000 (+0100) Subject: mempool: fix build with debug enabled X-Git-Tag: spdx-start~9508 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=22e34d1211d3a5e274256effe8be6aadca28024e;p=dpdk.git mempool: fix build with debug enabled 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 --- 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"); } }