From: "Randy.Dunlap" <rddunlap@osdl.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: kai.germaschewski@gmx.de, rusty@rustcorp.com.au
Subject: [PATCH] eliminate gcc warnings on assert [__builtin_expect]
Date: Fri, 22 Aug 2003 22:05:00 -0700 [thread overview]
Message-ID: <20030822220500.6c0e1053.rddunlap@osdl.org> (raw)
Building genksyms on ia64 (gcc 3.3.1) produces these warnings:
scripts/genksyms/genksyms.c: In function `copy_node':
scripts/genksyms/genksyms.c:224: warning: passing arg 1 of `__builtin_expect' makes integer from pointer without a cast
scripts/genksyms/genksyms.c: In function `expand_and_crc_list':
scripts/genksyms/genksyms.c:384: warning: passing arg 1 of `__builtin_expect' makes integer from pointer without a cast
scripts/genksyms/genksyms.c:390: warning: passing arg 1 of `__builtin_expect' makes integer from pointer without a cast
scripts/genksyms/genksyms.c:396: warning: passing arg 1 of `__builtin_expect' makes integer from pointer without a cast
Is there a problem with coercing the pointer parameter to be (int)?
--
~Randy
patch_name: ksyms_assert.patch
patch_version: 2003-08-22.21:28:40
author: Randy.Dunlap <rddunlap@osdl.org>
description: eliminate gcc warnings on assert/__builtin_expect();
product: Linux
product_versions: 260-test4
diffstat: =
scripts/genksyms/genksyms.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -Naur ./scripts/genksyms/genksyms.h~astype ./scripts/genksyms/genksyms.h
--- ./scripts/genksyms/genksyms.h~astype Fri Aug 8 21:39:02 2003
+++ ./scripts/genksyms/genksyms.h Fri Aug 22 21:14:59 2003
@@ -89,8 +89,8 @@
#define MODUTILS_VERSION "<in-kernel>"
-#define xmalloc(size) ({ void *__ptr = malloc(size); assert(__ptr || size == 0); __ptr; })
-#define xstrdup(str) ({ char *__str = strdup(str); assert(__str); __str; })
+#define xmalloc(size) ({ void *__ptr = malloc(size); assert((int)__ptr || size == 0); __ptr; })
+#define xstrdup(str) ({ char *__str = strdup(str); assert((int)__str); __str; })
#endif /* genksyms.h */
next reply other threads:[~2003-08-23 5:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-23 5:05 Randy.Dunlap [this message]
2003-08-23 5:21 ` Roland Dreier
2003-08-23 5:47 ` Randy.Dunlap
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=20030822220500.6c0e1053.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=kai.germaschewski@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®