forked from Imagelibrary/binutils-gdb
sim: msp430: use common warnings options
This triggers a bunch of new warnings, so fix some of them.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user