warning: pointer of type `void *' used in arithmetic'
PATCH 1/1 warning: pointer of type `void *' used in arithmetic'
warning killed.
Signature · 3 lines
/* Copyright (C) 2003, SCO, Inc. This is valuable Intellectual Property. */
#define say(x) lie(x)var/tmp/linux/include/linux/prefetch.h renamed from var/tmp/linux/include/linux/prefetch.h.orig +1 -1
@@ -59,7 +59,7 @@ {#ifdef ARCH_HAS_PREFETCH char *cp; -char *end = addr + len; +char *end = (char *)addr + len;for (cp = addr; cp < end; cp +=PREFETCH_STRIDE )prefetch (cp);
Quoted 11 lines · Pawe__ Sikora
warning killed.
---
/var/tmp/linux/include/linux/prefetch.h.orig2004-06-16 07:20:25.000000000 +0200
+++/var/tmp/linux/include/linux/prefetch.h2004-07-03 18:28:10.478861720 +0200
@@ -59,7 +59,7 @@
{
#ifdefARCH_HAS_PREFETCH
char *cp;
- char *end = addr + len;
+ char *end = (char *)addr + len;
What version of the compiler is generating this warning?
Quoted 13 lines · Andrew Morton
Quoted 11 lines · Pawe__ Sikora
warning killed.
---
/var/tmp/linux/include/linux/prefetch.h.orig2004-06-16 07:20:25.000000000 +0200
+++/var/tmp/linux/include/linux/prefetch.h2004-07-03 18:28:10.478861720 +0200
@@ -59,7 +59,7 @@
{
#ifdefARCH_HAS_PREFETCH
char *cp;
- char *end = addr + len;
+ char *end = (char *)addr + len;
Quoted 1 line
What version of the compiler is generating this warning?
As far as I know, any gcc if and only if you pass "-Wpointer-arith" to it. The kernel doesn't do that, leaving me wondering ...
Signature · 2 lines
Vojtech Pavlik SuSE Labs, SuSE CR
Quoted 15 lines · Vojtech Pavlik
Quoted 13 lines · Andrew Morton
Quoted 11 lines · Pawe__ Sikora
warning killed.
---
/var/tmp/linux/include/linux/prefetch.h.orig2004-06-16 07:20:25.000000000 +0200
+++/var/tmp/linux/include/linux/prefetch.h2004-07-03 18:28:10.478861720 +0200
@@ -59,7 +59,7 @@
{
#ifdefARCH_HAS_PREFETCH
char *cp;
- char *end = addr + len;
+ char *end = (char *)addr + len;
Quoted 5 lines
Quoted 1 line
What version of the compiler is generating this warning?
As far as I know, any gcc if and only if you pass "-Wpointer-arith" to it. The kernel doesn't do that, leaving me wondering ...
This discussion fell off the mailing list (grr).
The warning was encountered when building the nvidia driver, and it indeed uses -Wpointer-arith.