From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12131 invoked by alias); 23 Apr 2002 03:00:18 -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 12025 invoked from network); 23 Apr 2002 03:00:14 -0000 Received: from unknown (HELO dr-evil.shagadelic.org) (208.176.2.162) by sources.redhat.com with SMTP; 23 Apr 2002 03:00:14 -0000 Received: by dr-evil.shagadelic.org (Postfix, from userid 7518) id A5ECA9869; Mon, 22 Apr 2002 20:00:13 -0700 (PDT) Date: Mon, 22 Apr 2002 20:00:00 -0000 From: Jason R Thorpe To: gdb-patches@sources.redhat.com Subject: [PATCH] Trivial printf format warning fixes Message-ID: <20020422200013.A18016@dr-evil.shagadelic.org> Reply-To: thorpej@wasabisystems.com Mail-Followup-To: Jason R Thorpe , gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: Wasabi Systems, Inc. X-SW-Source: 2002-04/txt/msg00821.txt.bz2 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 415 Committed as obvious. * findvar.c (extract_signed_integer): Cast printf argument to suppress format warning. (extract_unsigned_integer): Likewise. * infcmd.c (registers_info): Likewise. * top.c (get_prompt_1): Likewise. * valops.c (value_assign): Likewise. * valprint.c (print_decimal): Likewise. -- -- Jason R. Thorpe --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=format-patch Content-length: 3633 Index: findvar.c =================================================================== RCS file: /cvs/src/src/gdb/findvar.c,v retrieving revision 1.31 diff -u -r1.31 findvar.c --- findvar.c 9 Apr 2002 03:06:13 -0000 1.31 +++ findvar.c 23 Apr 2002 02:52:00 -0000 @@ -57,7 +57,7 @@ if (len > (int) sizeof (LONGEST)) error ("\ That operation is not available on integers of more than %d bytes.", - sizeof (LONGEST)); + (int) sizeof (LONGEST)); /* Start at the most significant end of the integer, and work towards the least significant. */ @@ -91,7 +91,7 @@ if (len > (int) sizeof (ULONGEST)) error ("\ That operation is not available on integers of more than %d bytes.", - sizeof (ULONGEST)); + (int) sizeof (ULONGEST)); /* Start at the most significant end of the integer, and work towards the least significant. */ Index: infcmd.c =================================================================== RCS file: /cvs/src/src/gdb/infcmd.c,v retrieving revision 1.45 diff -u -r1.45 infcmd.c --- infcmd.c 21 Apr 2002 20:23:33 -0000 1.45 +++ infcmd.c 23 Apr 2002 02:52:14 -0000 @@ -1681,7 +1681,7 @@ if (*addr_exp >= '0' && *addr_exp <= '9') regnum = atoi (addr_exp); /* Take a number */ if (regnum >= numregs) /* Bad name, or bad number */ - error ("%.*s: invalid register", end - addr_exp, addr_exp); + error ("%.*s: invalid register", (int) (end - addr_exp), addr_exp); found: DO_REGISTERS_INFO (regnum, fpregs); Index: top.c =================================================================== RCS file: /cvs/src/src/gdb/top.c,v retrieving revision 1.61 diff -u -r1.61 top.c --- top.c 28 Mar 2002 01:35:55 -0000 1.61 +++ top.c 23 Apr 2002 02:52:24 -0000 @@ -1435,7 +1435,7 @@ if (*promptp != gdb_prompt_escape) error ("Syntax error at prompt position %d", - promptp - local_prompt); + (int) (promptp - local_prompt)); else { promptp++; /* skip second escape char */ @@ -1581,7 +1581,7 @@ break; /* void type -- no output */ default: error ("bad data type at prompt position %d", - promptp - local_prompt); + (int) (promptp - local_prompt)); break; } outp += strlen (outp); Index: valops.c =================================================================== RCS file: /cvs/src/src/gdb/valops.c,v retrieving revision 1.53 diff -u -r1.53 valops.c --- valops.c 22 Mar 2002 18:57:08 -0000 1.53 +++ valops.c 23 Apr 2002 02:52:27 -0000 @@ -607,7 +607,7 @@ if (changed_len > (int) sizeof (LONGEST)) error ("Can't handle bitfields which don't fit in a %d bit word.", - sizeof (LONGEST) * HOST_CHAR_BIT); + (int) sizeof (LONGEST) * HOST_CHAR_BIT); read_memory (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval), buffer, changed_len); @@ -644,7 +644,7 @@ if (len > (int) sizeof (LONGEST)) error ("Can't handle bitfields in registers larger than %d bits.", - sizeof (LONGEST) * HOST_CHAR_BIT); + (int) sizeof (LONGEST) * HOST_CHAR_BIT); if (VALUE_BITPOS (toval) + VALUE_BITSIZE (toval) > len * HOST_CHAR_BIT) Index: valprint.c =================================================================== RCS file: /cvs/src/src/gdb/valprint.c,v retrieving revision 1.24 diff -u -r1.24 valprint.c --- valprint.c 17 Mar 2002 16:10:25 -0000 1.24 +++ valprint.c 23 Apr 2002 02:52:28 -0000 @@ -335,7 +335,7 @@ val_long); break; case 'u': - fprintf_filtered (stream, "%llu", val_long); + fprintf_filtered (stream, "%llu", (long long) val_long); break; case 'x': fprintf_filtered (stream, --k+w/mQv8wyuph6w0--