[oe-commits] Christian Betz : acpid-1.0.10: fix compiler warning on some platforms

git version control git at git.openembedded.org
Tue May 17 10:36:17 UTC 2011


Module: openembedded.git
Branch: master
Commit: e0d2de398e156fbdc913cc4decf75c357fcf2b33
URL:    http://git.openembedded.org/?p=openembedded.git&a=commit;h=e0d2de398e156fbdc913cc4decf75c357fcf2b33

Author: Christian Betz <christian.betz at gmail.com>
Date:   Sun May 15 00:16:52 2011 -0400

acpid-1.0.10: fix compiler warning on some platforms

Task compile fails with the following error.

| i686-angstrom-linux-gcc -march=pentiumpro --sysroot=/oe/build-vmc16/tmp/sysroots/i686-angstrom-linux -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE -O2 -g -DVERSION="\"1.0.10\""   -c -o sock.o sock.c
| cc1: warnings being treated as errors
| libnetlink.c: In function 'addraw_l':
| libnetlink.c:521:56: error: comparison between signed and unsigned integer expressions

Adding a missing cast fixes this problem.

Signed-off-by: Christian Betz <christian.betz at gmail.com>
Tested on `i686` by: Søren Holm <sgh at sgh.dk>
Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>

---

 recipes/acpid/acpid-1.0.10/netlink.diff |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/recipes/acpid/acpid-1.0.10/netlink.diff b/recipes/acpid/acpid-1.0.10/netlink.diff
index 635c550..ebdec58 100644
--- a/recipes/acpid/acpid-1.0.10/netlink.diff
+++ b/recipes/acpid/acpid-1.0.10/netlink.diff
@@ -2019,7 +2019,7 @@ diff -ruN acpid-1.0.10/libnetlink.c acpid-1.0.10-netlink2/libnetlink.c
 +
 +int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len)
 +{
-+	if ((int)NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) {
++	if ((int)NLMSG_ALIGN(n->nlmsg_len) + (int)NLMSG_ALIGN(len) > maxlen) {
 +		fprintf(stderr, "addraw_l ERROR: message exceeded bound of %d\n",maxlen);
 +		return -1;
 +	}





More information about the Openembedded-commits mailing list