sim/iq2000: silence pointer-sign warnings
authorAndrew Burgess <aburgess@redhat.com>
Wed, 12 Oct 2022 11:46:42 +0000 (12:46 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Wed, 19 Oct 2022 13:32:22 +0000 (14:32 +0100)
commitfeab6abfe23b5b1724cb3c00059254e8f1bc5225
tree78913a13cb80777aeb0dcf81006708b34b35c805
parentd0a7ca87ab208d72b2c6a9d44e30fe20c3c0542e
sim/iq2000: silence pointer-sign warnings

When building the iq2000 simulator I see a few warnings like this:

  /tmp/build/sim/../../src/sim/iq2000/iq2000.c: In function ‘fetch_str’:
  /tmp/build/sim/../../src/sim/iq2000/iq2000.c:50:54: error: pointer targets in passing argument 3 of ‘sim_read’ differ in signedness [-Werror=pointer-sign]
     50 |   sim_read (CPU_STATE (current_cpu), CPU2DATA(addr), buf, nr);
        |                                                      ^~~
        |                                                      |
        |                                                      char *

I've silenced these warnings by casting buf to 'unsigned char *'.
With this change I now see no warnings when compiling iq2000.c, so
I've removed the line from Makefile.in that disables -Werror.

Makefile.in was also disabling -Werror when compiling mloop.c,
however, I'm not seeing any warnings when compiling that file, so I've
removed the -Werror disable in that case too.
sim/iq2000/Makefile.in
sim/iq2000/iq2000.c