Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdbserver: fix warning in nommu clone
Date: Tue, 16 Nov 2010 02:43:00 -0000	[thread overview]
Message-ID: <AANLkTim=v1NMr6ux1O4RLAuKaHfSBaJfGxNppR_Adfto@mail.gmail.com> (raw)
In-Reply-To: <1289865042-7691-1-git-send-email-vapier@gentoo.org>

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.


  reply	other threads:[~2010-11-16  2:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 23:51 Mike Frysinger
2010-11-16  2:43 ` Doug Evans [this message]
2010-11-16  3:27   ` Mike Frysinger

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='AANLkTim=v1NMr6ux1O4RLAuKaHfSBaJfGxNppR_Adfto@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.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