From: Timo Juhani Lindfors <timo.lindfors@iki.fi>
To: ofono@ofono.org
Subject: netlink.c:97: error: cast increases required alignment of target type
Date: Tue, 15 Sep 2009 21:36:51 +0300 [thread overview]
Message-ID: <84y6og3vi4.fsf@sauna.l.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1520 bytes --]
Hi,
git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git
cd ofono
./bootstrap
./configure --enable-debug --prefix=/home/lindi/install --enable-maintainer-mode --mandir=/home/lindi/install/usr/share/man --sysconfdir=/home/lindi/install/etc --localstatedir=/home/lindi/install/var --disable-datafiles
make
fails with
> CC gdbus/watch.o
> CC gisi/netlink.o
> cc1: warnings being treated as errors
> gisi/netlink.c: In function 'g_pn_nl_process':
> gisi/netlink.c:97: error: cast increases required alignment of target type
> gisi/netlink.c:129: error: cast increases required alignment of target type
> gisi/netlink.c:130: error: cast increases required alignment of target type
on armel (openmoko gta02) debian unstable system with gcc 4:4.3.3-9
apparently since in mainstainer mode -Wcast-align complains about
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
(struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
which is defined in /usr/include/linux/netlink. I don't know how to
best fix this. The options that I see are
1) Add
pragma GCC diagnostic warning "-Wcast-align"
to ignore the issue in the four affected files: gisi/client.c gisi/iter.c gisi/netlink.c gisi/socket.c
2) Disable -Wcast-alignt checks completely even in maintainer mode (not very nice)
3) Include a fixed version of NLMSG_ALIGN (and also send it usptream of course).
best regards,
Timo Lindfors
next reply other threads:[~2009-09-15 18:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-15 18:36 Timo Juhani Lindfors [this message]
2009-09-16 14:00 ` netlink.c:97: error: cast increases required alignment of target type Aki Niemi
-- strict thread matches above, loose matches on Subject: below --
2009-11-09 15:45 andrzej zaborowski
2009-11-09 17:27 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2009-11-09 17:34 ` andrzej zaborowski
2009-11-09 17:45 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2009-11-09 17:57 ` andrzej zaborowski
2009-11-09 18:03 ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
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=84y6og3vi4.fsf@sauna.l.org \
--to=timo.lindfors@iki.fi \
--cc=ofono@ofono.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox