aboutsummaryrefslogtreecommitdiff
path: root/sim/m32c/trace.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-01 02:21:21 -0400
committerMike Frysinger <vapier@gentoo.org>2015-04-01 02:22:58 -0400
commit269e9c185f67d477a99574f53ead904d50fddfda (patch)
tree0177a3d3718cc79c55ae0ff07d9d4d974397800d /sim/m32c/trace.c
parent0fe84f3fbe9a740c38a8dbaa0150b8e4c25c69dd (diff)
downloadgdb-269e9c185f67d477a99574f53ead904d50fddfda.zip
gdb-269e9c185f67d477a99574f53ead904d50fddfda.tar.gz
gdb-269e9c185f67d477a99574f53ead904d50fddfda.tar.bz2
sim: m32c: enable warnings & clean up a bunch
This doesn't clean up all the warnings, just most of them. The ones that are left will require some care to unravel.
Diffstat (limited to 'sim/m32c/trace.c')
-rw-r--r--sim/m32c/trace.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sim/m32c/trace.c b/sim/m32c/trace.c
index f98790c..2c5009f 100644
--- a/sim/m32c/trace.c
+++ b/sim/m32c/trace.c
@@ -34,6 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "cpu.h"
#include "mem.h"
#include "load.h"
+#include "trace.h"
static int
sim_dis_read (bfd_vma memaddr, bfd_byte * ptr, unsigned int length,
@@ -128,6 +129,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)
@@ -145,7 +147,7 @@ load_file_and_line (const char *filename, int lineno)
files = f;
f->filename = strdup (filename);
f->data = (char *) malloc (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);
@@ -174,7 +176,7 @@ load_file_and_line (const char *filename, int lineno)
}
void
-sim_disasm_one ()
+sim_disasm_one (void)
{
static int initted = 0;
static asymbol **symtab = 0;