From: Stephen Hemminger <stephen@networkplumber.org>
To: David Ahern <dsa@cumulusnetworks.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] Fix compile warning in get_addr_1
Date: Wed, 14 Dec 2016 19:30:01 -0800 [thread overview]
Message-ID: <20161214193001.4857e756@xeon-e3> (raw)
In-Reply-To: <1481672072-14140-1-git-send-email-dsa@cumulusnetworks.com>
On Tue, 13 Dec 2016 15:34:32 -0800
David Ahern <dsa@cumulusnetworks.com> wrote:
> A recent cleanup causes a compile warning on Debian jessie:
>
> CC utils.o
> utils.c: In function ‘get_addr_1’:
> utils.c:486:21: warning: passing argument 1 of ‘ll_addr_a2n’ from incompatible pointer type
> len = ll_addr_a2n(&addr->data, sizeof(addr->data), name);
> ^
> In file included from utils.c:34:0:
> ../include/rt_names.h:27:5: note: expected ‘char *’ but argument is of type ‘__u32 (*)[8]’
> int ll_addr_a2n(char *lladdr, int len, const char *arg);
> ^
>
> Revert the removal of the typecast
>
> Fixes: e1933b928125 ("utils: cleanup style")
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
> ---
> lib/utils.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/utils.c b/lib/utils.c
> index 316b048abcfc..83c9d097c608 100644
> --- a/lib/utils.c
> +++ b/lib/utils.c
> @@ -483,7 +483,8 @@ int get_addr_1(inet_prefix *addr, const char *name, int family)
> if (family == AF_PACKET) {
> int len;
>
> - len = ll_addr_a2n(&addr->data, sizeof(addr->data), name);
> + len = ll_addr_a2n((char *) &addr->data, sizeof(addr->data),
> + name);
> if (len < 0)
> return -1;
>
Thanks was accidental.
prev parent reply other threads:[~2016-12-15 3:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 23:34 [PATCH iproute2] Fix compile warning in get_addr_1 David Ahern
2016-12-15 3:30 ` Stephen Hemminger [this message]
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=20161214193001.4857e756@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=dsa@cumulusnetworks.com \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).