For sim code variables still need to be declared at the start of the
enclosing block.  This silences a few GCC warnings.
sim/rx/ChangeLog:
	* syscalls.c (rx_syscall): Move declaration of some variables to
	the start of the enclosing block.
	* trace.c (load_file_and_line): Likewise.
+2021-02-08  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * syscalls.c (rx_syscall): Move declaration of some variables to
+       the start of the enclosing block.
+       * trace.c (load_file_and_line): Likewise.
+
 2021-02-08  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * reg.c (fpsw2str): Provide a format string to printf.
 
 
     case SYS_open:
       {
+       int oflags, cflags;
        int path = arg ();
        /* The open function is defined as taking a variable number of arguments
           because the third parameter to it is optional:
           Hence the oflags and cflags arguments will be on the stack and we need
           to skip the (empty) argument registers r3 and r4.  */
        argp = 4;
-       int oflags = arg ();
-       int cflags = arg ();
+       oflags = arg ();
+       cflags = arg ();
 
        read_target (buf, path, 256, 1);
        if (trace)
 
       break;
   if (!f)
     {
+      FILE *file;
       int i;
       struct stat s;
       const char *found_filename, *slash;
       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);