* [PATCH] kill build warnings in ipt_ACCOUNT.c
@ 2005-05-20 11:52 Pawel Sikora
2005-06-11 16:02 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Pawel Sikora @ 2005-05-20 11:52 UTC (permalink / raw)
To: netfilter-devel
[-- 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]) {
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] kill build warnings in ipt_ACCOUNT.c
2005-05-20 11:52 [PATCH] kill build warnings in ipt_ACCOUNT.c Pawel Sikora
@ 2005-06-11 16:02 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2005-06-11 16:02 UTC (permalink / raw)
To: Pawel Sikora; +Cc: netfilter-devel
Pawel Sikora wrote:
> 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
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-11 16:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-20 11:52 [PATCH] kill build warnings in ipt_ACCOUNT.c Pawel Sikora
2005-06-11 16:02 ` Patrick McHardy
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.