All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pawel Sikora <pluto@agmk.net>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] kill build warnings in ipt_ACCOUNT.c
Date: Fri, 20 May 2005 13:52:27 +0200	[thread overview]
Message-ID: <200505201352.27915.pluto@agmk.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

  CC [M]  net/ipv4/netfilter/ipt_ACCOUNT.o
net/ipv4/netfilter/ipt_ACCOUNT.c: In function 'ipt_acc_handle_prepare_read':
net/ipv4/netfilter/ipt_ACCOUNT.c:610: warning:
 ISO C90 forbids mixed declarations and code
net/ipv4/netfilter/ipt_ACCOUNT.c: At top level:
net/ipv4/netfilter/ipt_ACCOUNT.c:1024: warning:
 initialization from incompatible pointer type

-- 
The only thing necessary for the triumph of evil
  is for good men to do nothing.
                                           - Edmund Burke

[-- Attachment #2: x.diff --]
[-- Type: text/x-diff, Size: 1501 bytes --]

Index: ipt_ACCOUNT.c
===================================================================
--- ipt_ACCOUNT.c	(wersja 3922)
+++ ipt_ACCOUNT.c	(kopia robocza)
@@ -414,9 +414,9 @@
 }
 
 static unsigned int ipt_acc_target(struct sk_buff **pskb,
-                                       unsigned int hooknum,
                                        const struct net_device *in,
                                        const struct net_device *out,
+                                       unsigned int hooknum,
                                        const void *targinfo,
                                        void *userinfo)
 {
@@ -592,7 +592,8 @@
             (struct ipt_acc_mask_8 *)ipt_acc_tables[table_nr].data;
         struct ipt_acc_mask_8 *network_8 = 
             (struct ipt_acc_mask_8 *)dest->data;
-        u_int32_t a;
+        struct ipt_acc_mask_16 *src_16, *network_16;
+        u_int32_t a, b;
 
         for (a = 0; a <= 255; a++) {
             if (src_8->mask_16[a]) {
@@ -607,9 +608,8 @@
                 memcpy(network_8->mask_16[a], src_8->mask_16[a], 
                        sizeof(struct ipt_acc_mask_16));
 
-                struct ipt_acc_mask_16 *src_16 = src_8->mask_16[a];
-                struct ipt_acc_mask_16 *network_16 = network_8->mask_16[a];
-                u_int32_t b;
+                src_16 = src_8->mask_16[a];
+                network_16 = network_8->mask_16[a];
 
                 for (b = 0; b <= 255; b++) {
                     if (src_16->mask_24[b]) {

             reply	other threads:[~2005-05-20 11:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-20 11:52 Pawel Sikora [this message]
2005-06-11 16:02 ` [PATCH] kill build warnings in ipt_ACCOUNT.c Patrick McHardy

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=200505201352.27915.pluto@agmk.net \
    --to=pluto@agmk.net \
    --cc=netfilter-devel@lists.netfilter.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.