From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26995 invoked by alias); 16 Nov 2011 06:12:57 -0000 Received: (qmail 26985 invoked by uid 22791); 16 Nov 2011 06:12:56 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from shards.monkeyblade.net (HELO shards.monkeyblade.net) (198.137.202.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Nov 2011 06:12:23 +0000 Received: from localhost (cpe-66-65-61-233.nyc.res.rr.com [66.65.61.233]) (authenticated bits=0) by shards.monkeyblade.net (8.14.4/8.14.4) with ESMTP id pAG6CINE029671 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 15 Nov 2011 22:12:21 -0800 Date: Wed, 16 Nov 2011 06:12:00 -0000 Message-Id: <20111116.011217.835882743635387092.davem@davemloft.net> To: gdb-patches@sourceware.org Subject: [PATCH] Fix build failure due to compiler warning. From: David Miller Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2011-11/txt/msg00419.txt.bz2 On Sparc/Linux, __suseconds_t is not a type compatible with 'long' so these printf statements trigger a warning and thus a build failure. This mirrors the casting already being done for the same exact reason in vprintf_unfiltered. Ok to commit? 2011-11-15 David S. Miller * utils.c (report_command_stats): Cast delta_wall_time 'tv_sec' and 'tv_usec' to long for printf since these fields have a type which varies. diff --git a/gdb/utils.c b/gdb/utils.c index 82a0f45..a1cf8fc 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -707,7 +707,8 @@ report_command_stats (void *arg) ? _("Startup time: %ld.%06ld (cpu), %ld.%06ld (wall)\n") : _("Command execution time: %ld.%06ld (cpu), %ld.%06ld (wall)\n"), cmd_time / 1000000, cmd_time % 1000000, - delta_wall_time.tv_sec, delta_wall_time.tv_usec); + (long int) delta_wall_time.tv_sec, + (long int) delta_wall_time.tv_usec); } if (display_space)