This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch sim/igen] Fix -Werror probs


Just FYI,

The attached tweaks a few -Werror problems in the sim/igen directory.

committed,
Andrew
2002-06-17  Andrew Cagney  <cagney@redhat.com>

	* gen.c (gen_entry_expand_opcode): Initialize ``value'' to -1 and
	``t'' to NULL.
	* igen.c (main): Add default case to switch.
	* gen-icache.c (print_icache_extraction): Ditto.

Index: gen-icache.c
===================================================================
RCS file: /cvs/src/src/sim/igen/gen-icache.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gen-icache.c
--- gen-icache.c	16 Apr 1999 01:35:04 -0000	1.1.1.1
+++ gen-icache.c	17 Jun 2002 21:40:14 -0000
@@ -132,6 +132,8 @@
       else
 	return;
       break;
+    default:
+      abort (); /* Bad switch.  */
     }
   
   /* For the type, default to a simple unsigned */
Index: gen.c
===================================================================
RCS file: /cvs/src/src/sim/igen/gen.c,v
retrieving revision 1.2
diff -u -r1.2 gen.c
--- gen.c	24 Mar 2002 00:43:28 -0000	1.2
+++ gen.c	17 Jun 2002 21:40:15 -0000
@@ -1025,9 +1025,9 @@
 			    }
 			  case insn_field_cond_field:
 			    {
-			      int value;
+			      int value = -1;
 			      opcode_bits *bit;
-			      gen_entry *t;
+			      gen_entry *t = NULL;
 			      /* Try to find a value for the
                                  conditional by looking back through
                                  the previously defined bits for one
Index: igen.c
===================================================================
RCS file: /cvs/src/src/sim/igen/igen.c,v
retrieving revision 1.3
diff -u -r1.3 igen.c
--- igen.c	1 May 2002 23:26:31 -0000	1.3
+++ igen.c	17 Jun 2002 21:40:15 -0000
@@ -1277,6 +1277,8 @@
 	      case 'S':
 		name = &names->suffix;
 		break;
+	      default:
+		abort (); /* Bad switch.  */
 	      }
 	    name->u = strdup (chp);
 	    name->l = strdup (chp);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]