From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63087 invoked by alias); 11 Jun 2015 08:40:39 -0000 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 Received: (qmail 62119 invoked by uid 89); 11 Jun 2015 08:40:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: cam-smtp0.cambridge.arm.com Received: from fw-tnat.cambridge.arm.com (HELO cam-smtp0.cambridge.arm.com) (217.140.96.140) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 11 Jun 2015 08:40:37 +0000 Received: from arm.com (e106375-lin.cambridge.arm.com [10.2.207.23]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id t5B8eOt4002880; Thu, 11 Jun 2015 09:40:25 +0100 Date: Thu, 11 Jun 2015 08:40:00 -0000 From: James Greenhalgh To: Pedro Alves Cc: Gary Benson , "gdb-patches@sourceware.org" , Eli Zaretskii , Doug Evans , Iago =?iso-8859-1?Q?L=F3pez?= Galeiras Subject: Re: [PATCH 2/9 v2] Introduce nat/linux-namespaces.[ch] Message-ID: <20150611084023.GA7361@arm.com> References: <555DF224.8020101@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <555DF224.8020101@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00202.txt.bz2 Hi, This patch broke a -Werror native build on ARM for me as so: --- .../src/binutils-gdb/gdb/gdbserver/../nat/linux-namespaces.c: In function 'mnsh_send_message': .../src/binutils-gdb/gdb/gdbserver/../nat/linux-namespaces.c:377:28: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'ssize_t {aka int}' [-Werror=format=] debug_printf (" -> %ld\n", size); ^ .../src/binutils-gdb/gdb/gdbserver/../nat/linux-namespaces.c: In function 'mnsh_recv_message': .../src/binutils-gdb/gdb/gdbserver/../nat/linux-namespaces.c:429:50: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'ssize_t {aka int}' [-Werror=format=] debug_printf ("namespace-helper: recv failed (%ld)\n", size); ^ .../src/binutils-gdb/gdb/gdbserver/../nat/linux-namespaces.c:440:53: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'ssize_t {aka int}' [-Werror=format=] debug_printf ("namespace-helper: recv truncated (%ld 0x%x)\n", ^ --- I would expect that to mean this is broken for any "long int != ssize_t" target. I'm not sure which C standards GDB requires compatability with, but I believe the portable C99 way of printing a ssize_t would be "%zd". Thanks, James