From: "J.A. Magallon" <jamagallon@able.es>
To: "Linux-Kernel, " <linux-kernel@vger.kernel.org>
Subject: Warnings on void* arithmetic
Date: Fri, 6 Jan 2006 23:28:37 +0100 [thread overview]
Message-ID: <20060106232837.03bcacc3@werewolf.auna.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]
Hi...
Building the nVidia driver gives this couple warnings. I send them just
to see if they are real bugs or not.
include/linux/prefetch.h: In function ‘prefetch_range’:
include/linux/prefetch.h:62: warning: pointer of type ‘void *’ used in arithmetic
static inline void prefetch_range(void *addr, size_t len)
^^^^^^
{
#ifdef ARCH_HAS_PREFETCH
char *cp;
char *end = addr + len; <<<<<<<<<<<<<
for (cp = addr; cp < end; cp += PREFETCH_STRIDE)
prefetch(cp);
#endif
}
include/asm/io.h: In function ‘check_signature’:
include/asm/io.h:258: warning: wrong type argument to increment
static inline int check_signature(volatile void __iomem * io_addr,
^^^^^^^^^^^^^^
const unsigned char *signature, int length)
{
int retval = 0;
do {
if (readb(io_addr) != *signature)
goto out;
io_addr++; <<<<<<<<<<<<<<<<<<<
signature++;
length--;
} while (length);
retval = 1;
out:
return retval;
}
--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandriva Linux release 2006.1 (Cooker) for i586
Linux 2.6.15-jam1 (gcc 4.0.2 (4.0.2-1mdk for Mandriva Linux release 2006.1))
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
reply other threads:[~2006-01-06 22:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060106232837.03bcacc3@werewolf.auna.net \
--to=jamagallon@able.es \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®