From patchwork Sun May 15 04:16:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fix acpid compiler warning on some platforms Date: Sun, 15 May 2011 04:16:52 -0000 From: Christian Betz X-Patchwork-Id: 4061 Message-Id: <1305433012-13000-2-git-send-email-christian.betz@gmail.com> To: openembedded-devel@lists.openembedded.org --- recipes/acpid/acpid-1.0.10/netlink.diff | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: Christian Betz 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; + }