public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Maciej Żenczykowski" <zenczykowski@gmail.com>
Cc: "Maciej Żenczykowski" <maze@google.com>,
	"Florian Westphal" <fw@strlen.de>,
	"Linux Network Development Mailing List" <netdev@vger.kernel.org>,
	"Netfilter Development Mailing List"
	<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH] libipt_ULOG.c - include strings.h for the definition of ffs()
Date: Tue, 21 Apr 2020 12:40:14 +0200	[thread overview]
Message-ID: <20200421104014.7xfnfphpavmy6yqg@salvia> (raw)
In-Reply-To: <20200421081507.108023-1-zenczykowski@gmail.com>

On Tue, Apr 21, 2020 at 01:15:07AM -0700, Maciej Żenczykowski wrote:
> From: Maciej Żenczykowski <maze@google.com>
> 
> This resolves compiler warnings:
> 
> extensions/libext4_srcs/gen/gensrcs/external/iptables/extensions/libipt_ULOG.c:89:32: error: implicit declaration of function 'ffs' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>   printf(" --ulog-nlgroup %d", ffs(loginfo->nl_group));
>                                ^
> extensions/libext4_srcs/gen/gensrcs/external/iptables/extensions/libipt_ULOG.c:105:9: error: implicit declaration of function 'ffs' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>   ffs(loginfo->nl_group));
>   ^
> 
> Test: builds with less warnings

For the record, what compiler is triggering this? Or you use different
-W options there?

I don't see these with gcc 9.3 here.

> Signed-off-by: Maciej Żenczykowski <maze@google.com>
> ---
>  extensions/libipt_ULOG.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/extensions/libipt_ULOG.c b/extensions/libipt_ULOG.c
> index fafb220b..5163eea3 100644
> --- a/extensions/libipt_ULOG.c
> +++ b/extensions/libipt_ULOG.c
> @@ -11,6 +11,7 @@
>   */
>  #include <stdio.h>
>  #include <string.h>
> +#include <strings.h>
>  #include <xtables.h>
>  /* For 64bit kernel / 32bit userspace */
>  #include <linux/netfilter_ipv4/ipt_ULOG.h>
> -- 
> 2.26.1.301.g55bc3eb7cb9-goog
> 

  reply	other threads:[~2020-04-21 10:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21  8:15 [PATCH] libipt_ULOG.c - include strings.h for the definition of ffs() Maciej Żenczykowski
2020-04-21 10:40 ` Pablo Neira Ayuso [this message]
2020-04-21 14:01   ` Maciej Żenczykowski
2020-04-21 14:03     ` Maciej Żenczykowski
2020-04-28  0:04 ` Pablo Neira Ayuso

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=20200421104014.7xfnfphpavmy6yqg@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=maze@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=zenczykowski@gmail.com \
    /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