sim: msp430: use common warnings options

This triggers a bunch of new warnings, so fix some of them.
This commit is contained in:
Mike Frysinger
2014-03-08 00:56:53 -05:00
parent 465fb143c8
commit c1e768db52
7 changed files with 186 additions and 15 deletions

View File

@@ -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);