From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16443 invoked by alias); 24 Aug 2002 00:41:32 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16430 invoked from network); 24 Aug 2002 00:41:30 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.250) by sources.redhat.com with SMTP; 24 Aug 2002 00:41:30 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.5/8.12.5) with ESMTP id g7O0fTUo001440 for ; Sat, 24 Aug 2002 02:41:29 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.5/8.12.5) with ESMTP id g7O0fTiK032206 for ; Sat, 24 Aug 2002 02:41:29 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.5/8.12.5/Submit) id g7O0fTLP032203; Sat, 24 Aug 2002 02:41:29 +0200 (CEST) Date: Fri, 23 Aug 2002 17:57:00 -0000 Message-Id: <200208240041.g7O0fTLP032203@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH] Fix compiler warnings X-SW-Source: 2002-08/txt/msg00787.txt.bz2 On the alpha LONGEST is symply a long. Therefore, on alpha systems that support long long, this will lead to a format string warning. The attached patch fixes this. Mark Index: ChangeLog from Mark Kettenis * valprint.c (print_longest) [CC_HAS_LONG_LONG && PRINTF_HAS_LONG_LONG]: Cast val_long to (long long) or (unsigned long long) to prevent compiler warning on 64-bit systems. Index: valprint.c =================================================================== RCS file: /cvs/src/src/gdb/valprint.c,v retrieving revision 1.27 diff -u -p -r1.27 valprint.c --- valprint.c 29 Jul 2002 16:34:07 -0000 1.27 +++ valprint.c 24 Aug 2002 00:35:10 -0000 @@ -332,7 +332,7 @@ print_longest (struct ui_file *stream, i fprintf_filtered (stream, use_local ? local_decimal_format_custom ("ll") : "%lld", - val_long); + (long long) val_long); break; case 'u': fprintf_filtered (stream, "%llu", (long long) val_long); @@ -341,13 +341,13 @@ print_longest (struct ui_file *stream, i fprintf_filtered (stream, use_local ? local_hex_format_custom ("ll") : "%llx", - val_long); + (unsigned long long) val_long); break; case 'o': fprintf_filtered (stream, use_local ? local_octal_format_custom ("ll") : "%llo", - val_long); + (unsigned long long) val_long); break; case 'b': fprintf_filtered (stream, local_hex_format_custom ("02ll"), val_long);