From: Paul Moore <paul.moore@hp•com>
To: "Manish Katiyar" <mkatiyar@gmail•com>
Cc: kernel-janitors@vger•kernel.org, netdev@vger•kernel.org
Subject: Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c
Date: Wed, 29 Oct 2008 09:49:09 -0400 [thread overview]
Message-ID: <200810290949.09108.paul.moore@hp.com> (raw)
In-Reply-To: <ea11fea30810290106u3f92268q62226da65db6f6a4@mail.gmail.com>
On Wednesday 29 October 2008 4:06:09 am Manish Katiyar wrote:
> Below patch fixes the following warning.
> net/netlabel/netlabel_addrlist.c:335: warning: unused variable 'dir'
> net/netlabel/netlabel_addrlist.c:369: warning: unused variable 'dir'
>
>
> Signed-off-by: Manish Katiyar <mkatiyar@gmail•com>
Hi Manish,
Good catch, I ran compile tests with different SECURITY/NETLABEL/IPV6
options enabled/disabled but forgot about AUDIT. I appreciate your
help finding this and submitting a possible solution but I think the
better approach would be to conditionally compile out the
netlbl_af{4,6}list_audit_addr() functions similarly to what we do with
several of the NetLabel kernel API functions in include/net/netlabel.h,
see netlbl_enabled() for a simple example.
If you have the time to revise this patch that would be great, just CC
me on the posting and I'll look it over. If you don't have time that
is okay too, just let me know so I can fix it.
Thanks!
> ---
> net/netlabel/netlabel_addrlist.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/net/netlabel/netlabel_addrlist.c
> b/net/netlabel/netlabel_addrlist.c index b0925a3..65fbec1 100644
> --- a/net/netlabel/netlabel_addrlist.c
> +++ b/net/netlabel/netlabel_addrlist.c
> @@ -332,7 +332,9 @@ void netlbl_af4list_audit_addr(struct
> audit_buffer *audit_buf,
> __be32 addr, __be32 mask)
> {
> u32 mask_val = ntohl(mask);
> +#ifdef CONFIG_AUDIT
> char *dir = (src ? "src" : "dst");
> +#endif
>
> if (dev != NULL)
> audit_log_format(audit_buf, " netif=%s", dev);
> @@ -366,7 +368,9 @@ void netlbl_af6list_audit_addr(struct
> audit_buffer *audit_buf,
> const struct in6_addr *addr,
> const struct in6_addr *mask)
> {
> +#ifdef CONFIG_AUDIT
> char *dir = (src ? "src" : "dst");
> +#endif
>
> if (dev != NULL)
> audit_log_format(audit_buf, " netif=%s", dev);
--
paul moore
linux @ hp
next prev parent reply other threads:[~2008-10-29 13:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 8:06 [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c Manish Katiyar
2008-10-29 13:49 ` Paul Moore [this message]
[not found] ` <ea11fea30810290818p2ae6c11eo5e38baf631867fb1@mail.gmail.com>
[not found] ` <200810291135.25056.paul.moore@hp.com>
2008-10-29 18:27 ` Manish Katiyar
[not found] ` <200810291543.49225.paul.moore@hp.com>
2008-10-30 2:10 ` Manish Katiyar
2008-10-30 12:12 ` Paul Moore
2008-10-30 13:33 ` Manish Katiyar
2008-10-30 13:39 ` Paul Moore
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=200810290949.09108.paul.moore@hp.com \
--to=paul.moore@hp$(echo .)com \
--cc=kernel-janitors@vger$(echo .)kernel.org \
--cc=mkatiyar@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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