From: Scott Andrew Baillie <sbaillie@bigpond.net.au>
To: netfilter List <netfilter-devel@lists.netfilter.org>
Cc: Harald Welte <laforge@gnumonks.org>
Subject: Re: ip_tables.h does not compile when using g++
Date: 16 Sep 2002 14:12:56 +0000 [thread overview]
Message-ID: <1032185577.458.12.camel@localhost.localdomain> (raw)
Hi Harald,
>
> why does it have to be (char *) ? There are no characters involved,
> hence it (in the spirit of this gcc extension) should be (void *).
>
> The typecast to struct ipt_entry_target is correct, however.
>
> Does it compile with
>
> return ((struct ipt_entry_target *)((void *)e + e->target_offset));
>
> If yes, I will submit this modified version of your patch.
No, it does not compile with (void *) at all. Here is the error message
from gcc-3.2 when compiling using g++ :
ip_tables.h: In
function `ipt_entry_target* ipt_get_target(ipt_entry*)':
ip_tables.h:295: pointer
of type `void *' used in arithmetic
I agree that the (char *) looks a little confusing but I dont know
what else to use.
Also, just below the function 'ipt_get_target' there is 2 macros
defined that use the same (void *) cast. These casts should also
be patched.
Regards,
Scott.
next reply other threads:[~2002-09-16 14:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-16 14:12 Scott Andrew Baillie [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-09-14 12:07 ip_tables.h does not compile when using g++ Scott Andrew Baillie
2002-09-15 11:20 ` Harald Welte
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=1032185577.458.12.camel@localhost.localdomain \
--to=sbaillie@bigpond.net.au \
--cc=laforge@gnumonks.org \
--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.