From 13ce3c11a1ea74166a530c576ffacf6e9915baf9 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 5 Aug 2014 11:23:58 +0930 Subject: [PATCH] chew.c warning fix * chew.c (print_stack_level, main): Cast result of pointer difference to match format string. --- bfd/doc/ChangeLog | 5 +++++ bfd/doc/chew.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bfd/doc/ChangeLog b/bfd/doc/ChangeLog index 93d82fb..3387732 100644 --- a/bfd/doc/ChangeLog +++ b/bfd/doc/ChangeLog @@ -1,3 +1,8 @@ +2014-08-05 Alan Modra + + * chew.c (print_stack_level, main): Cast result of pointer + difference to match format string. + 2014-04-09 Alan Modra * Makefile.am ($(MKDOC)): New rule, depend on chew.stamp. Move diff --git a/bfd/doc/chew.c b/bfd/doc/chew.c index 1f81cae..0773f9c 100644 --- a/bfd/doc/chew.c +++ b/bfd/doc/chew.c @@ -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; -- 2.7.4