From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH 1/7] mempool: fix build with debug enabled Date: Wed, 04 Mar 2015 10:59:33 +0100 Message-ID: <54F6D785.3040305@6wind.com> References: <1425396230-13379-1-git-send-email-thomas.monjalon@6wind.com> <1425396230-13379-2-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable To: Thomas Monjalon , dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1425396230-13379-2-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hi Thomas, On 03/03/2015 04:23 PM, Thomas Monjalon wrote: > error: format =E2=80=98%p=E2=80=99 expects argument of type =E2=80=98vo= id *=E2=80=99, > but argument 5 has type =E2=80=98const struct rte_mempool *=E2=80=99 [-= Werror=3Dformat=3D] > > mp type is (const struct rte_mempool *) and must be casted into a simpl= er > type to be printed. I was a bit surprised to see this warning although the standard says: The argument shall be a pointer to void. The value of the pointer is converted to a sequence of printing wide characters, in an implementation-defined manner. But I think we often do this in dpdk, without any warning: struct foo_s *foo =3D ...; printf("%p\n", foo); After some search, the reason why you get a warning here is that you compile a C file that includes this header with the "-pedantic" flag. So, I think doing this fix is justified for header files as we cannot predict which options are used by the user of these headers. So: Acked-by: Olivier Matz