Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Trivial printf format warning fixes
@ 2002-04-22 20:00 Jason R Thorpe
  2002-04-22 23:11 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Jason R Thorpe @ 2002-04-22 20:00 UTC (permalink / raw)
  To: gdb-patches

[-- 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,

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-04-23 15:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-22 20:00 [PATCH] Trivial printf format warning fixes Jason R Thorpe
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox