chew.c warning fix

* chew.c (print_stack_level, main): Cast result of pointer
	difference to match format string.
This commit is contained in:
Alan Modra
2014-08-05 11:23:58 +09:30
parent 7833fb7b8e
commit 13ce3c11a1
2 changed files with 10 additions and 3 deletions

View 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> 2014-04-09 Alan Modra <amodra@gmail.com>
* Makefile.am ($(MKDOC)): New rule, depend on chew.stamp. Move * Makefile.am ($(MKDOC)): New rule, depend on chew.stamp. Move

View File

@ -474,8 +474,10 @@ remove_noncomments (src, dst)
static void static void
print_stack_level () print_stack_level ()
{ {
fprintf (stderr, "current string stack depth = %ld, ", tos - stack); fprintf (stderr, "current string stack depth = %ld, ",
fprintf (stderr, "current integer stack depth = %ld\n", isp - istack); (long) (tos - stack));
fprintf (stderr, "current integer stack depth = %ld\n",
(long) (isp - istack));
pc++; pc++;
} }
@ -1562,7 +1564,7 @@ main (ac, av)
if (tos != stack) if (tos != stack)
{ {
fprintf (stderr, "finishing with current stack level %ld\n", fprintf (stderr, "finishing with current stack level %ld\n",
tos - stack); (long) (tos - stack));
return 1; return 1;
} }
return 0; return 0;