From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30266 invoked by alias); 7 Mar 2008 18:28:08 -0000 Received: (qmail 30254 invoked by uid 22791); 7 Mar 2008 18:28:08 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 07 Mar 2008 18:27:49 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D40D12AA2F0 for ; Fri, 7 Mar 2008 13:27:47 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eeCQPoWucTsn for ; Fri, 7 Mar 2008 13:27:47 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6F5A72AA1E1 for ; Fri, 7 Mar 2008 13:27:47 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 34310E7ACB; Fri, 7 Mar 2008 10:27:44 -0800 (PST) Date: Fri, 07 Mar 2008 18:28:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFA] compilation error in remote.c on sparc-solaris Message-ID: <20080307182744.GG3995@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i 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: 2008-03/txt/msg00049.txt.bz2 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 942 Hello, I get the following warning when compiling remote.c on a sparc-solaris machine: remote.c: In function 'extended_remote_attach_1': remote.c:2859: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'pid_t' I think the problem is that, on sparc-solaris, type pid_t is defined as a "long", whereas on other machines I've built GDB on, it's an int. Variable pid is defined as follow: pid_t pid; I think it's good enough to change its type to "int". I've never seen a PID that's larger than 7 digits, so an int should always be big enough. In any case, that's what the pid_t structure uses for the pid. 2008-03-07 Joel Brobecker * remote.c (extended_remote_attach_1): Make local variable pid an int instead of a pid_t. Tested on sparc-solaris by rebuilding remote.o (I tried with both a 32bit compiler and a 64bit compiler). OK to apply? Thanks, -- Joel --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="remote.c.diff" Content-length: 369 Index: remote.c =================================================================== --- remote.c (revision 34865) +++ remote.c (revision 34866) @@ -2841,7 +2841,7 @@ static void extended_remote_attach_1 (struct target_ops *target, char *args, int from_tty) { struct remote_state *rs = get_remote_state (); - pid_t pid; + int pid; char *dummy; if (!args) --5vNYLRcllDrimb99--