chew.c printf of intptr_t
authorAlan Modra <amodra@gmail.com>
Tue, 28 Feb 2023 00:34:33 +0000 (11:04 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 28 Feb 2023 00:36:41 +0000 (11:06 +1030)
commit26c294bd1b8d95b421487294863eb1560b65580d
tree7ebe5f9bd74287b9fe0be56f6de06af9c7af503b
parent38395c77d7619fb32885468f52edf566ab84d411
chew.c printf of intptr_t

Seen when building binutils with gcc -m32 on x86_64-linux.
chew.c: In function ‘print’:
chew.c:1434:59: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘intptr_t’ {aka ‘int’} [-Wformat=]
 1434 |     fprintf (stderr, "print: illegal print destination `%ld'\n", *isp);
      |                                                         ~~^      ~~~~
      |                                                           |      |
      |                                                           |      intptr_t {aka int}
      |                                                           long int
      |                                                         %d

* chew.c: Include inttypes.h.
(print): Use PRIdPTR for *isp.
bfd/doc/chew.c