From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2434 invoked by alias); 16 Nov 2010 02:43:38 -0000 Received: (qmail 2425 invoked by uid 22791); 16 Nov 2010 02:43:37 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Nov 2010 02:43:32 +0000 Received: from wpaz24.hot.corp.google.com (wpaz24.hot.corp.google.com [172.24.198.88]) by smtp-out.google.com with ESMTP id oAG2hVEb010900 for ; Mon, 15 Nov 2010 18:43:31 -0800 Received: from qyk5 (qyk5.prod.google.com [10.241.83.133]) by wpaz24.hot.corp.google.com with ESMTP id oAG2hTBR010759 for ; Mon, 15 Nov 2010 18:43:30 -0800 Received: by qyk5 with SMTP id 5so209853qyk.1 for ; Mon, 15 Nov 2010 18:43:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.251.139 with SMTP id ms11mr702605qcb.267.1289875409518; Mon, 15 Nov 2010 18:43:29 -0800 (PST) Received: by 10.220.188.66 with HTTP; Mon, 15 Nov 2010 18:43:29 -0800 (PST) In-Reply-To: <1289865042-7691-1-git-send-email-vapier@gentoo.org> References: <1289865042-7691-1-git-send-email-vapier@gentoo.org> Date: Tue, 16 Nov 2010 02:43:00 -0000 Message-ID: Subject: Re: [PATCH] gdbserver: fix warning in nommu clone From: Doug Evans To: Mike Frysinger Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00187.txt.bz2 On Mon, Nov 15, 2010 at 3:50 PM, Mike Frysinger wrote: > Building gdbserver for nommu targets atm fails with: > =A0 =A0 =A0 =A0linux-low.c: In function 'linux_tracefork_child': > =A0 =A0 =A0 =A0linux-low.c:4151: error: pointer of type 'void *' used in = arithmetic > > So cast the void* to a char*. > > Signed-off-by: Mike Frysinger > > 2010-11-16 =A0Mike Frysinger =A0 > > =A0 =A0 =A0 =A0* linux-low.c (linux_tracefork_child): Add char* cast to a= rg. > --- > =A0gdb/gdbserver/linux-low.c | =A0 =A02 +- > =A01 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) > =A0 __clone2 (linux_tracefork_grandchild, arg, STACK_SIZE, > =A0 =A0 =A0 =A0 =A0 =A0CLONE_VM | SIGCHLD, NULL); > =A0#else > - =A0clone (linux_tracefork_grandchild, arg + STACK_SIZE, > + =A0clone (linux_tracefork_grandchild, (char *)arg + STACK_SIZE, > =A0 =A0 =A0 =A0 CLONE_VM | SIGCHLD, NULL); > =A0#endif Hi. Nit: The convention is to put a space after (char *). Ok with that change.