diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-03-08 00:56:53 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-03-14 07:28:26 -0400 |
commit | c1e768db524407c25d14fe693a931af9cb6d9ad4 (patch) | |
tree | 7d049cb068b7a8ccabe4b1d08a1db1cd6b04a2a9 /sim/msp430/trace.c | |
parent | 465fb143c87076b6416a8d0d5dd79bb016060fe3 (diff) | |
download | binutils-c1e768db524407c25d14fe693a931af9cb6d9ad4.zip binutils-c1e768db524407c25d14fe693a931af9cb6d9ad4.tar.gz binutils-c1e768db524407c25d14fe693a931af9cb6d9ad4.tar.bz2 |
sim: msp430: use common warnings options
This triggers a bunch of new warnings, so fix some of them.
Diffstat (limited to 'sim/msp430/trace.c')
-rw-r--r-- | sim/msp430/trace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sim/msp430/trace.c b/sim/msp430/trace.c index d85069f..b6c7b02 100644 --- a/sim/msp430/trace.c +++ b/sim/msp430/trace.c @@ -32,6 +32,7 @@ #include "libiberty.h" #include "bfd.h" #include "dis-asm.h" +#include "trace.h" static int sim_dis_read (bfd_vma memaddr, bfd_byte * ptr, unsigned int length, @@ -138,6 +139,7 @@ load_file_and_line (const char *filename, int lineno) int i; struct stat s; const char *found_filename, *slash; + FILE *file; found_filename = filename; while (1) @@ -155,7 +157,7 @@ load_file_and_line (const char *filename, int lineno) files = f; f->filename = xstrdup (filename); f->data = (char *) xmalloc (s.st_size + 2); - FILE *file = fopen (found_filename, "rb"); + file = fopen (found_filename, "rb"); fread (f->data, 1, s.st_size, file); f->data[s.st_size] = 0; fclose (file); |