OSDN Git Service

sim: tweak load buffer type to avoid signed warnings
authorvapier <vapier>
Thu, 6 Jan 2011 02:13:36 +0000 (02:13 +0000)
committervapier <vapier>
Thu, 6 Jan 2011 02:13:36 +0000 (02:13 +0000)
commit76e5bf661ba5b7cec697698fce2b2c429615e00c
tree24318e4b0b91089b61f52fa86534d8d59847657b
parentb5c28afcfc7eae9634b138b7460b2027dd17eba1
sim: tweak load buffer type to avoid signed warnings

The sim_load_file func creates a buffer with arbitrary data in it (reads
it via the bfd).  It then passes it on to a sim_write_fn which expects a
unsigned char buffer.  Since sim_load_file itself doesn't care about the
contents, tweak the type to avoid signed mismatch warnings from gcc:

common/sim-load.c: In function ‘sim_load_file’:
common/sim-load.c:143: warning: pointer targets in passing argument 3 of ‘do_write’ differ in signedness
common/sim-load.c:143: note: expected ‘const unsigned char *’ but argument is of type ‘char *’

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
sim/common/ChangeLog
sim/common/sim-load.c