kill build warnings in ipt_ACCOUNT.c
PATCH 1/1 kill build warnings in ipt_ACCOUNT.c
CC [M] net/ipv4/netfilter/ipt_ACCOUNT.onet/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 codenet/ipv4/netfilter/ipt_ACCOUNT.c: At top level:net/ipv4/netfilter/ipt_ACCOUNT.c:1024: warning:
initialization from incompatible pointer type
Signature · 3 lines
The only thing necessary for the triumph of evil
is for good men to do nothing.
- Edmund Burkeipt_ACCOUNT.c +5 -5
@@ -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]) {
Patrick McHardy
AppliedQuoted 7 lines · Pawel Sikora
CC [M]
net/ipv4/netfilter/ipt_ACCOUNT.onet/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 codenet/ipv4/netfilter/ipt_ACCOUNT.c: At top level:net/ipv4/netfilter/ipt_ACCOUNT.c:1024: warning:
initialization from incompatible pointer type
Applied, thanks.