From: Jason R Thorpe <thorpej@wasabisystems.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Trivial printf format warning fixes
Date: Mon, 22 Apr 2002 20:00:00 -0000 [thread overview]
Message-ID: <20020422200013.A18016@dr-evil.shagadelic.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
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 <thorpej@wasabisystems.com>
[-- Attachment #2: format-patch --]
[-- Type: text/plain, Size: 3633 bytes --]
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,
next reply other threads:[~2002-04-23 3:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-22 20:00 Jason R Thorpe [this message]
2002-04-22 23:11 ` Eli Zaretskii
2002-04-22 23:20 ` Andreas Jaeger
2002-04-23 0:01 ` Jason R Thorpe
2002-04-23 3:13 ` Eli Zaretskii
2002-04-23 8:58 ` Jason R Thorpe
2002-04-22 23:22 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020422200013.A18016@dr-evil.shagadelic.org \
--to=thorpej@wasabisystems.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox