From: Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Thomas Monjalon
<thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>,
dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH 1/7] mempool: fix build with debug enabled
Date: Wed, 04 Mar 2015 10:59:33 +0100 [thread overview]
Message-ID: <54F6D785.3040305@6wind.com> (raw)
In-Reply-To: <1425396230-13379-2-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
Hi Thomas,
On 03/03/2015 04:23 PM, Thomas Monjalon wrote:
> 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.
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 = ...;
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 <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
next prev parent reply other threads:[~2015-03-04 9:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 15:23 [PATCH 0/7] fix build with debug enabled Thomas Monjalon
[not found] ` <1425396230-13379-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-03-03 15:23 ` [PATCH 1/7] mempool: " Thomas Monjalon
[not found] ` <1425396230-13379-2-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-03-04 9:59 ` Olivier MATZ [this message]
2015-03-03 15:23 ` [PATCH 2/7] fm10k: " Thomas Monjalon
2015-03-03 15:23 ` [PATCH 3/7] virtio: fix build with mempool " Thomas Monjalon
[not found] ` <1425396230-13379-4-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-03-04 1:15 ` Ouyang, Changchun
2015-03-03 15:23 ` [PATCH 4/7] virtio: fix build with " Thomas Monjalon
[not found] ` <1425396230-13379-5-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-03-04 1:17 ` Ouyang, Changchun
2015-03-03 15:23 ` [PATCH 5/7] mlx4: fix build with mempool " Thomas Monjalon
[not found] ` <1425396230-13379-6-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-03-03 16:02 ` Adrien Mazarguil
2015-03-03 15:23 ` [PATCH 6/7] mlx4: mute auto config in quiet mode Thomas Monjalon
[not found] ` <1425396230-13379-7-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-03-03 16:03 ` Adrien Mazarguil
2015-03-03 15:23 ` [PATCH 7/7] bond: remove debug function to fix link with shared lib Thomas Monjalon
[not found] ` <1425396230-13379-8-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-03-04 9:49 ` Declan Doherty
2015-03-04 10:21 ` [PATCH 0/7] fix build with debug enabled Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F6D785.3040305@6wind.com \
--to=olivier.matz-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.org \
--cc=thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.