* [PATCH] gdbserver: fix warning in nommu clone
@ 2010-11-15 23:51 Mike Frysinger
2010-11-16 2:43 ` Doug Evans
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2010-11-15 23:51 UTC (permalink / raw)
To: gdb-patches
Building gdbserver for nommu targets atm fails with:
linux-low.c: In function 'linux_tracefork_child':
linux-low.c:4151: error: pointer of type 'void *' used in arithmetic
So cast the void* to a char*.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-16 Mike Frysinger <vapier@gentoo.org>
* linux-low.c (linux_tracefork_child): Add char* cast to arg.
---
gdb/gdbserver/linux-low.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 7c50251..a81a8dc 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -4148,7 +4148,7 @@ linux_tracefork_child (void *arg)
__clone2 (linux_tracefork_grandchild, arg, STACK_SIZE,
CLONE_VM | SIGCHLD, NULL);
#else
- clone (linux_tracefork_grandchild, arg + STACK_SIZE,
+ clone (linux_tracefork_grandchild, (char *)arg + STACK_SIZE,
CLONE_VM | SIGCHLD, NULL);
#endif
--
1.7.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdbserver: fix warning in nommu clone
2010-11-15 23:51 [PATCH] gdbserver: fix warning in nommu clone Mike Frysinger
@ 2010-11-16 2:43 ` Doug Evans
2010-11-16 3:27 ` Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2010-11-16 2:43 UTC (permalink / raw)
To: Mike Frysinger; +Cc: gdb-patches
On Mon, Nov 15, 2010 at 3:50 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> Building gdbserver for nommu targets atm fails with:
> linux-low.c: In function 'linux_tracefork_child':
> linux-low.c:4151: error: pointer of type 'void *' used in arithmetic
>
> So cast the void* to a char*.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>
> 2010-11-16 Mike Frysinger <vapier@gentoo.org>
>
> * linux-low.c (linux_tracefork_child): Add char* cast to arg.
> ---
> gdb/gdbserver/linux-low.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
> index 7c50251..a81a8dc 100644
> --- a/gdb/gdbserver/linux-low.c
> +++ b/gdb/gdbserver/linux-low.c
> @@ -4148,7 +4148,7 @@ linux_tracefork_child (void *arg)
> __clone2 (linux_tracefork_grandchild, arg, STACK_SIZE,
> CLONE_VM | SIGCHLD, NULL);
> #else
> - clone (linux_tracefork_grandchild, arg + STACK_SIZE,
> + clone (linux_tracefork_grandchild, (char *)arg + STACK_SIZE,
> CLONE_VM | SIGCHLD, NULL);
> #endif
Hi.
Nit: The convention is to put a space after (char *).
Ok with that change.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-16 3:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-15 23:51 [PATCH] gdbserver: fix warning in nommu clone Mike Frysinger
2010-11-16 2:43 ` Doug Evans
2010-11-16 3:27 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox