]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
chew.c warning fix
authorAlan Modra <amodra@gmail.com>
Tue, 5 Aug 2014 01:53:58 +0000 (11:23 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 5 Aug 2014 01:53:58 +0000 (11:23 +0930)
* chew.c (print_stack_level, main): Cast result of pointer
difference to match format string.

bfd/doc/ChangeLog
bfd/doc/chew.c

index 93d82fbf12e16c5989513dc972d5e85a813247ee..338773267e8e2dd56e5ce7f89bee4aebef9a69df 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-05  Alan Modra  <amodra@gmail.com>
+
+       * chew.c (print_stack_level, main): Cast result of pointer
+       difference to match format string.
+
 2014-04-09  Alan Modra  <amodra@gmail.com>
 
        * Makefile.am ($(MKDOC)): New rule, depend on chew.stamp.  Move
index 1f81caeb4f254b20205c5e812ff01878105c9944..0773f9c1b02a9729f29054c57d4dff6cd3c863d3 100644 (file)
@@ -474,8 +474,10 @@ remove_noncomments (src, dst)
 static void
 print_stack_level ()
 {
-  fprintf (stderr, "current string stack depth = %ld, ", tos - stack);
-  fprintf (stderr, "current integer stack depth = %ld\n", isp - istack);
+  fprintf (stderr, "current string stack depth = %ld, ",
+          (long) (tos - stack));
+  fprintf (stderr, "current integer stack depth = %ld\n",
+          (long) (isp - istack));
   pc++;
 }
 
@@ -1562,7 +1564,7 @@ main (ac, av)
   if (tos != stack)
     {
       fprintf (stderr, "finishing with current stack level %ld\n",
-              tos - stack);
+              (long) (tos - stack));
       return 1;
     }
   return 0;