This is the mail archive of the gdb-patches@sourceware.org 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] -Wall patches


Hello,


I have internally made changes necessary to get clean compile with -Wall compiler option. I tried to break down the patch to related files; I am intentionally not writing a changelog since most of the changes are mechanical and consist of removing unused variables, several unused functions, gdb_byte/char casting.


I would not mind if respective maintainers looked at the patches for their files and committed the changes (otherwise it will be quite cumbersome and somewhat overwhelming for me to keep the patch applicable; not to mention change log and all).


Thanks,


--
Aleksandar Ristovski
QNX Software Systems
diff -uprN src0/gdb/varobj.c src1/gdb/varobj.c
--- src0/gdb/varobj.c	2009-07-31 14:43:27.000000000 -0400
+++ src1/gdb/varobj.c	2009-08-06 13:37:25.000000000 -0400
@@ -263,8 +263,10 @@ static int varobj_value_is_changeable_p 
 
 static int is_root_p (struct varobj *var);
 
+#ifdef HAVE_PYTHON
 static struct varobj *
 varobj_add_child (struct varobj *var, const char *name, struct value *value);
+#endif /* HAVE_PYTHON */
 
 /* C implementation */
 
@@ -723,12 +725,12 @@ varobj_delete (struct varobj *var, char 
   return delcount;
 }
 
+#if HAVE_PYTHON
 /* Convenience function for varobj_set_visualizer.  Instantiate a
    pretty-printer for a given value.  */
 static PyObject *
 instantiate_pretty_printer (PyObject *constructor, struct value *value)
 {
-#if HAVE_PYTHON
   PyObject *val_obj = NULL; 
   PyObject *printer;
   volatile struct gdb_exception except;
@@ -746,9 +748,8 @@ instantiate_pretty_printer (PyObject *co
   printer = PyObject_CallFunctionObjArgs (constructor, val_obj, NULL);
   Py_DECREF (val_obj);
   return printer;
-#endif
-  return NULL;
 }
+#endif /* HAVE_PYTHON */
 
 /* Set/Get variable object display format */
 
@@ -978,7 +979,6 @@ varobj_get_num_children (struct varobj *
 VEC (varobj_p)*
 varobj_list_children (struct varobj *var)
 {
-  struct varobj *child;
   char *name;
   int i, children_changed;
 
@@ -1022,6 +1022,7 @@ varobj_list_children (struct varobj *var
   return var->children;
 }
 
+#ifdef HAVE_PYTHON
 static struct varobj *
 varobj_add_child (struct varobj *var, const char *name, struct value *value)
 {
@@ -1032,6 +1033,7 @@ varobj_add_child (struct varobj *var, co
   install_default_visualizer (v);
   return v;
 }
+#endif /* HAVE_PYTHON */
 
 /* Obtain the type of an object Variable as a string similar to the one gdb
    prints on the console */
@@ -1112,8 +1114,6 @@ int
 varobj_set_value (struct varobj *var, char *expression)
 {
   struct value *val;
-  int offset = 0;
-  int error = 0;
 
   /* The argument "expression" contains the variable's new value.
      We need to first construct a legal expression for this -- ugh! */
@@ -1122,7 +1122,6 @@ varobj_set_value (struct varobj *var, ch
   struct value *value;
   int saved_input_radix = input_radix;
   char *s = expression;
-  int i;
 
   gdb_assert (varobj_editable_p (var));
 
@@ -1333,10 +1332,10 @@ install_new_value (struct varobj *var, s
   return changed;
 }
 
+#if HAVE_PYTHON
 static void
 install_visualizer (struct varobj *var, PyObject *visualizer)
 {
-#if HAVE_PYTHON
   /* If there are any children now, wipe them.  */
   varobj_delete (var, NULL, 1 /* children only */);
   var->num_children = -1;
@@ -1352,10 +1351,9 @@ install_visualizer (struct varobj *var, 
      because updating will recompute dynamic children.  */
   if (!visualizer && var->children_requested)
     varobj_list_children (var);
-#else
-  error (_("Python support required"));
-#endif
 }
+#endif
+
 
 static void
 install_default_visualizer (struct varobj *var)
@@ -1394,7 +1392,7 @@ varobj_set_visualizer (struct varobj *va
 {
 #if HAVE_PYTHON
   PyObject *mainmod, *globals, *pretty_printer, *constructor;
-  struct cleanup *back_to, *value;
+  struct cleanup *back_to;
 
   back_to = varobj_ensure_python_env (var);
 
@@ -1453,17 +1451,11 @@ varobj_set_visualizer (struct varobj *va
 
 VEC(varobj_update_result) *varobj_update (struct varobj **varp, int explicit)
 {
-  int changed = 0;
   int type_changed = 0;
   int i;
-  int vleft;
-  struct varobj *v;
-  struct varobj **cv;
-  struct varobj **templist = NULL;
   struct value *new;
   VEC (varobj_update_result) *stack = NULL;
   VEC (varobj_update_result) *result = NULL;
-  struct frame_info *fi;
 
   /* Frozen means frozen -- we don't check for any change in
      this varobj, including its going out of scope, or
@@ -2232,7 +2224,7 @@ value_get_print_value (struct value *val
 	if (thevalue && !string_print)
 	  {
 	    do_cleanups (back_to);
-	    return thevalue;
+	    return (char *)thevalue;
 	  }
 	if (replacement)
 	  value = replacement;
@@ -2256,17 +2248,16 @@ value_get_print_value (struct value *val
     }
   else
     common_val_print (value, stb, 0, &opts, current_language);
-  thevalue = ui_file_xstrdup (stb, &dummy);
+  thevalue = (gdb_byte *)ui_file_xstrdup (stb, &dummy);
 
   do_cleanups (old_chain);
-  return thevalue;
+  return (char *)thevalue;
 }
 
 int
 varobj_editable_p (struct varobj *var)
 {
   struct type *type;
-  struct value *value;
 
   if (!(var->root->is_valid && var->value && VALUE_LVAL (var->value)))
     return 0;
@@ -2640,7 +2631,6 @@ c_value_of_root (struct varobj **var_han
 {
   struct value *new_val = NULL;
   struct varobj *var = *var_handle;
-  struct frame_info *fi;
   int within_scope = 0;
   struct cleanup *back_to;
 								 
@@ -2881,7 +2871,6 @@ cplus_describe_child (struct varobj *par
 		      char **cname, struct value **cvalue, struct type **ctype,
 		      char **cfull_expression)
 {
-  char *name = NULL;
   struct value *value;
   struct type *type;
   int was_ptr;
diff -uprN src0/gdb/ada-exp.y src1/gdb/ada-exp.y
--- src0/gdb/ada-exp.y	2009-05-26 09:56:22.000000000 -0400
+++ src1/gdb/ada-exp.y	2009-08-06 13:49:22.000000000 -0400
@@ -762,6 +762,7 @@ static struct obstack temp_parse_space;
 /* The following kludge was found necessary to prevent conflicts between */
 /* defs.h and non-standard stdlib.h files.  */
 #define qsort __qsort__dummy
+#define YY_NO_INPUT
 #include "ada-lex.c"
 
 int
@@ -1091,7 +1092,6 @@ find_primitive_type (char *name)
     {
       /* Check to see if we have a regular definition of this
 	 type that just didn't happen to have been read yet.  */
-      int ntypes;
       struct symbol *sym;
       char *expanded_name = 
 	(char *) alloca (strlen (name) + sizeof ("standard__"));
@@ -1366,7 +1366,6 @@ write_var_or_type (struct block *block, 
 	    }
 	  else if (nsyms == 0) 
 	    {
-	      int i;
 	      struct minimal_symbol *msym 
 		= ada_lookup_simple_minsym (encoded_name);
 	      if (msym != NULL)
diff -uprN src0/gdb/ada-lang.c src1/gdb/ada-lang.c
--- src0/gdb/ada-lang.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/ada-lang.c	2009-08-06 10:08:44.000000000 -0400
@@ -65,9 +65,7 @@
 #define TRUNCATION_TOWARDS_ZERO ((-5 / 2) == -2)
 #endif
 
-static void extract_string (CORE_ADDR addr, char *buf);
-
-static void modify_general_field (struct type *, char *, LONGEST, int, int);
+static void modify_general_field (struct type *, gdb_byte *, LONGEST, int, int);
 
 static struct type *desc_base_type (struct type *);
 
@@ -350,24 +348,6 @@ ada_print_array_index (struct value *ind
   fprintf_filtered (stream, " => ");
 }
 
-/* Read the string located at ADDR from the inferior and store the
-   result into BUF.  */
-
-static void
-extract_string (CORE_ADDR addr, char *buf)
-{
-  int char_index = 0;
-
-  /* Loop, reading one byte at a time, until we reach the '\000'
-     end-of-string marker.  */
-  do
-    {
-      target_read_memory (addr + char_index * sizeof (char),
-                          buf + char_index * sizeof (char), sizeof (char));
-      char_index++;
-    }
-  while (buf[char_index - 1] != '\000');
-}
 
 /* Assuming VECT points to an array of *SIZE objects of size
    ELEMENT_SIZE, grow it to contain at least MIN_SIZE objects,
@@ -1214,7 +1194,7 @@ static char *bound_name[] = {
 /* Like modify_field, but allows bitpos > wordlength.  */
 
 static void
-modify_general_field (struct type *type, char *addr,
+modify_general_field (struct type *type, gdb_byte *addr,
 		      LONGEST fieldval, int bitpos, int bitsize)
 {
   modify_field (type, addr + bitpos / 8, fieldval, bitpos % 8, bitsize);
@@ -1758,13 +1738,11 @@ static struct type *
 decode_packed_array_type (struct type *type)
 {
   struct symbol *sym;
-  struct block **blocks;
   char *raw_name = ada_type_name (ada_check_typedef (type));
   char *name;
   char *tail;
   struct type *shadow_type;
   long bits;
-  int i, n;
 
   if (!raw_name)
     raw_name = ada_type_name (desc_base_type (type));
@@ -2182,7 +2160,7 @@ ada_value_assign (struct value *toval, s
       int len = (value_bitpos (toval)
 		 + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
       int from_size;
-      char *buffer = (char *) alloca (len);
+      gdb_byte *buffer = (gdb_byte *) alloca (len);
       struct value *val;
       CORE_ADDR to_addr = value_address (toval);
 
@@ -3987,7 +3965,6 @@ add_defn_to_vec (struct obstack *obstack
                  struct block *block)
 {
   int i;
-  size_t tmp;
   struct ada_symbol_info *prevDefns = defns_collected (obstackp, 0);
 
   /* Do not try to complete stub types, as the debugger is probably
@@ -5074,7 +5051,6 @@ symbol_completion_match (const char *sym
                          const char *text, int text_len,
                          int wild_match, int encoded)
 {
-  char *result;
   const int verbatim_match = (text[0] == '<');
   int match = 0;
 
@@ -5461,8 +5437,9 @@ value_tag_from_contents_and_address (str
 				     const gdb_byte *valaddr,
                                      CORE_ADDR address)
 {
-  int tag_byte_offset, dummy1, dummy2;
+  int tag_byte_offset;
   struct type *tag_type;
+
   if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset,
                          NULL, NULL, NULL))
     {
@@ -7456,21 +7433,6 @@ ada_to_fixed_value (struct value *val)
                                     val);
 }
 
-/* A value representing VAL, but with a standard (static-sized) type
-   chosen to approximate the real type of VAL as well as possible, but
-   without consulting any runtime values.  For Ada dynamic-sized
-   types, therefore, the type of the result is likely to be inaccurate.  */
-
-static struct value *
-ada_to_static_fixed_value (struct value *val)
-{
-  struct type *type =
-    to_static_fixed_type (static_unwrap_type (value_type (val)));
-  if (type == value_type (val))
-    return val;
-  else
-    return coerce_unspec_val_to_type (val, type);
-}
 
 
 /* Attributes */
@@ -8036,7 +7998,6 @@ assign_aggregate (struct value *containe
   int max_indices, num_indices;
   int is_array_aggregate;
   int i;
-  struct value *mark = value_mark ();
 
   *pos += 3;
   if (noside != EVAL_NORMAL)
@@ -8519,7 +8480,7 @@ ada_evaluate_subexp (struct type *expect
                      int *pos, enum noside noside)
 {
   enum exp_opcode op;
-  int tem, tem2, tem3;
+  int tem;
   int pc;
   struct value *arg1 = NULL, *arg2 = NULL, *arg3;
   struct type *type;
@@ -10256,7 +10217,8 @@ print_it_exception (enum exception_catch
 
   if (addr != 0)
     {
-      read_memory (addr, exception_name, sizeof (exception_name) - 1);
+      read_memory (addr, (gdb_byte *)exception_name,
+		   sizeof (exception_name) - 1);
       exception_name [sizeof (exception_name) - 1] = '\0';
     }
 
diff -uprN src0/gdb/ada-tasks.c src1/gdb/ada-tasks.c
--- src0/gdb/ada-tasks.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/ada-tasks.c	2009-08-06 10:17:33.000000000 -0400
@@ -271,7 +271,7 @@ read_fat_string_value (char *dest, struc
 
   /* Extract LEN characters from the fat string.  */
   array_val = value_ind (value_field (val, array_fieldno));
-  read_memory (value_address (array_val), dest, len);
+  read_memory (value_address (array_val), (gdb_byte *)dest, len);
 
   /* Add the NUL character to close the string.  */
   dest[len] = '\0';
@@ -292,7 +292,6 @@ get_known_tasks_addr (void)
 
   if (ada_tasks_check_symbol_table)
     {
-      struct symbol *sym;
       struct minimal_symbol *msym;
 
       msym = lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL);
diff -uprN src0/gdb/ada-valprint.c src1/gdb/ada-valprint.c
--- src0/gdb/ada-valprint.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/ada-valprint.c	2009-08-06 10:24:31.000000000 -0400
@@ -680,7 +680,6 @@ ada_val_print_1 (struct type *type, cons
   unsigned int len;
   int i;
   struct type *elttype;
-  unsigned int eltlen;
   LONGEST val;
   const gdb_byte *valaddr = valaddr0 + embedded_offset;
 
diff -uprN src0/gdb/arch-utils.c src1/gdb/arch-utils.c
--- src0/gdb/arch-utils.c	2009-07-31 14:43:24.000000000 -0400
+++ src1/gdb/arch-utils.c	2009-08-06 09:19:24.000000000 -0400
@@ -646,7 +646,6 @@ initialize_current_architecture (void)
   /* Create the ``set architecture'' command appending ``auto'' to the
      list of architectures. */
   {
-    struct cmd_list_element *c;
     /* Append ``auto''. */
     int nr;
     for (nr = 0; arches[nr] != NULL; nr++);
@@ -758,7 +757,6 @@ extern initialize_file_ftype _initialize
 void
 _initialize_gdbarch_utils (void)
 {
-  struct cmd_list_element *c;
   add_setshow_enum_cmd ("endian", class_support,
 			endian_enum, &set_endian_string, _("\
 Set endianness of target."), _("\

diff -uprN src0/gdb/arm-tdep.c src1/gdb/arm-tdep.c
--- src0/gdb/arm-tdep.c	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/arm-tdep.c	2009-08-05 16:07:54.000000000 -0400
@@ -534,7 +534,6 @@ arm_skip_prologue (struct gdbarch *gdbar
   unsigned long inst;
   CORE_ADDR skip_pc;
   CORE_ADDR func_addr, limit_pc;
-  struct symtab_and_line sal;
 
   /* If we're in a dummy frame, don't even try to skip the prologue.  */
   if (deprecated_pc_in_call_dummy (gdbarch, pc))
@@ -655,7 +654,6 @@ thumb_scan_prologue (struct gdbarch *gdb
 {
   CORE_ADDR prologue_start;
   CORE_ADDR prologue_end;
-  CORE_ADDR current_pc;
 
   if (find_pc_partial_function (block_addr, NULL, &prologue_start,
 				&prologue_end))
@@ -1151,9 +1149,7 @@ struct frame_unwind arm_prologue_unwind 
 static struct arm_prologue_cache *
 arm_make_stub_cache (struct frame_info *this_frame)
 {
-  int reg;
   struct arm_prologue_cache *cache;
-  CORE_ADDR unwound_fp;
 
   cache = FRAME_OBSTACK_ZALLOC (struct arm_prologue_cache);
   cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
@@ -1185,7 +1181,7 @@ arm_stub_unwind_sniffer (const struct fr
 			 void **this_prologue_cache)
 {
   CORE_ADDR addr_in_block;
-  char dummy[4];
+  gdb_byte dummy[4];
 
   addr_in_block = get_frame_address_in_block (this_frame);
   if (in_plt_section (addr_in_block, NULL)
@@ -3656,7 +3652,7 @@ cleanup_block_load_pc (struct gdbarch *g
 {
   ULONGEST from = dsc->insn_addr;
   uint32_t status = displaced_read_reg (regs, from, ARM_PS_REGNUM);
-  int load_executed = condition_true (dsc->u.block.cond, status), i;
+  int load_executed = condition_true (dsc->u.block.cond, status);
   unsigned int mask = dsc->u.block.regmask, write_reg = 15;
   unsigned int regs_loaded = bitcount (mask);
   unsigned int num_to_shuffle = regs_loaded, clobbered;
@@ -3788,8 +3784,8 @@ copy_block_xfer (struct gdbarch *gdbarch
 	     contiguous chunk r0...rX before doing the transfer, then shuffling
 	     registers into the correct places in the cleanup routine.  */
 	  unsigned int regmask = insn & 0xffff;
-	  unsigned int num_in_list = bitcount (regmask), new_regmask, bit = 1;
-	  unsigned int to = 0, from = 0, i, new_rn;
+	  unsigned int num_in_list = bitcount (regmask), new_regmask;
+	  unsigned int from = 0, i;
 
 	  for (i = 0; i < num_in_list; i++)
 	    dsc->tmp[i] = displaced_read_reg (regs, from, i);
@@ -3863,8 +3859,6 @@ static int
 copy_svc (struct gdbarch *gdbarch, uint32_t insn, CORE_ADDR to,
 	  struct regcache *regs, struct displaced_step_closure *dsc)
 {
-  CORE_ADDR from = dsc->insn_addr;
-
   /* Allow OS-specific code to override SVC handling.  */
   if (dsc->u.svc.copy_svc_os)
     return dsc->u.svc.copy_svc_os (gdbarch, insn, to, regs, dsc);
@@ -4069,7 +4063,6 @@ decode_miscellaneous (struct gdbarch *gd
 {
   unsigned int op2 = bits (insn, 4, 6);
   unsigned int op = bits (insn, 21, 22);
-  unsigned int op1 = bits (insn, 16, 19);
 
   switch (op2)
     {
@@ -4164,7 +4157,6 @@ decode_ld_st_word_ubyte (struct gdbarch 
 {
   int a = bit (insn, 25), b = bit (insn, 4);
   uint32_t op1 = bits (insn, 20, 24);
-  int rn_f = bits (insn, 16, 19) == 0xf;
 
   if ((!a && (op1 & 0x05) == 0x00 && (op1 & 0x17) != 0x02)
       || (a && (op1 & 0x05) == 0x00 && (op1 & 0x17) != 0x02 && !b))
@@ -4298,7 +4290,6 @@ decode_svc_copro (struct gdbarch *gdbarc
   unsigned int op1 = bits (insn, 20, 25);
   int op = bit (insn, 4);
   unsigned int coproc = bits (insn, 8, 11);
-  unsigned int rn = bits (insn, 16, 19);
 
   if ((op1 & 0x20) == 0x00 && (op1 & 0x3a) != 0x00 && (coproc & 0xe) == 0xa)
     return decode_ext_reg_ld_st (gdbarch, insn, regs, dsc);
@@ -4532,10 +4523,10 @@ gdb_print_insn_arm (bfd_vma memaddr, dis
 #define THUMB_LE_BREAKPOINT {0xbe,0xbe}
 #define THUMB_BE_BREAKPOINT {0xbe,0xbe}
 
-static const char arm_default_arm_le_breakpoint[] = ARM_LE_BREAKPOINT;
-static const char arm_default_arm_be_breakpoint[] = ARM_BE_BREAKPOINT;
-static const char arm_default_thumb_le_breakpoint[] = THUMB_LE_BREAKPOINT;
-static const char arm_default_thumb_be_breakpoint[] = THUMB_BE_BREAKPOINT;
+static const gdb_byte arm_default_arm_le_breakpoint[] = ARM_LE_BREAKPOINT;
+static const gdb_byte arm_default_arm_be_breakpoint[] = ARM_BE_BREAKPOINT;
+static const gdb_byte arm_default_thumb_le_breakpoint[] = THUMB_LE_BREAKPOINT;
+static const gdb_byte arm_default_thumb_be_breakpoint[] = THUMB_BE_BREAKPOINT;
 
 /* Determine the type and size of breakpoint to insert at PCPTR.  Uses
    the program counter value to determine whether a 16-bit or 32-bit
@@ -4769,7 +4760,7 @@ arm_store_return_value (struct type *typ
 
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
     {
-      char buf[MAX_REGISTER_SIZE];
+      gdb_byte buf[MAX_REGISTER_SIZE];
 
       switch (gdbarch_tdep (gdbarch)->fp_model)
 	{
@@ -4926,7 +4917,7 @@ arm_get_longjmp_target (struct frame_inf
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR jb_addr;
-  char buf[INT_REGISTER_SIZE];
+  gdb_byte buf[INT_REGISTER_SIZE];
   
   jb_addr = get_frame_register_unsigned (frame, ARM_A1_REGNUM);
 
@@ -5118,8 +5109,6 @@ static void
 arm_show_fallback_mode (struct ui_file *file, int from_tty,
 			struct cmd_list_element *c, const char *value)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (target_gdbarch);
-
   fprintf_filtered (file, _("\
 The current execution mode assumed (when symbols are unavailable) is \"%s\".\n"),
 		    arm_fallback_mode_string);
@@ -5129,8 +5118,6 @@ static void
 arm_show_force_mode (struct ui_file *file, int from_tty,
 		     struct cmd_list_element *c, const char *value)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (target_gdbarch);
-
   fprintf_filtered (file, _("\
 The current execution mode assumed (even when symbols are available) is \"%s\".\n"),
 		    arm_force_mode_string);
@@ -5395,7 +5382,6 @@ arm_neon_quad_write (struct gdbarch *gdb
 		     int regnum, const gdb_byte *buf)
 {
   char name_buf[4];
-  gdb_byte reg_buf[8];
   int offset, double_regnum;
 
   sprintf (name_buf, "d%d", regnum << 1);
@@ -6019,11 +6005,10 @@ _initialize_arm_tdep (void)
 {
   struct ui_file *stb;
   long length;
-  struct cmd_list_element *new_set, *new_show;
   const char *setname;
   const char *setdesc;
   const char *const *regnames;
-  int numregs, i, j;
+  int numregs, i;
   static char *helptext;
   char regdesc[1024], *rdptr = regdesc;
   size_t rest = sizeof (regdesc);
diff -uprN src0/gdb/arm-tdep.h src1/gdb/arm-tdep.h
--- src0/gdb/arm-tdep.h	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/arm-tdep.h	2009-08-05 16:05:29.000000000 -0400
@@ -164,9 +164,9 @@ struct gdbarch_tdep
   CORE_ADDR lowest_pc;		/* Lowest address at which instructions 
 				   will appear.  */
 
-  const char *arm_breakpoint;	/* Breakpoint pattern for an ARM insn.  */
+  const gdb_byte *arm_breakpoint; /* Breakpoint pattern for an ARM insn.  */
   int arm_breakpoint_size;	/* And its size.  */
-  const char *thumb_breakpoint;	/* Breakpoint pattern for an ARM insn.  */
+  const gdb_byte *thumb_breakpoint; /* Breakpoint pattern for an ARM insn.  */
   int thumb_breakpoint_size;	/* And its size.  */
 
   int jb_pc;			/* Offset to PC value in jump buffer. 
diff -uprN src0/gdb/auxv.c src1/gdb/auxv.c
--- src0/gdb/auxv.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/auxv.c	2009-08-05 16:48:03.000000000 -0400
@@ -127,7 +127,6 @@ target_auxv_search (struct target_ops *o
   gdb_byte *data;
   LONGEST n = target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL, &data);
   gdb_byte *ptr = data;
-  int ents = 0;
 
   if (n <= 0)
     return n;

diff -uprN src0/gdb/blockframe.c src1/gdb/blockframe.c
--- src0/gdb/blockframe.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/blockframe.c	2009-08-05 16:48:22.000000000 -0400
@@ -62,7 +62,6 @@ struct block *
 get_frame_block (struct frame_info *frame, CORE_ADDR *addr_in_block)
 {
   const CORE_ADDR pc = get_frame_address_in_block (frame);
-  struct frame_info *next_frame;
   struct block *bl;
   int inline_count;
 
@@ -363,7 +362,6 @@ block_innermost_frame (struct block *blo
   struct frame_info *frame;
   CORE_ADDR start;
   CORE_ADDR end;
-  CORE_ADDR calling_pc;
 
   if (block == NULL)
     return NULL;

diff -uprN src0/gdb/breakpoint.c src1/gdb/breakpoint.c
--- src0/gdb/breakpoint.c	2009-08-04 13:44:21.000000000 -0400
+++ src1/gdb/breakpoint.c	2009-08-06 08:54:18.000000000 -0400
@@ -180,8 +180,6 @@ static void stopat_command (char *arg, i
 
 static char *ep_parse_optional_if_clause (char **arg);
 
-static char *ep_parse_optional_filename (char **arg);
-
 static void catch_exception_command_1 (enum exception_event_kind ex_event, 
 				       char *arg, int tempflag, int from_tty);
 
@@ -797,7 +795,6 @@ static void
 insert_catchpoint (struct ui_out *uo, void *args)
 {
   struct breakpoint *b = (struct breakpoint *) args;
-  int val = -1;
 
   gdb_assert (b->type == bp_catchpoint);
   gdb_assert (b->ops != NULL && b->ops->insert != NULL);
@@ -905,8 +902,6 @@ update_watchpoint (struct breakpoint *b,
 {
   int within_current_scope;
   struct frame_id saved_frame_id;
-  struct bp_location *loc;
-  bpstat bs;
 
   /* We don't free locations.  They are stored in bp_location_chain and
      update_global_locations will eventually delete them and remove
@@ -1144,9 +1139,8 @@ insert_bp_location (struct bp_location *
 	    {
 	      if (automatic_hardware_breakpoints)
 		{
-		  int changed = 0;
 		  enum bp_loc_type new_type;
-		  
+
 		  if (mr->attrib.mode != MEM_RW)
 		    new_type = bp_loc_hardware_breakpoint;
 		  else 
@@ -1784,9 +1778,6 @@ remove_breakpoint (struct bp_location *b
     }
   else if (b->loc_type == bp_loc_hardware_watchpoint)
     {
-      struct value *v;
-      struct value *n;
-
       b->inserted = (is == mark_inserted);
       val = target_remove_watchpoint (b->address, b->length, 
 				      b->watchpoint_type);
@@ -2001,7 +1992,6 @@ int
 software_breakpoint_inserted_here_p (CORE_ADDR pc)
 {
   const struct bp_location *bpt;
-  int any_breakpoint_here = 0;
 
   ALL_BP_LOCATIONS (bpt)
     {
@@ -2756,7 +2746,6 @@ watchpoints_triggered (struct target_wai
 	|| b->type == bp_access_watchpoint)
       {
 	struct bp_location *loc;
-	struct value *v;
 
 	b->watchpoint_triggered = watch_triggered_no;
 	for (loc = b->loc; loc; loc = loc->next)
@@ -2973,8 +2962,6 @@ bpstat_check_watchpoint (bpstat bs)
       || b->type == bp_access_watchpoint
       || b->type == bp_hardware_watchpoint)
     {
-      CORE_ADDR addr;
-      struct value *v;
       int must_check_value = 0;
       
       if (b->type == bp_watchpoint)
@@ -3575,7 +3562,6 @@ print_one_breakpoint_location (struct br
 			       int print_address_bits)
 {
   struct command_line *l;
-  struct symbol *sym;
   struct ep_type_description
     {
       enum bptype type;
@@ -3748,6 +3734,8 @@ print_one_breakpoint_location (struct br
 	if (b->loc)
 	  *last_loc = b->loc;
 	break;
+      case bp_catchpoint:
+	break;
       }
 
   if (!part_of_multiple)
@@ -4351,7 +4339,7 @@ adjust_breakpoint_address (struct gdbarc
 static struct bp_location *
 allocate_bp_location (struct breakpoint *bpt)
 {
-  struct bp_location *loc, *loc_p;
+  struct bp_location *loc;
 
   loc = xmalloc (sizeof (struct bp_location));
   memset (loc, 0, sizeof (*loc));
@@ -5339,6 +5327,7 @@ mention (struct breakpoint *b)
       case bp_thread_event:
       case bp_overlay_event:
       case bp_longjmp_master:
+      case bp_catchpoint:
 	break;
       }
 
@@ -5905,7 +5894,6 @@ break_command_really (struct gdbarch *gd
   struct symtabs_and_lines sals;
   struct symtab_and_line pending_sal;
   char *copy_arg;
-  char *err_msg;
   char *addr_start = arg;
   char **addr_string;
   struct cleanup *old_chain;
@@ -6040,7 +6028,6 @@ break_command_really (struct gdbarch *gd
     }
   else
     {
-      struct symtab_and_line sal = {0};
       struct breakpoint *b;
 
       make_cleanup (xfree, copy_arg);
@@ -6781,42 +6768,6 @@ ep_parse_optional_if_clause (char **arg)
   return cond_string;
 }
 
-/* This function attempts to parse an optional filename from the arg
-   string.  If one is not found, it returns NULL.
-
-   Else, it returns a pointer to the parsed filename.  (This function
-   makes no attempt to verify that a file of that name exists, or is
-   accessible.)  And, it updates arg to point to the first character
-   following the parsed filename in the arg string.
-
-   Note that clients needing to preserve the returned filename for
-   future access should copy it to their own buffers. */
-static char *
-ep_parse_optional_filename (char **arg)
-{
-  static char filename[1024];
-  char *arg_p = *arg;
-  int i;
-  char c;
-
-  if ((*arg_p == '\0') || isspace (*arg_p))
-    return NULL;
-
-  for (i = 0;; i++)
-    {
-      c = *arg_p;
-      if (isspace (c))
-	c = '\0';
-      filename[i] = c;
-      if (c == '\0')
-	break;
-      arg_p++;
-    }
-  *arg = arg_p;
-
-  return filename;
-}
-
 /* Commands to deal with catching events, such as signals, exceptions,
    process start/exit, etc.  */
 
@@ -7010,7 +6961,6 @@ catch_exception_command_1 (enum exceptio
 			   int tempflag, int from_tty)
 {
   char *cond_string = NULL;
-  struct symtab_and_line *sal = NULL;
 
   if (!arg)
     arg = "";
@@ -7109,7 +7059,6 @@ catch_ada_exception_command (char *arg, 
   struct gdbarch *gdbarch = get_current_arch ();
   int tempflag;
   struct symtab_and_line sal;
-  enum bptype type;
   char *addr_string = NULL;
   char *exp_string = NULL;
   char *cond_string = NULL;
@@ -7357,7 +7306,6 @@ update_global_location_list (int should_
   struct bp_location *loc;
   struct bp_location *loc2;
   VEC(bp_location_p) *old_locations = NULL;
-  int ret;
   int ix;
   struct cleanup *cleanups;
 
@@ -7546,7 +7494,6 @@ void
 delete_breakpoint (struct breakpoint *bpt)
 {
   struct breakpoint *b;
-  struct bp_location *loc, *next;
 
   gdb_assert (bpt != NULL);
 
@@ -7841,14 +7788,11 @@ breakpoint_re_set_one (void *bint)
 {
   /* get past catch_errs */
   struct breakpoint *b = (struct breakpoint *) bint;
-  struct value *mark;
-  int i;
   int not_found = 0;
   int *not_found_ptr = &not_found;
   struct symtabs_and_lines sals = {};
   struct symtabs_and_lines expanded;
   char *s;
-  enum enable_state save_enable;
   struct gdb_exception e;
   struct cleanup *cleanups;
 
@@ -8263,8 +8207,7 @@ disable_command (char *args, int from_tt
 static void
 do_enable_breakpoint (struct breakpoint *bpt, enum bpdisp disposition)
 {
-  int target_resources_ok, other_type_used;
-  struct value *mark;
+  int target_resources_ok;
 
   if (bpt->type == bp_hardware_breakpoint)
     {

diff -uprN src0/gdb/charset.c src1/gdb/charset.c
--- src0/gdb/charset.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/charset.c	2009-08-06 09:00:48.000000000 -0400
@@ -591,7 +591,6 @@ wchar_iterate (struct wchar_iterator *it
       size_t orig_in = iter->bytes;
       size_t out_avail = out_request * sizeof (gdb_wchar_t);
       size_t num;
-      gdb_wchar_t result;
 
       size_t r = iconv (iter->desc,
 			(ICONV_CONST char **) &iter->input, &iter->bytes,
@@ -604,7 +603,7 @@ wchar_iterate (struct wchar_iterator *it
 	      /* Invalid input sequence.  Skip it, and let the caller
 		 know about it.  */
 	      *out_result = wchar_iterate_invalid;
-	      *ptr = iter->input;
+	      *ptr = (gdb_byte *)iter->input;
 	      *len = iter->width;
 	      iter->input += iter->width;
 	      iter->bytes -= iter->width;
@@ -630,7 +629,7 @@ wchar_iterate (struct wchar_iterator *it
 	      /* Incomplete input sequence.  Let the caller know, and
 		 arrange for future calls to see EOF.  */
 	      *out_result = wchar_iterate_incomplete;
-	      *ptr = iter->input;
+	      *ptr = (gdb_byte *)iter->input;
 	      *len = iter->bytes;
 	      iter->bytes = 0;
 	      return 0;
@@ -644,7 +643,7 @@ wchar_iterate (struct wchar_iterator *it
       num = out_request - out_avail / sizeof (gdb_wchar_t);
       *out_result = wchar_iterate_ok;
       *out_chars = iter->out;
-      *ptr = orig_inptr;
+      *ptr = (gdb_byte *)orig_inptr;
       *len = orig_in - iter->bytes;
       return num;
     }
@@ -732,7 +731,7 @@ find_charset_names (void)
 	  /* The size of buf is chosen arbitrarily.  */
 	  char buf[1024];
 	  char *start, *r;
-	  int len, keep_going;
+	  int len;
 
 	  r = fgets (buf, sizeof (buf), in);
 	  if (!r)
@@ -802,8 +801,6 @@ find_charset_names (void)
 void
 _initialize_charset (void)
 {
-  struct cmd_list_element *new_cmd;
-
   /* The first element is always "auto"; then we skip it for the
      commands where it is not allowed.  */
   VEC_safe_push (char_ptr, charsets, xstrdup ("auto"));

diff -uprN src0/gdb/cli/cli-cmds.c src1/gdb/cli/cli-cmds.c
--- src0/gdb/cli/cli-cmds.c	2009-07-31 14:43:27.000000000 -0400
+++ src1/gdb/cli/cli-cmds.c	2009-08-05 16:28:07.000000000 -0400
@@ -236,7 +236,6 @@ compare_strings (const void *arg1, const
 static void
 complete_command (char *arg, int from_tty)
 {
-  int i;
   int argpoint;
   char **completions, *point, *arg_prefix;
 
@@ -983,7 +982,7 @@ disassemble_command (char *arg, int from
   struct gdbarch *gdbarch = get_current_arch ();
   CORE_ADDR low, high;
   char *name;
-  CORE_ADDR pc, pc_masked;
+  CORE_ADDR pc;
   char *space_index;
   int flags;
 
diff -uprN src0/gdb/cli/cli-decode.c src1/gdb/cli/cli-decode.c
--- src0/gdb/cli/cli-decode.c	2009-06-22 15:03:16.000000000 -0400
+++ src1/gdb/cli/cli-decode.c	2009-08-05 16:26:47.000000000 -0400
@@ -1422,8 +1422,6 @@ deprecated_cmd_warning (char **text)
   struct cmd_list_element *alias = NULL;
   struct cmd_list_element *prefix_cmd = NULL;
   struct cmd_list_element *cmd = NULL;
-  struct cmd_list_element *c;
-  char *type;
 
   if (!lookup_cmd_composition (*text, &alias, &prefix_cmd, &cmd))
     /* return if text doesn't evaluate to a command */
diff -uprN src0/gdb/cli/cli-dump.c src1/gdb/cli/cli-dump.c
--- src0/gdb/cli/cli-dump.c	2009-07-09 17:20:16.000000000 -0400
+++ src1/gdb/cli/cli-dump.c	2009-08-05 16:26:27.000000000 -0400
@@ -222,7 +222,6 @@ dump_memory_to_file (char *cmd, char *mo
   void *buf;
   char *lo_exp;
   char *hi_exp;
-  int len;
 
   /* Open the file.  */
   filename = scan_filename_with_cleanup (&cmd, NULL);
@@ -512,7 +511,6 @@ static void
 restore_binary_file (char *filename, struct callback_data *data)
 {
   FILE *file = fopen_with_cleanup (filename, FOPEN_RB);
-  int status;
   gdb_byte *buf;
   long len;
 
diff -uprN src0/gdb/cli/cli-script.c src1/gdb/cli/cli-script.c
--- src0/gdb/cli/cli-script.c	2009-08-04 13:44:22.000000000 -0400
+++ src1/gdb/cli/cli-script.c	2009-08-05 16:27:39.000000000 -0400
@@ -999,7 +999,6 @@ recurse_read_control_structure (char * (
   enum misc_command_type val;
   enum command_control_type ret;
   struct command_line **body_ptr, *child_tail, *next;
-  char *p;
 
   child_tail = NULL;
   current_body = 1;
@@ -1350,8 +1349,8 @@ define_command (char *comname, int from_
       CMD_POST_HOOK
     };
   struct command_line *cmds;
-  struct cmd_list_element *c, *newc, *oldc, *hookc = 0, **list;
-  char *tem, *tem2, *comfull;
+  struct cmd_list_element *c, *newc, *hookc = 0, **list;
+  char *tem, *comfull;
   char tmpbuf[MAX_TMPBUF];
   int  hook_type      = CMD_NO_HOOK;
   int  hook_name_size = 0;
@@ -1530,7 +1529,6 @@ script_from_file (FILE *stream, char *fi
 {
   struct cleanup *old_cleanups;
   struct source_cleanup_lines_args old_lines;
-  int needed_length;
 
   if (stream == NULL)
     internal_error (__FILE__, __LINE__, _("called with NULL file pointer!"));

diff -uprN src0/gdb/coff-pe-read.c src1/gdb/coff-pe-read.c
--- src0/gdb/coff-pe-read.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/coff-pe-read.c	2009-08-06 09:45:17.000000000 -0400
@@ -108,7 +108,6 @@ add_pe_exported_sym (char *sym_name,
 
   char *qualified_name = 0;
   int dll_name_len = strlen (dll_name);
-  int count;
 
   /* Generate a (hopefully unique) qualified name using the first part
      of the dll name, e.g. KERNEL32!AddAtomA. This matches the style
@@ -283,7 +282,6 @@ read_pe_exported_syms (struct objfile *o
       unsigned long secptr1 = secptr + 40 * i;
       unsigned long vsize = pe_get32 (dll, secptr1 + 8);
       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-      unsigned long flags = pe_get32 (dll, secptr1 + 36);
       char sec_name[9];
       int sectix;
 
@@ -314,7 +312,7 @@ read_pe_exported_syms (struct objfile *o
   exp_funcbase = pe_as32 (expdata + 28);
 
   /* Use internal dll name instead of full pathname. */
-  dll_name = pe_as32 (expdata + 12) + erva;
+  dll_name = (char *) (pe_as32 (expdata + 12) + erva);
 
   bfd_map_over_sections (dll, get_section_vmas, section_data);
 
@@ -348,7 +346,7 @@ read_pe_exported_syms (struct objfile *o
 	  if ((func_rva >= section_data[sectix].rva_start)
 	      && (func_rva < section_data[sectix].rva_end))
 	    {
-	      add_pe_exported_sym (erva + name_rva,
+	      add_pe_exported_sym ((char *)(erva + name_rva),
 				   func_rva,
 				   section_data + sectix, dll_name, objfile);
 	      break;
diff -uprN src0/gdb/coffread.c src1/gdb/coffread.c
--- src0/gdb/coffread.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/coffread.c	2009-08-06 09:37:23.000000000 -0400
@@ -514,9 +514,7 @@ coff_symfile_read (struct objfile *objfi
   int stringtab_offset;
   struct cleanup *back_to, *cleanup_minimal_symbols;
   int stabstrsize;
-  int len;
-  char * target;
-  
+
   info = (struct coff_symfile_info *) objfile->deprecated_sym_private;
   dbxinfo = objfile->deprecated_sym_stab_info;
   symfile_bfd = abfd;		/* Kludge for swap routines */

diff -uprN src0/gdb/completer.c src1/gdb/completer.c
--- src0/gdb/completer.c	2009-05-26 09:56:21.000000000 -0400
+++ src1/gdb/completer.c	2009-08-06 09:16:45.000000000 -0400
@@ -78,10 +78,6 @@ static char *gdb_completer_file_name_bre
 static char *gdb_completer_file_name_break_characters = " \t\n*|\"';:?><";
 #endif
 
-/* These are used when completing on locations, which can mix file
-   names and symbol names separated by a colon.  */
-static char *gdb_completer_loc_break_characters = " \t\n*|\"';:?><,";
-
 /* Characters that can be used to quote completion strings.  Note that we
    can't include '"' because the gdb C parser treats such quoted sequences
    as strings.  */

diff -uprN src0/gdb/corefile.c src1/gdb/corefile.c
--- src0/gdb/corefile.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/corefile.c	2009-08-06 09:55:34.000000000 -0400
@@ -152,7 +152,6 @@ reopen_exec_file (void)
   char *filename;
   int res;
   struct stat st;
-  long mtime;
   struct cleanup *cleanups;
 
   /* Don't do anything if there isn't an exec file. */
@@ -328,7 +327,7 @@ read_memory_string (CORE_ADDR memaddr, c
       cnt = max_len - (cp - buffer);
       if (cnt > 8)
 	cnt = 8;
-      read_memory (memaddr + (int) (cp - buffer), cp, cnt);
+      read_memory (memaddr + (int) (cp - buffer), (gdb_byte *)cp, cnt);
       for (i = 0; i < cnt && *cp; i++, cp++)
 	;			/* null body */
 
diff -uprN src0/gdb/corelow.c src1/gdb/corelow.c
--- src0/gdb/corelow.c	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/corelow.c	2009-08-05 16:11:14.000000000 -0400
@@ -644,7 +644,6 @@ core_xfer_partial (struct target_ops *op
 
 	  struct bfd_section *section;
 	  bfd_size_type size;
-	  char *contents;
 
 	  section = bfd_get_section_by_name (core_bfd, ".auxv");
 	  if (section == NULL)
@@ -676,7 +675,6 @@ core_xfer_partial (struct target_ops *op
 
 	  struct bfd_section *section;
 	  bfd_size_type size;
-	  char *contents;
 
 	  section = bfd_get_section_by_name (core_bfd, ".wcookie");
 	  if (section == NULL)
@@ -720,7 +718,6 @@ core_xfer_partial (struct target_ops *op
 
 	  struct bfd_section *section;
 	  bfd_size_type size;
-	  char *contents;
 
 	  char sectionstr[100];
 	  xsnprintf (sectionstr, sizeof sectionstr, "SPU/%s", annex);

diff -uprN src0/gdb/cp-name-parser.y src1/gdb/cp-name-parser.y
--- src0/gdb/cp-name-parser.y	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/cp-name-parser.y	2009-08-05 16:45:39.000000000 -0400
@@ -1541,7 +1541,7 @@ yylex (void)
 {
   int c;
   int namelen;
-  const char *tokstart, *tokptr;
+  const char *tokstart;
 
  retry:
   prev_lexptr = lexptr;
diff -uprN src0/gdb/cp-namespace.c src1/gdb/cp-namespace.c
--- src0/gdb/cp-namespace.c	2009-07-09 17:20:15.000000000 -0400
+++ src1/gdb/cp-namespace.c	2009-08-06 13:38:52.000000000 -0400
@@ -32,9 +32,6 @@
 #include "frame.h"
 #include "buildsym.h"
 
-static struct using_direct *cp_copy_usings (struct using_direct *using,
-					    struct obstack *obstack);
-
 static struct symbol *lookup_namespace_scope (const char *name,
 					      const char *linkage_name,
 					      const struct block *block,
@@ -85,7 +82,6 @@ cp_scan_for_anonymous_namespaces (const 
       const char *name = SYMBOL_DEMANGLED_NAME (symbol);
       unsigned int previous_component;
       unsigned int next_component;
-      const char *len;
 
       /* Start with a quick-and-dirty check for mention of "(anonymous
 	 namespace)".  */
@@ -137,7 +133,6 @@ void
 cp_add_using_directive (const char *dest, const char *src)
 {
   struct using_direct *current;
-  struct using_direct *new;
 
   /* Has it already been added?  */
 
@@ -221,36 +216,6 @@ cp_add_using (const char *dest,
   return retval;
 }
 
-/* Make a copy of the using directives in the list pointed to by
-   USING, using OBSTACK to allocate memory.  Free all memory pointed
-   to by USING via xfree.  */
-
-static struct using_direct *
-cp_copy_usings (struct using_direct *using,
-		struct obstack *obstack)
-{
-  if (using == NULL)
-    {
-      return NULL;
-    }
-  else
-    {
-      struct using_direct *retval
-	= obstack_alloc (obstack, sizeof (struct using_direct));
-      retval->import_src = obsavestring (using->import_src, strlen (using->import_src),
-				    obstack);
-      retval->import_dest = obsavestring (using->import_dest, strlen (using->import_dest),
-				    obstack);
-      retval->next = cp_copy_usings (using->next, obstack);
-
-      xfree (using->import_src);
-      xfree (using->import_dest);
-      xfree (using);
-
-      return retval;
-    }
-}
-
 /* The C++-specific version of name lookup for static and global
    names.  This makes sure that names get looked for in all namespaces
    that are in scope.  NAME is the natural name of the symbol that
diff -uprN src0/gdb/cp-support.c src1/gdb/cp-support.c
--- src0/gdb/cp-support.c	2009-07-09 17:20:15.000000000 -0400
+++ src1/gdb/cp-support.c	2009-08-06 10:30:20.000000000 -0400
@@ -143,7 +143,6 @@ mangled_name_to_comp (const char *mangle
 {
   struct demangle_component *ret;
   char *demangled_name;
-  int len;
 
   /* If it looks like a v3 mangled name, then try to go directly
      to trees.  */
@@ -327,7 +326,6 @@ method_name_from_physname (const char *p
   void *storage = NULL;
   char *demangled_name = NULL, *ret;
   struct demangle_component *ret_comp;
-  int done;
 
   ret_comp = mangled_name_to_comp (physname, DMGL_ANSI, &storage,
 				   &demangled_name);
@@ -358,7 +356,6 @@ cp_func_name (const char *full_name)
 {
   char *ret;
   struct demangle_component *ret_comp;
-  int done;
 
   ret_comp = cp_demangled_name_to_comp (full_name, NULL);
   if (!ret_comp)
diff -uprN src0/gdb/cp-valprint.c src1/gdb/cp-valprint.c
--- src0/gdb/cp-valprint.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/cp-valprint.c	2009-08-06 10:25:06.000000000 -0400
@@ -591,7 +591,7 @@ cp_print_class_member (const gdb_byte *v
       return;
     }
 
-  cp_find_class_member (&domain, &fieldno, val << 3);
+  cp_find_class_member (&domain, (int *)&fieldno, val << 3);
 
   if (domain != NULL)
     {
diff -uprN src0/gdb/demangle.c src1/gdb/demangle.c
--- src0/gdb/demangle.c	2009-05-26 09:56:22.000000000 -0400
+++ src1/gdb/demangle.c	2009-08-06 09:37:06.000000000 -0400
@@ -177,7 +177,6 @@ is_cplus_marker (int c)
 void
 _initialize_demangler (void)
 {
-  struct cmd_list_element *set, *show;
   int i, ndems;
 
   /* Fill the demangling_style_names[] array.  */
diff -uprN src0/gdb/dictionary.c src1/gdb/dictionary.c
--- src0/gdb/dictionary.c	2009-05-26 09:56:20.000000000 -0400
+++ src1/gdb/dictionary.c	2009-08-06 09:09:41.000000000 -0400
@@ -578,7 +578,6 @@ iterator_first_hashed (const struct dict
 static struct symbol *
 iterator_next_hashed (struct dict_iterator *iterator)
 {
-  const struct dictionary *dict = DICT_ITERATOR_DICT (iterator);
   struct symbol *next;
 
   next = DICT_ITERATOR_CURRENT (iterator)->hash_next;

diff -uprN src0/gdb/disasm.c src1/gdb/disasm.c
--- src0/gdb/disasm.c	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/disasm.c	2009-08-06 09:01:02.000000000 -0400
@@ -178,7 +178,6 @@ do_mixed_source_and_assembly (struct gdb
   int i;
   int out_of_order = 0;
   int next_line = 0;
-  CORE_ADDR pc;
   int num_displayed = 0;
   struct cleanup *ui_out_chain;
   struct cleanup *ui_out_tuple_chain = make_cleanup (null_cleanup, 0);

diff -uprN src0/gdb/doublest.c src1/gdb/doublest.c
--- src0/gdb/doublest.c	2009-07-06 09:28:17.000000000 -0400
+++ src1/gdb/doublest.c	2009-08-06 10:29:26.000000000 -0400
@@ -100,6 +100,10 @@ get_field (const bfd_byte *data, enum fl
 	case floatformat_big:
 	  --cur_byte;
 	  break;
+	case floatformat_littlebyte_bigword:
+	case floatformat_vax:
+	  /* FIXME */
+	  break;
 	}
     }
   if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)

diff -uprN src0/gdb/dwarf2-frame.c src1/gdb/dwarf2-frame.c
--- src0/gdb/dwarf2-frame.c	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/dwarf2-frame.c	2009-08-06 10:01:55.000000000 -0400
@@ -377,7 +377,7 @@ execute_cfa_program (struct dwarf2_fde *
 {
   int eh_frame_p = fde->eh_frame_p;
   CORE_ADDR pc = get_frame_pc (this_frame);
-  int bytes_read;
+  unsigned int bytes_read;
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
 
@@ -411,7 +411,8 @@ execute_cfa_program (struct dwarf2_fde *
 	    case DW_CFA_set_loc:
 	      fs->pc = read_encoded_value (fde->cie->unit, fde->cie->encoding,
 					   fde->cie->addr_size, insn_ptr,
-					   &bytes_read, fde->initial_location);
+					   &bytes_read,
+					   fde->initial_location);
 	      /* Apply the objfile offset for relocatable objects.  */
 	      fs->pc += ANOFFSET (fde->cie->unit->objfile->section_offsets,
 				  SECT_OFF_TEXT (fde->cie->unit->objfile));
@@ -640,7 +641,7 @@ bad CFI data; mismatched DW_CFA_restore_
 	    case DW_CFA_GNU_negative_offset_extended:
 	      insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
 	      reg = dwarf2_frame_adjust_regnum (gdbarch, reg, eh_frame_p);
-	      insn_ptr = read_uleb128 (insn_ptr, insn_end, &offset);
+	      insn_ptr = read_uleb128 (insn_ptr, insn_end, (ULONGEST*)&offset);
 	      offset *= fs->data_align;
 	      dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
 	      fs->regs.reg[reg].how = DWARF2_FRAME_REG_SAVED_OFFSET;
@@ -1814,7 +1815,6 @@ decode_frame_entry (struct comp_unit *un
 {
   enum { NONE, ALIGN4, ALIGN8, FAIL } workaround = NONE;
   gdb_byte *ret;
-  const char *msg;
   ptrdiff_t start_offset;
 
   while (1)
diff -uprN src0/gdb/dwarf2expr.c src1/gdb/dwarf2expr.c
--- src0/gdb/dwarf2expr.c	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/dwarf2expr.c	2009-08-06 09:56:29.000000000 -0400
@@ -208,7 +208,6 @@ dwarf2_read_address (struct gdbarch *gdb
 		     gdb_byte *buf_end, int addr_size)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  CORE_ADDR result;
 
   if (buf_end - buf < addr_size)
     error (_("dwarf2_read_address: Corrupted DWARF expression."));
@@ -599,6 +598,8 @@ execute_stack_op (struct dwarf_expr_cont
 	      op_ptr = read_uleb128 (op_ptr, op_end, &reg);
 	      result += reg;
 	      break;
+	    default:
+	      break;
 	    }
 	  break;
 
diff -uprN src0/gdb/dwarf2read.c src1/gdb/dwarf2read.c
--- src0/gdb/dwarf2read.c	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/dwarf2read.c	2009-08-06 13:34:41.000000000 -0400
@@ -134,8 +134,9 @@ _STATEMENT_PROLOGUE;
 
 /* When non-zero, dump DIEs after they are read in.  */
 static int dwarf2_die_debug = 0;
-
+#ifdef HAVE_MMAP
 static int pagesize;
+#endif /* HAVE_MMAP */
 
 /* When set, the file that we're processing is known to have debugging
    info for C++ namespaces.  GCC 3.3.x did not produce this information,
@@ -635,9 +636,6 @@ struct dwarf_block
 #define DW_FIELD_ALLOC_CHUNK 4
 #endif
 
-/* A zeroed version of a partial die for initialization purposes.  */
-static struct partial_die_info zeroed_partial_die;
-
 /* FIXME: We might want to set this from BFD via bfd_arch_bits_per_byte,
    but this would require a corresponding change in unpack_field_as_long
    and friends.  */
@@ -1306,7 +1304,7 @@ zlib_decompress_section (struct objfile 
   /* Read the zlib header.  In this case, it should be "ZLIB" followed
      by the uncompressed section size, 8 bytes in big-endian order.  */
   if (compressed_size < header_size
-      || strncmp (compressed_buffer, "ZLIB", 4) != 0)
+      || strncmp ((char *)compressed_buffer, "ZLIB", 4) != 0)
     error (_("Dwarf Error: Corrupt DWARF ZLIB header from '%s'"),
            bfd_get_filename (abfd));
   uncompressed_size = compressed_buffer[4]; uncompressed_size <<= 8;
@@ -1378,7 +1376,7 @@ dwarf2_read_section (struct objfile *obj
       && bfd_bread (header, sizeof (header), abfd) == sizeof (header))
     {
       /* Upon decompression, update the buffer and its size.  */
-      if (strncmp (header, "ZLIB", sizeof (header)) == 0)
+      if (strncmp ((char *)header, "ZLIB", sizeof (header)) == 0)
         {
           zlib_decompress_section (objfile, sectp, &info->buffer,
 				   &info->size);
@@ -1404,7 +1402,8 @@ dwarf2_read_section (struct objfile *obj
       if (retbuf != MAP_FAILED)
 	{
 	  info->was_mmapped = 1;
-	  info->buffer = retbuf + (sectp->filepos & (pagesize - 1)) ;
+	  info->buffer = (gdb_byte *) (retbuf + (sectp->filepos
+						 & (pagesize - 1)));
 	  return;
 	}
     }
@@ -1616,7 +1615,6 @@ read_type_comp_unit_head (struct comp_un
 			  ULONGEST *signature,
 			  gdb_byte *types_ptr, bfd *abfd)
 {
-  unsigned int bytes_read;
   gdb_byte *initial_types_ptr = types_ptr;
 
   cu_header->offset = types_ptr - dwarf2_per_objfile->types.buffer;
@@ -2041,7 +2039,6 @@ dwarf2_build_psymtabs_hard (struct objfi
 {
   /* Instead of reading this into a big buffer, we should probably use
      mmap()  on architectures that support it. (FIXME) */
-  bfd *abfd = objfile->obfd;
   gdb_byte *info_ptr;
   struct cleanup *back_to;
 
@@ -2171,7 +2168,6 @@ create_all_comp_units (struct objfile *o
   while (info_ptr < dwarf2_per_objfile->info.buffer + dwarf2_per_objfile->info.size)
     {
       unsigned int length, initial_length_size;
-      gdb_byte *beg_of_comp_unit;
       struct dwarf2_per_cu_data *this_cu;
       unsigned int offset;
 
@@ -2221,8 +2217,6 @@ static void
 scan_partial_symbols (struct partial_die_info *first_die, CORE_ADDR *lowpc,
 		      CORE_ADDR *highpc, int need_pc, struct dwarf2_cu *cu)
 {
-  struct objfile *objfile = cu->objfile;
-  bfd *abfd = objfile->obfd;
   struct partial_die_info *pdi;
 
   /* Now, march along the PDI's, descending into ones which have
@@ -2390,7 +2384,6 @@ add_partial_symbol (struct partial_die_i
   struct objfile *objfile = cu->objfile;
   CORE_ADDR addr = 0;
   char *actual_name = NULL;
-  const char *my_prefix;
   const struct partial_symbol *psym = NULL;
   CORE_ADDR baseaddr;
   int built_actual_name = 0;
@@ -2586,8 +2579,6 @@ add_partial_namespace (struct partial_di
 		       CORE_ADDR *lowpc, CORE_ADDR *highpc,
 		       int need_pc, struct dwarf2_cu *cu)
 {
-  struct objfile *objfile = cu->objfile;
-
   /* Add a symbol for the namespace.  */
 
   add_partial_symbol (pdi, cu);
@@ -2730,8 +2721,6 @@ static void
 add_partial_enumeration (struct partial_die_info *enum_pdi,
 			 struct dwarf2_cu *cu)
 {
-  struct objfile *objfile = cu->objfile;
-  bfd *abfd = objfile->obfd;
   struct partial_die_info *pdi;
 
   if (enum_pdi->name != NULL)
@@ -3103,7 +3092,6 @@ load_full_comp_unit (struct dwarf2_per_c
   gdb_byte *info_ptr, *beg_of_comp_unit;
   struct cleanup *back_to, *free_cu_cleanup;
   struct attribute *attr;
-  CORE_ADDR baseaddr;
 
   gdb_assert (! per_cu->from_debug_types);
 
@@ -3166,7 +3154,6 @@ process_full_comp_unit (struct dwarf2_pe
   struct partial_symtab *pst = per_cu->psymtab;
   struct dwarf2_cu *cu = per_cu->cu;
   struct objfile *objfile = pst->objfile;
-  bfd *abfd = objfile->obfd;
   CORE_ADDR lowpc, highpc;
   struct symtab *symtab;
   struct cleanup *back_to;
@@ -3317,9 +3304,7 @@ process_die (struct die_info *die, struc
 static const char *
 dwarf2_full_name (struct die_info *die, struct dwarf2_cu *cu)
 {
-  struct attribute *attr;
   char *prefix, *name;
-  struct ui_file *buf = NULL;
 
   name = dwarf2_name (die, cu);
   if (!name)
@@ -3450,7 +3435,6 @@ static void
 read_file_scope (struct die_info *die, struct dwarf2_cu *cu)
 {
   struct objfile *objfile = cu->objfile;
-  struct comp_unit_head *cu_header = &cu->header;
   struct cleanup *back_to = make_cleanup (null_cleanup, 0);
   CORE_ADDR lowpc = ((CORE_ADDR) -1);
   CORE_ADDR highpc = ((CORE_ADDR) 0);
@@ -3580,7 +3564,6 @@ read_type_unit_scope (struct die_info *d
   char *comp_dir = NULL;
   struct die_info *child_die;
   bfd *abfd = objfile->obfd;
-  struct line_header *line_header = 0;
 
   /* start_symtab needs a low pc, but we don't really have one.
      Do what read_file_scope would do in the absence of such info.  */
@@ -5055,7 +5038,6 @@ read_structure_type (struct die_info *di
 static void
 process_structure_scope (struct die_info *die, struct dwarf2_cu *cu)
 {
-  struct objfile *objfile = cu->objfile;
   struct die_info *child_die = die->child;
   struct type *this_type;
 
@@ -5197,7 +5179,6 @@ determine_class_name (struct die_info *d
 static void
 process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu)
 {
-  struct objfile *objfile = cu->objfile;
   struct die_info *child_die;
   struct field *fields;
   struct symbol *sym;
@@ -5492,7 +5473,6 @@ read_namespace_type (struct die_info *di
 static void
 read_namespace (struct die_info *die, struct dwarf2_cu *cu)
 {
-  struct objfile *objfile = cu->objfile;
   const char *name;
   int is_anonymous;
 
@@ -5634,7 +5614,6 @@ read_tag_pointer_type (struct die_info *
 static struct type *
 read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu)
 {
-  struct objfile *objfile = cu->objfile;
   struct type *type;
   struct type *to_type;
   struct type *domain;
@@ -5822,7 +5801,6 @@ static struct type *
 read_typedef (struct die_info *die, struct dwarf2_cu *cu)
 {
   struct objfile *objfile = cu->objfile;
-  struct attribute *attr;
   const char *name = NULL;
   struct type *this_type;
 
@@ -6612,7 +6590,7 @@ read_partial_die (struct partial_die_inf
 		  gdb_byte *buffer, gdb_byte *info_ptr,
 		  struct dwarf2_cu *cu)
 {
-  unsigned int bytes_read, i;
+  unsigned int i;
   struct attribute attr;
   int has_low_pc_attr = 0;
   int has_high_pc_attr = 0;
@@ -6857,7 +6835,7 @@ find_partial_die (unsigned int offset, s
       struct partial_die_info comp_unit_die;
       struct abbrev_info *abbrev;
       unsigned int bytes_read;
-      char *info_ptr;
+      gdb_byte *info_ptr;
 
       per_cu->load_all_dies = 1;
 
@@ -10490,7 +10468,6 @@ static CORE_ADDR
 decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
 {
   struct objfile *objfile = cu->objfile;
-  struct comp_unit_head *cu_header = &cu->header;
   int i;
   int size = blk->size;
   gdb_byte *data = blk->data;
@@ -11114,11 +11091,6 @@ dwarf_decode_macros (struct line_header 
 
       switch (macinfo_type)
 	{
-	  /* A zero macinfo type indicates the end of the macro
-	     information.  */
-	case 0:
-	  break;
-
         case DW_MACINFO_define:
         case DW_MACINFO_undef:
           {

diff -uprN src0/gdb/elfread.c src1/gdb/elfread.c
--- src0/gdb/elfread.c	2009-05-26 09:56:21.000000000 -0400
+++ src1/gdb/elfread.c	2009-08-05 16:44:34.000000000 -0400
@@ -209,7 +209,6 @@ elf_symtab_read (struct objfile *objfile
 		 long number_of_symbols, asymbol **symbol_table)
 {
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
-  long storage_needed;
   asymbol *sym;
   long i;
   CORE_ADDR symaddr;
@@ -592,7 +591,6 @@ elf_symfile_read (struct objfile *objfil
   bfd *abfd = objfile->obfd;
   struct elfinfo ei;
   struct cleanup *back_to;
-  CORE_ADDR offset;
   long symcount = 0, dynsymcount = 0, synthcount, storage_needed;
   asymbol **symbol_table = NULL, **dyn_symbol_table = NULL;
   asymbol *synthsyms;

diff -uprN src0/gdb/eval.c src1/gdb/eval.c
--- src0/gdb/eval.c	2009-07-06 09:28:18.000000000 -0400
+++ src1/gdb/eval.c	2009-08-06 09:03:49.000000000 -0400
@@ -665,7 +665,7 @@ evaluate_subexp_standard (struct type *e
   struct type *type;
   int nargs;
   struct value **argvec;
-  int upper, lower, retcode;
+  int upper, lower;
   int code;
   int ix;
   long mem_offset;

diff -uprN src0/gdb/event-loop.c src1/gdb/event-loop.c
--- src0/gdb/event-loop.c	2009-05-26 09:56:25.000000000 -0400
+++ src1/gdb/event-loop.c	2009-08-06 09:16:22.000000000 -0400
@@ -262,7 +262,6 @@ static void create_file_handler (int fd,
 				 gdb_client_data client_data);
 static void handle_file_event (event_data data);
 static void check_async_event_handlers (void);
-static void check_async_signal_handlers (void);
 static int gdb_wait_for_event (int);
 static void poll_timers (void);
 

diff -uprN src0/gdb/c-exp.y src1/gdb/c-exp.y
--- src0/gdb/c-exp.y	2009-07-09 17:20:15.000000000 -0400
+++ src1/gdb/c-exp.y	2009-08-05 16:45:17.000000000 -0400
@@ -1569,7 +1569,7 @@ static int
 parse_string_or_char (char *tokptr, char **outptr, struct typed_stoken *value,
 		      int *host_chars)
 {
-  int quote, i;
+  int quote;
   enum c_string_type type;
 
   /* Build the gdb internal form of the input string in tempbuf.  Note
diff -uprN src0/gdb/f-exp.y src1/gdb/f-exp.y
--- src0/gdb/f-exp.y	2009-05-26 09:56:21.000000000 -0400
+++ src1/gdb/f-exp.y	2009-08-05 16:47:29.000000000 -0400
@@ -567,6 +567,13 @@ ptype	:	typebase
 		      case tp_function:
 			follow_type = lookup_function_type (follow_type);
 			break;
+		      case tp_const:
+			/* FIXME: */
+		      case tp_volatile:
+			/* FIXME: */
+		      case tp_space_identifier:
+			/* FIXME: */
+			break;
 		      }
 		  $$ = follow_type;
 		}
diff -uprN src0/gdb/jv-exp.y src1/gdb/jv-exp.y
--- src0/gdb/jv-exp.y	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/jv-exp.y	2009-08-05 16:46:27.000000000 -0400
@@ -547,7 +547,6 @@ CastExpression:
 		  write_exp_elt_opcode (UNOP_CAST); }
 |	'(' Expression ')' UnaryExpressionNotPlusMinus
 		{
-		  int exp_size = expout_ptr;
 		  int last_exp_size = length_of_subexp(expout, expout_ptr);
 		  struct type *type;
 		  int i;
@@ -1358,7 +1357,6 @@ push_expression_name (struct stoken name
 {
   char *tmp;
   struct type *typ;
-  char *ptr;
   int i;
 
   for (i = 0;  i < name.length;  i++)
diff -uprN src0/gdb/p-exp.y src1/gdb/p-exp.y
--- src0/gdb/p-exp.y	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/p-exp.y	2009-08-05 16:47:49.000000000 -0400
@@ -1084,7 +1084,6 @@ yylex ()
   char *tokstart;
   char *uptokstart;
   char *tokptr;
-  char *p;
   int explen, tempbufindex;
   static char *tempbuf;
   static int tempbufsize;
diff -uprN src0/gdb/expprint.c src1/gdb/expprint.c
--- src0/gdb/expprint.c	2009-06-10 13:49:44.000000000 -0400
+++ src1/gdb/expprint.c	2009-08-06 09:13:21.000000000 -0400
@@ -187,7 +187,8 @@ print_subexp_standard (struct expression
 	   additional parameter to LA_PRINT_STRING.  -fnf */
 	get_user_print_options (&opts);
 	LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
-			 &exp->elts[pc + 2].string, nargs, 0, &opts);
+			 (gdb_byte *)&exp->elts[pc + 2].string, nargs, 0,
+			 &opts);
       }
       return;
 
@@ -206,7 +207,8 @@ print_subexp_standard (struct expression
 	fputs_filtered ("@\"", stream);
 	get_user_print_options (&opts);
 	LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
-			 &exp->elts[pc + 2].string, nargs, 0, &opts);
+			 (gdb_byte *)&exp->elts[pc + 2].string, nargs, 0,
+			 &opts);
 	fputs_filtered ("\"", stream);
       }
       return;
@@ -292,7 +294,7 @@ print_subexp_standard (struct expression
 	  struct value_print_options opts;
 	  get_user_print_options (&opts);
 	  LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
-			   tempstr, nargs - 1, 0, &opts);
+			   (gdb_byte *)tempstr, nargs - 1, 0, &opts);
 	  (*pos) = pc;
 	}
       else

diff -uprN src0/gdb/f-typeprint.c src1/gdb/f-typeprint.c
--- src0/gdb/f-typeprint.c	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/f-typeprint.c	2009-08-06 10:23:55.000000000 -0400
@@ -154,7 +154,6 @@ f_type_print_varspec_suffix (struct type
 			     int arrayprint_recurse_level)
 {
   int upper_bound, lower_bound;
-  int retcode;
   /* No static variables are permitted as an error call may occur during
      execution of this function.  */
 
@@ -259,7 +258,6 @@ void
 f_type_print_base (struct type *type, struct ui_file *stream, int show,
 		   int level)
 {
-  int retcode;
   int upper_bound;
 
   int index;
diff -uprN src0/gdb/f-valprint.c src1/gdb/f-valprint.c
--- src0/gdb/f-valprint.c	2009-07-06 09:28:18.000000000 -0400
+++ src1/gdb/f-valprint.c	2009-08-06 10:25:36.000000000 -0400
@@ -92,7 +92,6 @@ f77_get_dynamic_length_of_aggregate (str
 {
   int upper_bound = -1;
   int lower_bound = 1;
-  int retcode;
 
   /* Recursively go all the way down into a possibly multi-dimensional
      F77 array and get the bounds.  For simple arrays, this is pretty
@@ -126,7 +125,7 @@ f77_create_arrayprint_offset_tbl (struct
   struct type *tmp_type;
   int eltlen;
   int ndimen = 1;
-  int upper, lower, retcode;
+  int upper, lower;
 
   tmp_type = type;
 

diff -uprN src0/gdb/findcmd.c src1/gdb/findcmd.c
--- src0/gdb/findcmd.c	2009-07-06 09:28:18.000000000 -0400
+++ src1/gdb/findcmd.c	2009-08-06 09:25:21.000000000 -0400
@@ -271,7 +271,8 @@ find_command (char *args, int from_tty)
       ULONGEST next_iter_incr;
       CORE_ADDR found_addr;
       int found = target_search_memory (start_addr, search_space_len,
-					pattern_buf, pattern_len, &found_addr);
+					(gdb_byte *)pattern_buf, pattern_len,
+					&found_addr);
 
       if (found <= 0)
 	break;

diff -uprN src0/gdb/frame-unwind.c src1/gdb/frame-unwind.c
--- src0/gdb/frame-unwind.c	2009-07-06 09:28:18.000000000 -0400
+++ src1/gdb/frame-unwind.c	2009-08-06 10:28:43.000000000 -0400
@@ -89,11 +89,10 @@ frame_unwind_append_unwinder (struct gdb
 const struct frame_unwind *
 frame_unwind_find_by_frame (struct frame_info *this_frame, void **this_cache)
 {
-  int i;
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
   struct frame_unwind_table_entry *entry;
-  struct cleanup *old_cleanup;
+
   for (entry = table->list; entry != NULL; entry = entry->next)
     {
       struct cleanup *old_cleanup;
diff -uprN src0/gdb/frame.c src1/gdb/frame.c
--- src0/gdb/frame.c	2009-07-06 09:28:18.000000000 -0400
+++ src1/gdb/frame.c	2009-08-06 10:28:21.000000000 -0400
@@ -1585,8 +1585,6 @@ inside_entry_func (struct frame_info *th
 struct frame_info *
 get_prev_frame (struct frame_info *this_frame)
 {
-  struct frame_info *prev_frame;
-
   /* There is always a frame.  If this assertion fails, suspect that
      something should be calling get_selected_frame() or
      get_current_frame().  */
@@ -1814,7 +1812,6 @@ get_frame_base_address (struct frame_inf
 CORE_ADDR
 get_frame_locals_address (struct frame_info *fi)
 {
-  void **cache;
   if (get_frame_type (fi) != NORMAL_FRAME)
     return 0;
   /* If there isn't a frame address method, find it.  */
@@ -1830,7 +1827,6 @@ get_frame_locals_address (struct frame_i
 CORE_ADDR
 get_frame_args_address (struct frame_info *fi)
 {
-  void **cache;
   if (get_frame_type (fi) != NORMAL_FRAME)
     return 0;
   /* If there isn't a frame address method, find it.  */
diff -uprN src0/gdb/trad-frame.c src1/gdb/trad-frame.c
--- src0/gdb/trad-frame.c	2009-05-26 09:56:25.000000000 -0400
+++ src1/gdb/trad-frame.c	2009-08-06 10:30:56.000000000 -0400
@@ -135,7 +135,6 @@ trad_frame_get_prev_register (struct fra
 			      struct trad_frame_saved_reg this_saved_regs[],
 			      int regnum)
 {
-  struct gdbarch *gdbarch = get_frame_arch (this_frame);
   if (trad_frame_addr_p (this_saved_regs, regnum))
     /* The register was saved in memory.  */
     return frame_unwind_got_memory (this_frame, regnum,
diff -uprN src0/gdb/tramp-frame.c src1/gdb/tramp-frame.c
--- src0/gdb/tramp-frame.c	2009-07-06 09:28:21.000000000 -0400
+++ src1/gdb/tramp-frame.c	2009-08-06 10:31:12.000000000 -0400
@@ -44,7 +44,6 @@ static struct trad_frame_cache *
 tramp_frame_cache (struct frame_info *this_frame,
 		   void **this_cache)
 {
-  CORE_ADDR pc = get_frame_pc (this_frame);
   struct tramp_frame_cache *tramp_cache = (*this_cache);
   if (tramp_cache->trad_cache == NULL)
     {
diff -uprN src0/gdb/gdbarch.sh src1/gdb/gdbarch.sh
--- src0/gdb/gdbarch.sh	2009-07-06 09:28:18.000000000 -0400
+++ src1/gdb/gdbarch.sh	2009-08-06 09:18:12.000000000 -0400
@@ -1803,7 +1803,6 @@ gdbarch_printable_names (void)
 {
   /* Accumulate a list of names based on the registed list of
      architectures. */
-  enum bfd_architecture a;
   int nr_arches = 0;
   const char **arches = NULL;
   struct gdbarch_registration *rego;
@@ -2038,8 +2037,6 @@ extern void _initialize_gdbarch (void);
 void
 _initialize_gdbarch (void)
 {
-  struct cmd_list_element *c;
-
   add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\\
 Set architecture debugging."), _("\\
 Show architecture debugging."), _("\\
diff -uprN src0/gdb/gdbarch.c src1/gdb/gdbarch.c
--- src0/gdb/gdbarch.c	2009-07-06 09:28:18.000000000 -0400
+++ src1/gdb/gdbarch.c	2009-08-06 09:18:59.000000000 -0400
@@ -3564,7 +3564,6 @@ gdbarch_printable_names (void)
 {
   /* Accumulate a list of names based on the registed list of
      architectures. */
-  enum bfd_architecture a;
   int nr_arches = 0;
   const char **arches = NULL;
   struct gdbarch_registration *rego;
@@ -3799,8 +3798,6 @@ extern void _initialize_gdbarch (void);
 void
 _initialize_gdbarch (void)
 {
-  struct cmd_list_element *c;
-
   add_setshow_zinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\
 Set architecture debugging."), _("\
 Show architecture debugging."), _("\

diff -uprN src0/gdb/gdbtypes.c src1/gdb/gdbtypes.c
--- src0/gdb/gdbtypes.c	2009-07-06 09:28:18.000000000 -0400
+++ src1/gdb/gdbtypes.c	2009-08-06 09:19:53.000000000 -0400
@@ -539,7 +539,6 @@ make_qualified_type (struct type *type, 
 struct type *
 make_type_with_address_space (struct type *type, int space_flag)
 {
-  struct type *ntype;
   int new_flags = ((TYPE_INSTANCE_FLAGS (type)
 		    & ~(TYPE_INSTANCE_FLAG_CODE_SPACE
 			| TYPE_INSTANCE_FLAG_DATA_SPACE
@@ -566,9 +565,6 @@ make_cv_type (int cnst, int voltl, 
 	      struct type **typeptr)
 {
   struct type *ntype;	/* New type */
-  struct type *tmp_type = type;	/* tmp type */
-  struct objfile *objfile;
-
   int new_flags = (TYPE_INSTANCE_FLAGS (type)
 		   & ~(TYPE_INSTANCE_FLAG_CONST | TYPE_INSTANCE_FLAG_VOLATILE));
 
diff -uprN src0/gdb/gnu-v2-abi.c src1/gdb/gnu-v2-abi.c
--- src0/gdb/gnu-v2-abi.c	2009-07-06 09:28:18.000000000 -0400
+++ src1/gdb/gnu-v2-abi.c	2009-08-06 10:29:58.000000000 -0400
@@ -186,13 +186,8 @@ gnuv2_value_rtti_type (struct value *v, 
 {
   struct type *known_type;
   struct type *rtti_type;
-  CORE_ADDR coreptr;
-  struct value *vp;
-  long top_offset = 0;
-  char rtti_type_name[256];
   CORE_ADDR vtbl;
   struct minimal_symbol *minsym;
-  struct symbol *sym;
   char *demangled_name, *p;
   struct type *btype;
   struct type *known_type_vptr_basetype;
diff -uprN src0/gdb/i387-tdep.c src1/gdb/i387-tdep.c
--- src0/gdb/i387-tdep.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/i387-tdep.c	2009-08-05 16:08:10.000000000 -0400
@@ -203,7 +203,6 @@ i387_print_float_info (struct gdbarch *g
 		       struct frame_info *frame, const char *args)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (frame));
-  gdb_byte buf[4];
   ULONGEST fctrl;
   ULONGEST fstat;
   ULONGEST ftag;
diff -uprN src0/gdb/infcall.c src1/gdb/infcall.c
--- src0/gdb/infcall.c	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/infcall.c	2009-08-06 09:10:00.000000000 -0400
@@ -440,10 +440,8 @@ call_function_by_hand (struct value *fun
   struct frame_info *frame;
   struct gdbarch *gdbarch;
   struct breakpoint *terminate_bp = NULL;
-  struct minimal_symbol *tm;
   ptid_t call_thread_ptid;
   struct gdb_exception e;
-  const char *name;
   char name_buf[RAW_FUNCTION_ADDRESS_SIZE];
 
   if (TYPE_CODE (ftype) == TYPE_CODE_PTR)
diff -uprN src0/gdb/infcmd.c src1/gdb/infcmd.c
--- src0/gdb/infcmd.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/infcmd.c	2009-08-06 09:10:43.000000000 -0400
@@ -812,7 +812,6 @@ static void
 step_1 (int skip_subroutines, int single_inst, char *count_string)
 {
   int count = 1;
-  struct frame_info *frame;
   struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
   int async_exec = 0;
   int thread = -1;
@@ -1953,8 +1952,6 @@ registers_info (char *addr_exp, int fpre
 {
   struct frame_info *frame;
   struct gdbarch *gdbarch;
-  int regnum, numregs;
-  char *end;
 
   if (!target_has_registers)
     error (_("The program has no registers now."));
@@ -2315,8 +2312,6 @@ attach_command_continuation_free_args (v
 void
 attach_command (char *args, int from_tty)
 {
-  char *exec_file;
-  char *full_exec_path = NULL;
   int async_exec = 0;
   struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
 
diff -uprN src0/gdb/inferior.c src1/gdb/inferior.c
--- src0/gdb/inferior.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/inferior.c	2009-08-06 10:31:46.000000000 -0400
@@ -308,8 +308,6 @@ print_inferior (struct ui_out *uiout, in
   /* Compute number of inferiors we will print.  */
   for (inf = inferior_list; inf; inf = inf->next)
     {
-      struct cleanup *chain2;
-
       if (requested_inferior != -1 && inf->num != requested_inferior)
 	continue;
 
diff -uprN src0/gdb/inflow.c src1/gdb/inflow.c
--- src0/gdb/inflow.c	2009-05-26 09:56:22.000000000 -0400
+++ src1/gdb/inflow.c	2009-08-06 10:32:35.000000000 -0400
@@ -43,10 +43,6 @@
 #define O_NOCTTY 0
 #endif
 
-#if defined (SIGIO) && defined (FASYNC) && defined (FD_SET) && defined (F_SETOWN)
-static void handle_sigio (int);
-#endif
-
 extern void _initialize_inflow (void);
 
 static void pass_signal (int);
diff -uprN src0/gdb/infrun.c src1/gdb/infrun.c
--- src0/gdb/infrun.c	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/infrun.c	2009-08-06 09:12:08.000000000 -0400
@@ -67,8 +67,6 @@ static int hook_stop_stub (void *);
 
 static int restore_selected_frame (void *);
 
-static void build_infrun (void);
-
 static int follow_fork (void);
 
 static void set_schedlock_func (char *args, int from_tty,
@@ -465,7 +463,6 @@ follow_inferior_reset_breakpoints (void)
 static void
 follow_exec (ptid_t pid, char *execd_pathname)
 {
-  struct target_ops *tgt;
   struct thread_info *th = inferior_thread ();
 
   /* This is an exec event that we actually wish to pay attention to.
@@ -1765,8 +1762,6 @@ struct execution_control_state
   int wait_some_more;
 };
 
-static void init_execution_control_state (struct execution_control_state *ecs);
-
 static void handle_inferior_event (struct execution_control_state *ecs);
 
 static void handle_step_into_function (struct gdbarch *gdbarch,
@@ -2166,15 +2161,6 @@ set_step_info (struct frame_info *frame,
   tp->current_line = sal.line;
 }
 
-/* Prepare an execution control state for looping through a
-   wait_for_inferior-type loop.  */
-
-static void
-init_execution_control_state (struct execution_control_state *ecs)
-{
-  ecs->random_signal = 0;
-}
-
 /* Clear context switchable stepping state.  */
 
 void
@@ -4280,7 +4266,7 @@ handle_step_into_function_backward (stru
 				    struct execution_control_state *ecs)
 {
   struct symtab *s;
-  struct symtab_and_line stop_func_sal, sr_sal;
+  struct symtab_and_line stop_func_sal;
 
   s = find_pc_symtab (stop_pc);
   if (s && s->language != language_asm)
@@ -5781,7 +5767,6 @@ _initialize_infrun (void)
 {
   int i;
   int numsigs;
-  struct cmd_list_element *c;
 
   add_info ("signals", signals_info, _("\
 What debugger does when program gets various signals.\n\
diff -uprN src0/gdb/c-lang.c src1/gdb/c-lang.c
--- src0/gdb/c-lang.c	2009-07-09 17:20:15.000000000 -0400
+++ src1/gdb/c-lang.c	2009-08-06 10:16:12.000000000 -0400
@@ -76,7 +76,6 @@ static enum c_string_type
 classify_type (struct type *elttype, enum bfd_endian byte_order,
 	       const char **encoding)
 {
-  struct type *saved_type;
   enum c_string_type result;
 
   /* We loop because ELTTYPE may be a typedef, and we want to
@@ -325,7 +324,7 @@ c_emit_char (int c, struct type *type, s
   make_cleanup_obstack_free (&output);
 
   convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
-			     obstack_base (&wchar_buf),
+			     (gdb_byte *)obstack_base (&wchar_buf),
 			     obstack_object_size (&wchar_buf),
 			     1, &output, translit_char);
   obstack_1grow (&output, '\0');
@@ -354,6 +353,11 @@ c_printchar (int c, struct type *type, s
     case C_CHAR_32:
       fputc_filtered ('U', stream);
       break;
+    case C_STRING:
+    case C_WIDE_STRING:
+    case C_STRING_16:
+    case C_STRING_32:
+      break;
     }
 
   fputc_filtered ('\'', stream);
@@ -409,6 +413,11 @@ c_printstr (struct ui_file *stream, stru
     case C_STRING_32:
       fputs_filtered ("U", stream);
       break;
+    case C_CHAR:
+    case C_WIDE_CHAR:
+    case C_CHAR_16:
+    case C_CHAR_32:
+      break;
     }
 
   if (length == 0)
@@ -573,6 +582,10 @@ c_printstr (struct ui_file *stream, stru
 	  obstack_grow_wstr (&wchar_buf, LCST (">"));
 	  finished = 1;
 	  break;
+
+	case wchar_iterate_ok:
+	case wchar_iterate_eof:
+	  break;
 	}
     }
 
@@ -593,7 +606,7 @@ c_printstr (struct ui_file *stream, stru
   make_cleanup_obstack_free (&output);
 
   convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
-			     obstack_base (&wchar_buf),
+			     (gdb_byte *)obstack_base (&wchar_buf),
 			     obstack_object_size (&wchar_buf),
 			     1, &output, translit_char);
   obstack_1grow (&output, '\0');
@@ -911,7 +924,8 @@ parse_one_string (struct obstack *output
       /* If we saw a run of characters, convert them all.  */
       if (p > data)
 	convert_between_encodings (host_charset (), dest_charset,
-				   data, p - data, 1, output, translit_none);
+				   (gdb_byte *)data, p - data, 1, output,
+				   translit_none);
       /* If we saw an escape, convert it.  */
       if (p < limit)
 	p = convert_escape (type, dest_charset, p, limit, output);
@@ -1014,7 +1028,7 @@ evaluate_subexp_c (struct type *expect_t
 
 	    if (obstack_object_size (&output) != TYPE_LENGTH (type))
 	      error (_("Could not convert character constant to target character set"));
-	    value = unpack_long (type, obstack_base (&output));
+	    value = unpack_long (type, (gdb_byte *)obstack_base (&output));
 	    result = value_from_longest (type, value);
 	  }
 	else
diff -uprN src0/gdb/f-lang.c src1/gdb/f-lang.c
--- src0/gdb/f-lang.c	2009-07-06 09:28:18.000000000 -0400
+++ src1/gdb/f-lang.c	2009-08-06 10:16:26.000000000 -0400
@@ -150,7 +150,6 @@ f_printstr (struct ui_file *stream, stru
   unsigned int things_printed = 0;
   int in_quotes = 0;
   int need_comma = 0;
-  int width = TYPE_LENGTH (type);
 
   if (length == 0)
     {
diff -uprN src0/gdb/jv-lang.c src1/gdb/jv-lang.c
--- src0/gdb/jv-lang.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/jv-lang.c	2009-08-06 10:21:48.000000000 -0400
@@ -246,8 +246,6 @@ type_from_class (struct gdbarch *gdbarch
   struct value *utf8_name;
   char *nptr;
   CORE_ADDR addr;
-  struct block *bl;
-  struct dict_iterator iter;
   int is_array = 0;
 
   type = check_typedef (value_type (clas));
@@ -1012,7 +1010,6 @@ java_class_name_from_physname (const cha
 {
   char *ret = NULL;
   const char *end;
-  int depth = 0;
   char *demangled_name = java_demangle (physname, DMGL_PARAMS | DMGL_ANSI);
 
   if (demangled_name == NULL)
diff -uprN src0/gdb/language.c src1/gdb/language.c
--- src0/gdb/language.c	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/language.c	2009-08-06 09:24:38.000000000 -0400
@@ -1340,8 +1340,6 @@ language_lookup_primitive_type_by_name (
 void
 _initialize_language (void)
 {
-  struct cmd_list_element *set, *show;
-
   language_gdbarch_data
     = gdbarch_data_register_post_init (language_gdbarch_post_init);
 
diff -uprN src0/gdb/m2-lang.c src1/gdb/m2-lang.c
--- src0/gdb/m2-lang.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/m2-lang.c	2009-08-06 10:22:04.000000000 -0400
@@ -111,7 +111,6 @@ m2_printstr (struct ui_file *stream, str
   unsigned int things_printed = 0;
   int in_quotes = 0;
   int need_comma = 0;
-  int width = TYPE_LENGTH (type);
 
   if (length == 0)
     {
diff -uprN src0/gdb/objc-lang.c src1/gdb/objc-lang.c
--- src0/gdb/objc-lang.c	2009-07-06 09:28:20.000000000 -0400
+++ src1/gdb/objc-lang.c	2009-08-06 10:16:40.000000000 -0400
@@ -350,7 +350,6 @@ objc_printstr (struct ui_file *stream, s
   unsigned int things_printed = 0;
   int in_quotes = 0;
   int need_comma = 0;
-  int width = TYPE_LENGTH (type);
 
   /* If the string was not truncated due to `set print elements', and
      the last byte of it is a null, we don't print that, in
diff -uprN src0/gdb/scm-lang.c src1/gdb/scm-lang.c
--- src0/gdb/scm-lang.c	2009-07-06 09:28:20.000000000 -0400
+++ src1/gdb/scm-lang.c	2009-08-06 10:22:55.000000000 -0400
@@ -35,8 +35,6 @@
 #include "objfiles.h"
 
 extern void _initialize_scheme_language (void);
-static struct value *evaluate_subexp_scm (struct type *, struct expression *,
-				      int *, enum noside);
 static struct value *scm_lookup_name (struct gdbarch *, char *);
 static int in_eval_c (void);
 
diff -uprN src0/gdb/linespec.c src1/gdb/linespec.c
--- src0/gdb/linespec.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/linespec.c	2009-08-06 09:09:27.000000000 -0400
@@ -1199,14 +1199,12 @@ static struct symtabs_and_lines
 decode_compound (char **argptr, int funfirstline, char ***canonical,
 		 char *saved_arg, char *p, int *not_found_ptr)
 {
-  struct symtabs_and_lines values;
   char *p2;
   char *saved_arg2 = *argptr;
   char *temp_end;
   struct symbol *sym;
   char *copy;
   struct symbol *sym_class;
-  struct symbol **sym_arr;
   struct type *t;
 
   /* First check for "global" namespace specification, of the form
diff -uprN src0/gdb/m2-typeprint.c src1/gdb/m2-typeprint.c
--- src0/gdb/m2-typeprint.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/m2-typeprint.c	2009-08-06 10:24:18.000000000 -0400
@@ -71,7 +71,6 @@ m2_print_type (struct type *type, char *
 	       int show, int level)
 {
   enum type_code code;
-  int demangled_args;
 
   CHECK_TYPEDEF (type);
 
@@ -427,8 +426,6 @@ m2_is_long_set_of_type (struct type *typ
 static int
 m2_long_set (struct type *type, struct ui_file *stream, int show, int level)
 {
-  struct type *index_type;
-  struct type *range_type;
   struct type *of_type;
   int i;
   int len = TYPE_NFIELDS (type);
diff -uprN src0/gdb/m2-valprint.c src1/gdb/m2-valprint.c
--- src0/gdb/m2-valprint.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/m2-valprint.c	2009-08-06 10:25:56.000000000 -0400
@@ -322,8 +322,6 @@ m2_val_print (struct type *type, const g
   unsigned len;
   struct type *elttype;
   unsigned eltlen;
-  int length_pos, length_size, string_pos;
-  int char_size;
   LONGEST val;
   CORE_ADDR addr;
 
diff -uprN src0/gdb/macrocmd.c src1/gdb/macrocmd.c
--- src0/gdb/macrocmd.c	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/macrocmd.c	2009-08-06 09:15:41.000000000 -0400
@@ -387,8 +387,6 @@ extern initialize_file_ftype _initialize
 void
 _initialize_macrocmd (void)
 {
-  struct cmd_list_element *c;
-
   /* We introduce a new command prefix, `macro', under which we'll put
      the various commands for working with preprocessor macros.  */
   add_prefix_cmd ("macro", class_info, macro_command,
diff -uprN src0/gdb/macroexp.c src1/gdb/macroexp.c
--- src0/gdb/macroexp.c	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/macroexp.c	2009-08-06 09:16:06.000000000 -0400
@@ -805,8 +805,6 @@ gather_arguments (const char *name, stru
       depth = 0;
       for (;;)
         {
-          char *start = src->text;
-
           if (! get_token (&tok, src))
             error (_("Malformed argument list for macro `%s'."), name);
       
@@ -1004,7 +1002,7 @@ substitute_args (struct macro_buffer *de
 	       && lookahead.text[0] == '#'
 	       && lookahead.text[1] == '#')
 	{
-	  int arg, finished = 0;
+	  int finished = 0;
 	  int prev_was_comma = 0;
 
 	  /* Note that GCC warns if the result of splicing is not a
diff -uprN src0/gdb/maint.c src1/gdb/maint.c
--- src0/gdb/maint.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/maint.c	2009-08-06 09:36:51.000000000 -0400
@@ -736,8 +736,6 @@ maintenance_set_profile_cmd (char *args,
 void
 _initialize_maint_cmds (void)
 {
-  struct cmd_list_element *tmpcmd;
-
   add_prefix_cmd ("maintenance", class_maintenance, maintenance_command, _("\
 Commands for use by GDB maintainers.\n\
 Includes commands to dump specific internal GDB structures in\n\
diff -uprN src0/gdb/mdebugread.c src1/gdb/mdebugread.c
--- src0/gdb/mdebugread.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/mdebugread.c	2009-08-06 10:26:49.000000000 -0400
@@ -4127,7 +4127,6 @@ psymtab_to_symtab_1 (struct partial_symt
     {
       /* This symbol table contains ordinary ecoff entries.  */
 
-      int f_max;
       int maxlines;
       EXTR *ext_ptr;
 
diff -uprN src0/gdb/mem-break.c src1/gdb/mem-break.c
--- src0/gdb/mem-break.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/mem-break.c	2009-08-06 09:21:34.000000000 -0400
@@ -46,7 +46,6 @@ default_memory_insert_breakpoint (struct
 {
   int val;
   const unsigned char *bp;
-  int bplen;
 
   /* Determine appropriate breakpoint contents and size for this address.  */
   bp = gdbarch_breakpoint_from_pc
diff -uprN src0/gdb/memattr.c src1/gdb/memattr.c
--- src0/gdb/memattr.c	2009-06-18 10:14:26.000000000 -0400
+++ src1/gdb/memattr.c	2009-08-06 09:21:21.000000000 -0400
@@ -292,9 +292,6 @@ lookup_mem_region (CORE_ADDR addr)
 void
 invalidate_target_mem_regions (void)
 {
-  struct mem_region *m;
-  int ix;
-
   if (!target_mem_regions_valid)
     return;
 
@@ -497,6 +494,8 @@ mem_info_command (char *args, int from_t
 	case MEM_FLASH:
 	  printf_filtered ("flash blocksize 0x%x ", attrib->blocksize);
 	  break;
+	case MEM_NONE:
+	  break;
 	}
 
       switch (attrib->width)
@@ -655,7 +654,7 @@ mem_disable_command (char *args, int fro
 static void
 mem_delete (int num)
 {
-  struct mem_region *m1, *m;
+  struct mem_region *m;
   int ix;
 
   if (!mem_region_list)

diff -uprN src0/gdb/mi/mi-cmd-break.c src1/gdb/mi/mi-cmd-break.c
--- src0/gdb/mi/mi-cmd-break.c	2009-08-04 13:44:22.000000000 -0400
+++ src1/gdb/mi/mi-cmd-break.c	2009-08-05 16:29:14.000000000 -0400
@@ -75,7 +75,6 @@ mi_cmd_break_insert (char *command, char
   int enabled = 1;
 
   struct gdb_exception e;
-  struct gdb_events *old_hooks;
   enum opt
     {
       HARDWARE_OPT, TEMP_OPT /*, REGEXP_OPT */ , CONDITION_OPT,
diff -uprN src0/gdb/mi/mi-cmd-file.c src1/gdb/mi/mi-cmd-file.c
--- src0/gdb/mi/mi-cmd-file.c	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/mi/mi-cmd-file.c	2009-08-05 16:30:04.000000000 -0400
@@ -33,9 +33,7 @@ void
 mi_cmd_file_list_exec_source_file (char *command, char **argv, int argc)
 {
   struct symtab_and_line st;
-  int optind = 0;
-  char *optarg;
-  
+
   if (!mi_valid_noargs ("mi_cmd_file_list_exec_source_file", argc, argv))
     error (_("mi_cmd_file_list_exec_source_file: Usage: No args"));
 
diff -uprN src0/gdb/mi/mi-cmd-stack.c src1/gdb/mi/mi-cmd-stack.c
--- src0/gdb/mi/mi-cmd-stack.c	2009-07-06 09:28:25.000000000 -0400
+++ src1/gdb/mi/mi-cmd-stack.c	2009-08-05 16:29:42.000000000 -0400
@@ -141,7 +141,6 @@ void
 mi_cmd_stack_list_locals (char *command, char **argv, int argc)
 {
   struct frame_info *frame;
-  enum print_values print_values;
 
   if (argc != 1)
     error (_("mi_cmd_stack_list_locals: Usage: PRINT_VALUES"));
@@ -221,7 +220,6 @@ list_args_or_locals (int locals, int val
   struct block *block;
   struct symbol *sym;
   struct dict_iterator iter;
-  int nsyms;
   struct cleanup *cleanup_list;
   static struct ui_stream *stb = NULL;
   struct type *type;
diff -uprN src0/gdb/mi/mi-cmd-target.c src1/gdb/mi/mi-cmd-target.c
--- src0/gdb/mi/mi-cmd-target.c	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/mi/mi-cmd-target.c	2009-08-05 16:30:32.000000000 -0400
@@ -76,7 +76,7 @@ mi_cmd_target_file_delete (char *command
 {
   int optind = 0;
   char *optarg;
-  const char *remote_file, *local_file;
+  const char *remote_file;
   static struct mi_opt opts[] =
   {
     { 0, 0, 0 }
diff -uprN src0/gdb/mi/mi-cmd-var.c src1/gdb/mi/mi-cmd-var.c
--- src0/gdb/mi/mi-cmd-var.c	2009-07-31 14:43:28.000000000 -0400
+++ src1/gdb/mi/mi-cmd-var.c	2009-08-05 16:28:59.000000000 -0400
@@ -50,7 +50,6 @@ static void 
 print_varobj (struct varobj *var, enum print_values print_values,
 	      int print_expression)
 {
-  struct type *gdb_type;
   char *type;
   int thread_id;
 
@@ -370,7 +369,6 @@ mi_cmd_var_list_children (char *command,
   VEC(varobj_p) *children;
   struct varobj *child;
   struct cleanup *cleanup_children;
-  int numchild;
   enum print_values print_values;
   int ix;
   char *display_hint;
@@ -659,7 +657,6 @@ static void
 varobj_update_one (struct varobj *var, enum print_values print_values,
 		   int explicit)
 {
-  struct varobj **cc;
   struct cleanup *cleanup = NULL;
   VEC (varobj_update_result) *changes;
   varobj_update_result *r;
diff -uprN src0/gdb/mi/mi-interp.c src1/gdb/mi/mi-interp.c
--- src0/gdb/mi/mi-interp.c	2009-06-10 13:49:47.000000000 -0400
+++ src1/gdb/mi/mi-interp.c	2009-08-05 16:31:08.000000000 -0400
@@ -158,7 +158,6 @@ mi_interpreter_suspend (void *data)
 static struct gdb_exception
 mi_interpreter_exec (void *data, const char *command)
 {
-  static struct gdb_exception ok;
   char *tmp = alloca (strlen (command) + 1);
   strcpy (tmp, command);
   mi_execute_command_wrapper (tmp);
@@ -177,7 +176,6 @@ mi_cmd_interpreter_exec (char *command, 
 {
   struct interp *interp_to_use;
   int i;
-  struct interp_procs *procs;
   char *mi_error_message = NULL;
   struct cleanup *old_chain;
 
@@ -335,7 +333,6 @@ mi_on_normal_stop (struct bpstats *bs, i
      using cli interpreter, be sure to use MI uiout for output,
      not the current one.  */
   struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());
-  struct mi_interp *mi = top_level_interpreter_data ();
 
   if (print_frame)
     {
diff -uprN src0/gdb/mi/mi-main.c src1/gdb/mi/mi-main.c
--- src0/gdb/mi/mi-main.c	2009-07-06 09:28:25.000000000 -0400
+++ src1/gdb/mi/mi-main.c	2009-08-05 16:31:55.000000000 -0400
@@ -1264,7 +1264,6 @@ void
 mi_execute_command (char *cmd, int from_tty)
 {
   struct mi_parse *command;
-  struct ui_out *saved_uiout = uiout;
 
   /* This is to handle EOF (^D). We just quit gdb.  */
   /* FIXME: we should call some API function here.  */
@@ -1351,7 +1350,6 @@ static void
 mi_cmd_execute (struct mi_parse *parse)
 {
   struct cleanup *cleanup;
-  int i;
 
   free_all_values ();
   cleanup = make_cleanup (null_cleanup, NULL);
@@ -1554,7 +1552,6 @@ mi_load_progress (const char *section_na
 static void 
 timestamp (struct mi_timestamp *tv)
   {
-    long usec;
     gettimeofday (&tv->wallclock, NULL);
 #ifdef HAVE_GETRUSAGE
     getrusage (RUSAGE_SELF, &rusage);
diff -uprN src0/gdb/mi/mi-out.c src1/gdb/mi/mi-out.c
--- src0/gdb/mi/mi-out.c	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/mi/mi-out.c	2009-08-05 16:28:29.000000000 -0400
@@ -106,7 +106,6 @@ mi_table_begin (struct ui_out *uiout,
 		int nr_rows,
 		const char *tblid)
 {
-  mi_out_data *data = ui_out_data (uiout);
   mi_open (uiout, tblid, ui_out_type_tuple);
   mi_field_int (uiout, -1/*fldno*/, -1/*width*/, -1/*alin*/,
 		"nr_rows", nr_rows);
diff -uprN src0/gdb/mips-tdep.c src1/gdb/mips-tdep.c
--- src0/gdb/mips-tdep.c	2009-07-06 09:28:20.000000000 -0400
+++ src1/gdb/mips-tdep.c	2009-08-06 10:38:09.000000000 -0400
@@ -599,7 +599,7 @@ static int mips16_to_32_reg[8] = { 16, 1
    time across a 2400 baud serial line.  Allows the user to limit this
    search.  */
 
-static unsigned int heuristic_fence_post = 0;
+static int heuristic_fence_post = 0;
 
 /* Number of bytes of storage in the actual machine representation for
    register N.  NOTE: This defines the pseudo register type so need to
@@ -714,7 +714,6 @@ static struct type *
 mips_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
 {
   const int num_regs = gdbarch_num_regs (gdbarch);
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   int rawnum = regnum % num_regs;
   struct type *rawtype;
 
@@ -834,7 +833,7 @@ mips_pc_is_mips16 (CORE_ADDR memaddr)
 static CORE_ADDR
 mips_read_pc (struct regcache *regcache)
 {
-  ULONGEST pc;
+  LONGEST pc;
   int regnum = mips_regnum (get_regcache_arch (regcache))->pc;
   regcache_cooked_read_signed (regcache, regnum, &pc);
   return pc;
@@ -2702,7 +2701,6 @@ mips_eabi_push_dummy_call (struct gdbarc
   int argnum;
   int len = 0;
   int stack_offset = 0;
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR func_addr = find_function_addr (function, NULL);
   int regsize = mips_abi_regsize (gdbarch);
@@ -3093,7 +3091,6 @@ mips_n32n64_push_dummy_call (struct gdba
   int argnum;
   int len = 0;
   int stack_offset = 0;
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR func_addr = find_function_addr (function, NULL);
 
@@ -3535,7 +3532,6 @@ mips_o32_push_dummy_call (struct gdbarch
   int argnum;
   int len = 0;
   int stack_offset = 0;
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR func_addr = find_function_addr (function, NULL);
 
@@ -3999,7 +3995,6 @@ mips_o64_push_dummy_call (struct gdbarch
   int argnum;
   int len = 0;
   int stack_offset = 0;
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR func_addr = find_function_addr (function, NULL);
 
@@ -4226,8 +4221,6 @@ mips_o64_return_value (struct gdbarch *g
 		       struct type *type, struct regcache *regcache,
 		       gdb_byte *readbuf, const gdb_byte *writebuf)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
   if (TYPE_CODE (type) == TYPE_CODE_STRUCT
       || TYPE_CODE (type) == TYPE_CODE_UNION
       || TYPE_CODE (type) == TYPE_CODE_ARRAY)
@@ -6214,7 +6207,6 @@ void
 _initialize_mips_tdep (void)
 {
   static struct cmd_list_element *mipsfpulist = NULL;
-  struct cmd_list_element *c;
 
   mips_abi_string = mips_abi_strings[MIPS_ABI_UNKNOWN];
   if (MIPS_ABI_LAST + 1
diff -uprN src0/gdb/monitor.c src1/gdb/monitor.c
--- src0/gdb/monitor.c	2009-07-06 09:28:20.000000000 -0400
+++ src1/gdb/monitor.c	2009-08-06 11:23:29.000000000 -0400
@@ -1607,7 +1607,7 @@ monitor_write_memory_longlongs (CORE_ADD
 {
   static char hexstage[20];	/* At least 16 digits required, plus null */
   char *endstring;
-  long long *llptr;
+  unsigned long long *llptr;
   long long value;
   int written = 0;
   llptr = (unsigned long long *) myaddr;
@@ -1985,13 +1985,13 @@ monitor_xfer_memory (CORE_ADDR memaddr, 
   if (write)
     {
       if (current_monitor->flags & MO_HAS_BLOCKWRITES)
-	res = monitor_write_memory_block(memaddr, myaddr, len);
+	res = monitor_write_memory_block(memaddr, (char *)myaddr, len);
       else
-	res = monitor_write_memory(memaddr, myaddr, len);
+	res = monitor_write_memory(memaddr, (char *)myaddr, len);
     }
   else
     {
-      res = monitor_read_memory(memaddr, myaddr, len);
+      res = monitor_read_memory(memaddr, (char *)myaddr, len);
     }
 
   return res;
diff -uprN src0/gdb/i386-nto-tdep.c src1/gdb/i386-nto-tdep.c
--- src0/gdb/i386-nto-tdep.c	2009-07-06 09:28:19.000000000 -0400
+++ src1/gdb/i386-nto-tdep.c	2009-08-06 13:21:14.000000000 -0400
@@ -134,7 +134,6 @@ i386nto_register_area (struct gdbarch *g
 		       int regno, int regset, unsigned *off)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  int len;
 
   *off = 0;
   if (regset == NTO_REG_GENERAL)
@@ -295,7 +294,7 @@ i386nto_sigcontext_addr (struct frame_in
 {
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-  char buf[4];
+  gdb_byte buf[4];
   CORE_ADDR ptrctx;
 
   /* We store __ucontext_t addr in EDI register.  */
diff -uprN src0/gdb/objfiles.h src1/gdb/objfiles.h
--- src0/gdb/objfiles.h	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/objfiles.h	2009-08-05 10:47:43.000000000 -0400
@@ -414,12 +414,6 @@ struct objfile
 
 #define OBJF_USERLOADED	(1 << 3)	/* User loaded */
 
-/* The bfd of this objfile is used outside of the objfile (e.g. by solib).
-   Do not try to free it.  */
-
-#define OBJF_KEEPBFD	(1 << 4)	/* Do not delete bfd */
-
-
 /* The object file that the main symbol table was loaded from (e.g. the
    argument to the "symbol-file" or "file" command).  */
 
@@ -510,6 +504,8 @@ extern void set_objfile_data (struct obj
 			      const struct objfile_data *data, void *value);
 extern void *objfile_data (struct objfile *objfile,
 			   const struct objfile_data *data);
+
+extern void gdb_bfd_unref (struct bfd *abfd);
 
 
 /* Traverse all object files.  ALL_OBJFILES_SAFE works even if you delete
diff -uprN src0/gdb/observer.sh src1/gdb/observer.sh
--- src0/gdb/observer.sh	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/observer.sh	2009-08-06 09:36:21.000000000 -0400
@@ -137,6 +137,8 @@ observer_${event}_notification_stub (con
   observer_${event}_ftype *notify = (observer_${event}_ftype *) data;
   const struct ${event}_args *args = args_data;
   notify (`echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args->\1/g'`);
+  args = NULL; /* To avoid compiler warning for nitifications with no
+		  arguments.  */
 }
 
 struct observer *
diff -uprN src0/gdb/osabi.c src1/gdb/osabi.c
--- src0/gdb/osabi.c	2009-07-31 14:43:25.000000000 -0400
+++ src1/gdb/osabi.c	2009-08-06 09:20:09.000000000 -0400
@@ -631,8 +631,6 @@ extern initialize_file_ftype _initialize
 void
 _initialize_gdb_osabi (void)
 {
-  struct cmd_list_element *c;
-
   if (strcmp (gdb_osabi_names[GDB_OSABI_INVALID], "<invalid>") != 0)
     internal_error
       (__FILE__, __LINE__,
diff -uprN src0/gdb/parse.c src1/gdb/parse.c
--- src0/gdb/parse.c	2009-07-06 09:28:20.000000000 -0400
+++ src1/gdb/parse.c	2009-08-06 09:24:24.000000000 -0400
@@ -764,7 +764,7 @@ prefixify_expression (struct expression 
 int
 length_of_subexp (struct expression *expr, int endpos)
 {
-  int oplen, args, i;
+  int oplen, args;
 
   operator_length (expr, endpos, &oplen, &args);
 
@@ -965,7 +965,6 @@ prefixify_subexp (struct expression *ine
   int args;
   int i;
   int *arglens;
-  enum exp_opcode opcode;
   int result = -1;
 
   operator_length (inexpr, inend, &oplen, &args);
diff -uprN src0/gdb/ppc-sysv-tdep.c src1/gdb/ppc-sysv-tdep.c
--- src0/gdb/ppc-sysv-tdep.c	2009-07-06 09:28:20.000000000 -0400
+++ src1/gdb/ppc-sysv-tdep.c	2009-08-06 11:03:17.000000000 -0400
@@ -856,7 +856,6 @@ convert_code_addr_to_desc_addr (CORE_ADD
   struct obj_section *dot_fn_section;
   struct minimal_symbol *dot_fn;
   struct minimal_symbol *fn;
-  CORE_ADDR toc;
   /* Find the minimal symbol that corresponds to CODE_ADDR (should
      have a name of the form ".FN").  */
   dot_fn = lookup_minimal_symbol_by_pc (code_addr);
diff -uprN src0/gdb/printcmd.c src1/gdb/printcmd.c
--- src0/gdb/printcmd.c	2009-07-06 09:28:20.000000000 -0400
+++ src1/gdb/printcmd.c	2009-08-06 09:05:13.000000000 -0400
@@ -891,7 +891,6 @@ print_command_1 (char *exp, int inspect,
 
   if (exp && *exp)
     {
-      struct type *type;
       expr = parse_expression (exp);
       old_chain = make_cleanup (free_current_contents, &expr);
       cleanup = 1;
@@ -1854,7 +1853,6 @@ static void
 clear_dangling_display_expressions (struct so_list *solib)
 {
   struct display *d;
-  struct objfile *objfile = NULL;
 
   for (d = display_chain; d; d = d->next)
     {
diff -uprN src0/gdb/p-typeprint.c src1/gdb/p-typeprint.c
--- src0/gdb/p-typeprint.c	2009-07-06 09:28:20.000000000 -0400
+++ src1/gdb/p-typeprint.c	2009-08-06 10:22:33.000000000 -0400
@@ -205,7 +205,6 @@ void
 pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
 				  int show, int passed_a_ptr)
 {
-  char *name;
   if (type == 0)
     return;
 
@@ -621,7 +620,7 @@ pascal_type_print_base (struct type *typ
 	      struct fn_field *f = TYPE_FN_FIELDLIST1 (type, i);
 	      int j, len2 = TYPE_FN_FIELDLIST_LENGTH (type, i);
 	      char *method_name = TYPE_FN_FIELDLIST_NAME (type, i);
-	      char *name = type_name_no_tag (type);
+
 	      /* this is GNU C++ specific
 	         how can we know constructor/destructor?
 	         It might work for GNU pascal */
diff -uprN src0/gdb/python/python-cmd.c src1/gdb/python/python-cmd.c
--- src0/gdb/python/python-cmd.c	2009-07-06 09:28:25.000000000 -0400
+++ src1/gdb/python/python-cmd.c	2009-08-05 16:33:51.000000000 -0400
@@ -148,7 +148,6 @@ cmdpy_function (struct cmd_list_element 
   if (! result)
     {
       PyObject *ptype, *pvalue, *ptraceback;
-      char *s, *str;
 
       PyErr_Fetch (&ptype, &pvalue, &ptraceback);
 
@@ -224,7 +223,6 @@ cmdpy_completer (struct cmd_list_element
       result = (char **) xmalloc ((len + 1) * sizeof (char *));
       for (i = out = 0; i < len; ++i)
 	{
-	  int l;
 	  PyObject *elt = PySequence_GetItem (resultobj, i);
 	  if (elt == NULL || ! gdbpy_is_string (elt))
 	    {
diff -uprN src0/gdb/python/python-function.c src1/gdb/python/python-function.c
--- src0/gdb/python/python-function.c	2009-07-06 09:28:25.000000000 -0400
+++ src1/gdb/python/python-function.c	2009-08-05 16:34:07.000000000 -0400
@@ -57,7 +57,6 @@ static struct value *
 fnpy_call (struct gdbarch *gdbarch, const struct language_defn *language,
 	   void *cookie, int argc, struct value **argv)
 {
-  int i;
   struct value *value = NULL;
   PyObject *result, *callable, *args;
   struct cleanup *cleanup;
diff -uprN src0/gdb/python/python-objfile.c src1/gdb/python/python-objfile.c
--- src0/gdb/python/python-objfile.c	2009-07-06 09:28:25.000000000 -0400
+++ src1/gdb/python/python-objfile.c	2009-08-05 16:34:25.000000000 -0400
@@ -144,8 +144,6 @@ objfile_to_objfile_object (struct objfil
       object = PyObject_New (objfile_object, &objfile_object_type);
       if (object)
 	{
-	  PyObject *dict;
-
 	  object->objfile = objfile;
 
 	  object->printers = PyList_New (0);
diff -uprN src0/gdb/python/python-prettyprint.c src1/gdb/python/python-prettyprint.c
--- src0/gdb/python/python-prettyprint.c	2009-07-09 17:20:17.000000000 -0400
+++ src1/gdb/python/python-prettyprint.c	2009-08-05 16:36:30.000000000 -0400
@@ -69,7 +69,6 @@ find_pretty_printer (PyObject *value)
   PyObject *pp_list = NULL;
   PyObject *function = NULL;
   struct objfile *obj;
-  volatile struct gdb_exception except;
 
   /* Look at the pretty-printer dictionary for each objfile.  */
   ALL_OBJFILES (obj)
@@ -194,12 +193,12 @@ print_string_repr (PyObject *printer, co
       PyObject *string = python_string_to_target_python_string (py_str);
       if (string)
 	{
-	  gdb_byte *output = PyString_AsString (string);
+	  char *output = PyString_AsString (string);
 	  int len = PyString_Size (string);
 	  
 	  if (hint && !strcmp (hint, "string"))
 	    LA_PRINT_STRING (stream, builtin_type (gdbarch)->builtin_char,
-			     output, len, 0, options);
+			     (gdb_byte *)output, len, 0, options);
 	  else
 	    fputs_filtered (output, stream);
 	  Py_DECREF (string);
@@ -535,7 +534,6 @@ PyObject *
 apply_varobj_pretty_printer (PyObject *printer_obj,
 			     struct value **replacement)
 {
-  int size = 0;
   PyObject *py_str = NULL;
 
   *replacement = NULL;
@@ -581,7 +579,7 @@ PyObject *
 gdbpy_default_visualizer (PyObject *self, PyObject *args)
 {
   PyObject *val_obj;
-  PyObject *cons, *printer = NULL;
+  PyObject *cons;
   struct value *value;
 
   if (! PyArg_ParseTuple (args, "O", &val_obj))
diff -uprN src0/gdb/python/python-type.c src1/gdb/python/python-type.c
--- src0/gdb/python/python-type.c	2009-07-06 09:28:25.000000000 -0400
+++ src1/gdb/python/python-type.c	2009-08-05 16:42:27.000000000 -0400
@@ -418,6 +418,8 @@ typy_lookup_type (struct demangle_compon
 	  return make_cv_type (1, 0, type, NULL);
 	case DEMANGLE_COMPONENT_VOLATILE:
 	  return make_cv_type (0, 1, type, NULL);
+	default:
+	  break;
 	}
     }
 
@@ -431,7 +433,7 @@ typy_lookup_type (struct demangle_compon
 static PyObject *
 typy_template_argument (PyObject *self, PyObject *args)
 {
-  int i, argno, n_pointers;
+  int i, argno;
   struct type *type = ((type_object *) self)->type;
   struct demangle_component *demangled;
   const char *err;
diff -uprN src0/gdb/python/python-utils.c src1/gdb/python/python-utils.c
--- src0/gdb/python/python-utils.c	2009-07-09 17:20:17.000000000 -0400
+++ src1/gdb/python/python-utils.c	2009-08-05 16:43:18.000000000 -0400
@@ -206,9 +206,9 @@ PyObject *
 target_string_to_unicode (const gdb_byte *str, int length)
 {
   if (length == -1)
-    length = strlen (str);
+    length = strlen ((const char *)str);
 
-  return PyUnicode_Decode (str, length, target_charset (), NULL);
+  return PyUnicode_Decode ((const char *)str, length, target_charset (), NULL);
 }
 
 /* Return true if OBJ is a Python string or unicode object, false
diff -uprN src0/gdb/python/python-value.c src1/gdb/python/python-value.c
--- src0/gdb/python/python-value.c	2009-07-09 17:20:17.000000000 -0400
+++ src1/gdb/python/python-value.c	2009-08-05 16:44:07.000000000 -0400
@@ -198,7 +198,7 @@ valpy_get_type (PyObject *self, void *cl
 static PyObject *
 valpy_string (PyObject *self, PyObject *args, PyObject *kw)
 {
-  int length = -1, ret = 0;
+  int length = -1;
   gdb_byte *buffer;
   struct value *value = ((value_object *) self)->value;
   volatile struct gdb_exception except;
@@ -220,7 +220,7 @@ valpy_string (PyObject *self, PyObject *
   GDB_PY_HANDLE_EXCEPTION (except);
 
   encoding = (user_encoding && *user_encoding) ? user_encoding : la_encoding;
-  unicode = PyUnicode_Decode (buffer, length, encoding, errors);
+  unicode = PyUnicode_Decode ((char *)buffer, length, encoding, errors);
   xfree (buffer);
 
   return unicode;
@@ -827,7 +827,6 @@ struct value *
 convert_value_from_python (PyObject *obj)
 {
   struct value *value = NULL; /* -Wall */
-  PyObject *target_str, *unicode_str;
   struct cleanup *old;
   volatile struct gdb_exception except;
   int cmp;
diff -uprN src0/gdb/python/python.c src1/gdb/python/python.c
--- src0/gdb/python/python.c	2009-07-06 09:28:25.000000000 -0400
+++ src1/gdb/python/python.c	2009-08-05 16:33:28.000000000 -0400
@@ -247,6 +247,9 @@ parameter_to_python (struct cmd_list_ele
 	  Py_RETURN_NONE;
 	return PyLong_FromUnsignedLong (val);
       }
+    case var_zuinteger:
+      /* FIXME: do what? */
+      break;
     }
 
   return PyErr_Format (PyExc_RuntimeError, "programmer error: unhandled type");
@@ -288,8 +291,7 @@ gdbpy_parameter (PyObject *self, PyObjec
 static PyObject *
 execute_gdb_command (PyObject *self, PyObject *args)
 {
-  struct cmd_list_element *alias, *prefix, *cmd;
-  char *arg, *newarg;
+  char *arg;
   PyObject *from_tty_obj = NULL;
   int from_tty;
   int cmp;
diff -uprN src0/gdb/record.c src1/gdb/record.c
--- src0/gdb/record.c	2009-07-31 14:43:26.000000000 -0400
+++ src1/gdb/record.c	2009-08-06 10:31:58.000000000 -0400
@@ -932,7 +932,6 @@ record_store_registers (struct target_op
       if (RECORD_IS_REPLAY)
 	{
 	  int n;
-	  struct cleanup *old_cleanups;
 
 	  /* Let user choose if he wants to write register or not.  */
 	  if (regno < 0)
diff -uprN src0/gdb/regcache.c src1/gdb/regcache.c
--- src0/gdb/regcache.c	2009-07-06 09:28:20.000000000 -0400
+++ src1/gdb/regcache.c	2009-08-06 08:58:37.000000000 -0400
@@ -218,7 +218,7 @@ regcache_xmalloc (struct gdbarch *gdbarc
   regcache->registers
     = XCALLOC (descr->sizeof_raw_registers, gdb_byte);
   regcache->register_valid_p
-    = XCALLOC (descr->sizeof_raw_register_valid_p, gdb_byte);
+    = (signed char *) XCALLOC (descr->sizeof_raw_register_valid_p, gdb_byte);
   regcache->readonly_p = 1;
   regcache->ptid = minus_one_ptid;
   return regcache;
@@ -338,8 +338,6 @@ do_cooked_read (void *src, int regnum, g
 void
 regcache_cpy (struct regcache *dst, struct regcache *src)
 {
-  int i;
-  gdb_byte *buf;
   gdb_assert (src != NULL && dst != NULL);
   gdb_assert (src->descr->gdbarch == dst->descr->gdbarch);
   gdb_assert (src != dst);
@@ -355,7 +353,6 @@ regcache_cpy (struct regcache *dst, stru
 void
 regcache_cpy_no_passthrough (struct regcache *dst, struct regcache *src)
 {
-  int i;
   gdb_assert (src != NULL && dst != NULL);
   gdb_assert (src->descr->gdbarch == dst->descr->gdbarch);
   /* NOTE: cagney/2002-05-17: Don't let the caller do a no-passthrough
diff -uprN src0/gdb/remote.c src1/gdb/remote.c
--- src0/gdb/remote.c	2009-08-04 13:44:21.000000000 -0400
+++ src1/gdb/remote.c	2009-08-05 16:25:12.000000000 -0400
@@ -1170,7 +1170,6 @@ remote_query_attached (int pid)
 static struct inferior *
 remote_add_inferior (int pid, int attached)
 {
-  struct remote_state *rs = get_remote_state ();
   struct inferior *inf;
 
   /* Check whether this process we're learning about is to be
@@ -1207,8 +1206,6 @@ remote_add_thread (ptid_t ptid, int runn
 static void
 remote_notice_new_inferior (ptid_t currthread, int running)
 {
-  struct remote_state *rs = get_remote_state ();
-
   /* If this is a new thread, add it to GDB's thread list.
      If we leave it up to WFI to do this, bad things will happen.  */
 
@@ -1426,7 +1423,6 @@ static int
 remote_thread_alive (struct target_ops *ops, ptid_t ptid)
 {
   struct remote_state *rs = get_remote_state ();
-  int tid = ptid_get_tid (ptid);
   char *p, *endp;
 
   if (ptid_equal (ptid, magic_null_ptid))
@@ -1602,7 +1598,6 @@ read_ptid (char *buf, char **obuf)
   char *p = buf;
   char *pp;
   ULONGEST pid = 0, tid = 0;
-  ptid_t ptid;
 
   if (*p == 'p')
     {
@@ -2198,9 +2193,6 @@ static ptid_t
 remote_current_thread (ptid_t oldpid)
 {
   struct remote_state *rs = get_remote_state ();
-  char *p = rs->buf;
-  int tid;
-  int pid;
 
   putpkt ("qC");
   getpkt (&rs->buf, &rs->buf_size, 0);
@@ -3954,7 +3946,6 @@ remote_stop_ns (ptid_t ptid)
   struct remote_state *rs = get_remote_state ();
   char *p = rs->buf;
   char *endp = rs->buf + get_remote_packet_size ();
-  struct stop_reply *reply, *next;
 
   if (remote_protocol_packets[PACKET_vCont].support == PACKET_SUPPORT_UNKNOWN)
     remote_vcont_probe (rs);
@@ -4310,8 +4301,6 @@ remote_parse_stop_reply (char *buf, stru
     {
     case 'T':		/* Status with PC, SP, FP, ...	*/
       {
-	gdb_byte regs[MAX_REGISTER_SIZE];
-
 	/* Expedited reply, containing Signal, {regno, reg} repeat.  */
 	/*  format is:  'Tssn...:r...;n...:r...;n...:r...;#cc', where
 	   ss = signal number
@@ -4540,7 +4529,6 @@ static void
 remote_get_pending_stop_replies (void)
 {
   struct remote_state *rs = get_remote_state ();
-  int ret;
 
   if (pending_stop_reply)
     {
@@ -4634,8 +4622,6 @@ static ptid_t
 remote_wait_ns (ptid_t ptid, struct target_waitstatus *status, int options)
 {
   struct remote_state *rs = get_remote_state ();
-  struct remote_arch_state *rsa = get_remote_arch_state ();
-  ptid_t event_ptid = null_ptid;
   struct stop_reply *stop_reply;
   int ret;
 
@@ -4694,11 +4680,8 @@ static ptid_t
 remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options)
 {
   struct remote_state *rs = get_remote_state ();
-  struct remote_arch_state *rsa = get_remote_arch_state ();
   ptid_t event_ptid = null_ptid;
-  ULONGEST addr;
-  int solibs_changed = 0;
-  char *buf, *p;
+  char *buf;
   struct stop_reply *stop_reply;
 
  again:
@@ -4919,9 +4902,7 @@ static int
 send_g_packet (void)
 {
   struct remote_state *rs = get_remote_state ();
-  int i, buf_len;
-  char *p;
-  char *regs;
+  int buf_len;
 
   sprintf (rs->buf, "g");
   remote_send (&rs->buf, &rs->buf_size);
@@ -5052,7 +5033,6 @@ static void
 remote_fetch_registers (struct target_ops *ops,
 			struct regcache *regcache, int regnum)
 {
-  struct remote_state *rs = get_remote_state ();
   struct remote_arch_state *rsa = get_remote_arch_state ();
   int i;
 
@@ -5129,7 +5109,6 @@ store_register_using_P (const struct reg
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   struct remote_state *rs = get_remote_state ();
-  struct remote_arch_state *rsa = get_remote_arch_state ();
   /* Try storing a single register.  */
   char *buf = rs->buf;
   gdb_byte regp[MAX_REGISTER_SIZE];
@@ -5208,7 +5187,6 @@ static void
 remote_store_registers (struct target_ops *ops,
 			struct regcache *regcache, int regnum)
 {
-  struct remote_state *rs = get_remote_state ();
   struct remote_arch_state *rsa = get_remote_arch_state ();
   int i;
 
@@ -5568,7 +5546,8 @@ remote_write_bytes_aux (const char *head
       /* Binary mode.  Send target system values byte by byte, in
 	 increasing byte addresses.  Only escape certain critical
 	 characters.  */
-      payload_length = remote_escape_output (myaddr, todo, p, &nr_bytes,
+      payload_length = remote_escape_output (myaddr, todo, (gdb_byte *)p,
+					     &nr_bytes,
 					     payload_size);
 
       /* If not all TODO bytes fit, then we'll need another packet.  Make
@@ -5582,7 +5561,7 @@ remote_write_bytes_aux (const char *head
 			  - memaddr);
 	  if (new_nr_bytes != nr_bytes)
 	    payload_length = remote_escape_output (myaddr, new_nr_bytes,
-						   p, &nr_bytes,
+						   (gdb_byte *)p, &nr_bytes,
 						   payload_size);
 	}
 
@@ -6699,7 +6678,6 @@ static int
 extended_remote_run (char *args)
 {
   struct remote_state *rs = get_remote_state ();
-  char *p;
   int len;
 
   /* If the user has disabled vRun support, or we have detected that
@@ -6871,7 +6849,6 @@ remote_remove_breakpoint (struct gdbarch
 {
   CORE_ADDR addr = bp_tgt->placed_address;
   struct remote_state *rs = get_remote_state ();
-  int bp_size;
 
   if (remote_protocol_packets[PACKET_Z0].support != PACKET_DISABLE)
     {
@@ -7237,7 +7214,6 @@ remote_write_qxfer (struct target_ops *o
 {
   int i, buf_len;
   ULONGEST n;
-  gdb_byte *wbuf;
   struct remote_state *rs = get_remote_state ();
   int max_size = get_memory_write_packet_size (); 
 
@@ -7253,7 +7229,7 @@ remote_write_qxfer (struct target_ops *o
 
   /* Escape as much data as fits into rs->buf.  */
   buf_len = remote_escape_output 
-    (writebuf, len, (rs->buf + i), &max_size, max_size);
+    (writebuf, len, (gdb_byte *)(rs->buf + i), &max_size, max_size);
 
   if (putpkt_binary (rs->buf, i + buf_len) < 0
       || getpkt_sane (&rs->buf, &rs->buf_size, 0) < 0
@@ -7282,7 +7258,6 @@ remote_read_qxfer (struct target_ops *op
   static ULONGEST finished_offset;
 
   struct remote_state *rs = get_remote_state ();
-  unsigned int total = 0;
   LONGEST i, n, packet_len;
 
   if (packet->support == PACKET_DISABLE)
@@ -7333,7 +7308,8 @@ remote_read_qxfer (struct target_ops *op
     error (_("Remote qXfer reply contained no data."));
 
   /* Got some data.  */
-  i = remote_unescape_input (rs->buf + 1, packet_len - 1, readbuf, n);
+  i = remote_unescape_input ((gdb_byte *)(rs->buf + 1), packet_len - 1,
+			     readbuf, n);
 
   /* 'l' is an EOF marker, possibly including a final block of data,
      or possibly empty.  If we have the final block of a non-empty
@@ -7572,7 +7548,7 @@ remote_search_memory (struct target_ops*
 
   /* Escape as much data as fits into rs->buf.  */
   escaped_pattern_len =
-    remote_escape_output (pattern, pattern_len, (rs->buf + i),
+    remote_escape_output (pattern, pattern_len, (gdb_byte *)(rs->buf + i),
 			  &used_pattern_len, max_size);
 
   /* Bail if the pattern is too large.  */
@@ -8275,7 +8251,7 @@ remote_hostio_pwrite (int fd, const gdb_
   remote_buffer_add_int (&p, &left, offset);
   remote_buffer_add_string (&p, &left, ",");
 
-  p += remote_escape_output (write_buf, len, p, &out_len,
+  p += remote_escape_output (write_buf, len, (gdb_byte*)p, &out_len,
 			     get_remote_packet_size () - (p - rs->buf));
 
   return remote_hostio_send_command (p - rs->buf, PACKET_vFile_pwrite,
@@ -8292,7 +8268,7 @@ remote_hostio_pread (int fd, gdb_byte *r
 {
   struct remote_state *rs = get_remote_state ();
   char *p = rs->buf;
-  char *attachment;
+  gdb_byte *attachment;
   int left = get_remote_packet_size ();
   int ret, attachment_len;
   int read_len;
@@ -8308,7 +8284,7 @@ remote_hostio_pread (int fd, gdb_byte *r
   remote_buffer_add_int (&p, &left, offset);
 
   ret = remote_hostio_send_command (p - rs->buf, PACKET_vFile_pread,
-				    remote_errno, &attachment,
+				    remote_errno, (char**)&attachment,
 				    &attachment_len);
 
   if (ret < 0)
@@ -8479,7 +8455,7 @@ remote_bfd_iovec_pread (struct bfd *abfd
   pos = 0;
   while (nbytes > pos)
     {
-      bytes = remote_hostio_pread (fd, (char *)buf + pos, nbytes - pos,
+      bytes = remote_hostio_pread (fd, (gdb_byte *)buf + pos, nbytes - pos,
 				   offset + pos, &remote_errno);
       if (bytes == 0)
         /* Success, but no bytes, means end-of-file.  */
@@ -8613,7 +8589,7 @@ void
 remote_file_get (const char *remote_file, const char *local_file, int from_tty)
 {
   struct cleanup *back_to, *close_cleanup;
-  int retcode, fd, remote_errno, bytes, io_size;
+  int fd, remote_errno, bytes, io_size;
   FILE *file;
   gdb_byte *buffer;
   ULONGEST offset;
diff -uprN src0/gdb/rs6000-tdep.c src1/gdb/rs6000-tdep.c
--- src0/gdb/rs6000-tdep.c	2009-07-31 14:51:30.000000000 -0400
+++ src1/gdb/rs6000-tdep.c	2009-08-06 10:44:09.000000000 -0400
@@ -1085,7 +1085,6 @@ ppc_deal_with_atomic_sequence (struct fr
   int index;
   int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed).  */  
   const int atomic_sequence_length = 16; /* Instruction sequence length.  */
-  int opcode; /* Branch instruction's OPcode.  */
   int bc_insn_count = 0; /* Conditional branch instruction count.  */
 
   /* Assume all atomic sequences start with a lwarx/ldarx instruction.  */
@@ -3452,10 +3451,6 @@ rs6000_gdbarch_init (struct gdbarch_info
 	"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
 	"r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31"
       };
-      static const char *const segment_regs[] = {
-	"sr0", "sr1", "sr2", "sr3", "sr4", "sr5", "sr6", "sr7",
-	"sr8", "sr9", "sr10", "sr11", "sr12", "sr13", "sr14", "sr15"
-      };
       const struct tdesc_feature *feature;
       int i, valid_p;
       static const char *const msr_names[] = { "msr", "ps" };
diff -uprN src0/gdb/scm-valprint.c src1/gdb/scm-valprint.c
--- src0/gdb/scm-valprint.c	2009-07-06 09:28:20.000000000 -0400
+++ src1/gdb/scm-valprint.c	2009-08-06 10:23:37.000000000 -0400
@@ -73,13 +73,13 @@ scm_inferior_print (struct type *type, L
 	  struct value *remote_buffer;
 
 	  read_memory (SYMBOL_VALUE_ADDRESS (gdb_output_len_sym),
-		       (char *) &output_len, sizeof (output_len));
+		       (gdb_byte *) &output_len, sizeof (output_len));
 
 	  output = (char *) alloca (output_len);
 	  remote_buffer = value_at (type,
 				    SYMBOL_VALUE_ADDRESS (gdb_output_sym));
 	  read_memory (value_as_address (remote_buffer),
-		       output, output_len);
+		       (gdb_byte *)output, output_len);
 
 	  ui_file_write (stream, output, output_len);
 	}
diff -uprN src0/gdb/ser-pipe.c src1/gdb/ser-pipe.c
--- src0/gdb/ser-pipe.c	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/ser-pipe.c	2009-08-05 16:11:40.000000000 -0400
@@ -152,8 +152,6 @@ pipe_close (struct serial *scb)
     }
 }
 
-static struct serial_ops pipe_ops;
-
 void
 _initialize_ser_pipe (void)
 {
diff -uprN src0/gdb/ser-tcp.c src1/gdb/ser-tcp.c
--- src0/gdb/ser-tcp.c	2009-05-26 09:56:19.000000000 -0400
+++ src1/gdb/ser-tcp.c	2009-08-05 16:12:32.000000000 -0400
@@ -71,7 +71,7 @@ static int tcp_auto_retry = 1;
 
 /* Timeout period for connections, in seconds.  */
 
-static int tcp_retry_limit = 15;
+static unsigned int tcp_retry_limit = 15;
 
 /* how many times per second to poll deprecated_ui_loop_hook */
 
diff -uprN src0/gdb/serial.c src1/gdb/serial.c
--- src0/gdb/serial.c	2009-05-26 09:56:22.000000000 -0400
+++ src1/gdb/serial.c	2009-08-06 10:26:24.000000000 -0400
@@ -246,7 +246,6 @@ struct serial *
 serial_for_fd (int fd)
 {
   struct serial *scb;
-  struct serial_ops *ops;
 
   for (scb = scb_base; scb; scb = scb->next)
     if (scb->fd == fd)
diff -uprN src0/gdb/sh-tdep.c src1/gdb/sh-tdep.c
--- src0/gdb/sh-tdep.c	2009-07-31 14:43:26.000000000 -0400
+++ src1/gdb/sh-tdep.c	2009-08-06 11:32:33.000000000 -0400
@@ -1031,8 +1031,6 @@ sh_next_flt_argreg (struct gdbarch *gdba
 static int
 sh_treat_as_flt_p (struct type *type)
 {
-  int len = TYPE_LENGTH (type);
-
   /* Ordinary float types are obviously treated as float.  */
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
     return 1;
@@ -1128,14 +1126,15 @@ sh_push_dummy_call_fpu (struct gdbarch *
 	    {
 	      /* The data goes entirely on the stack, 4-byte aligned. */
 	      reg_size = (len + 3) & ~3;
-	      write_memory (sp + stack_offset, val, reg_size);
+	      write_memory (sp + stack_offset, (gdb_byte *)val, reg_size);
 	      stack_offset += reg_size;
 	    }
 	  else if (treat_as_flt && flt_argreg <= FLOAT_ARGLAST_REGNUM)
 	    {
 	      /* Argument goes in a float argument register.  */
 	      reg_size = register_size (gdbarch, flt_argreg);
-	      regval = extract_unsigned_integer (val, reg_size, byte_order);
+	      regval = extract_unsigned_integer ((gdb_byte *)val, reg_size,
+						 byte_order);
 	      /* In little endian mode, float types taking two registers
 	         (doubles on sh4, long doubles on sh2e, sh3e and sh4) must
 		 be stored swapped in the argument registers.  The below
@@ -1150,7 +1149,8 @@ sh_push_dummy_call_fpu (struct gdbarch *
 						  regval);
 		  val += reg_size;
 		  len -= reg_size;
-		  regval = extract_unsigned_integer (val, reg_size, byte_order);
+		  regval = extract_unsigned_integer ((gdb_byte *)val, reg_size,
+						     byte_order);
 		}
 	      regcache_cooked_write_unsigned (regcache, flt_argreg++, regval);
 	    }
@@ -1158,7 +1158,8 @@ sh_push_dummy_call_fpu (struct gdbarch *
 	    {
 	      /* there's room in a register */
 	      reg_size = register_size (gdbarch, argreg);
-	      regval = extract_unsigned_integer (val, reg_size, byte_order);
+	      regval = extract_unsigned_integer ((gdb_byte *)val, reg_size,
+						 byte_order);
 	      regcache_cooked_write_unsigned (regcache, argreg++, regval);
 	    }
 	  /* Store the value one register at a time or in one step on stack.  */
@@ -1252,14 +1253,15 @@ sh_push_dummy_call_nofpu (struct gdbarch
 	      /* The remainder of the data goes entirely on the stack,
 	         4-byte aligned. */
 	      reg_size = (len + 3) & ~3;
-	      write_memory (sp + stack_offset, val, reg_size);
+	      write_memory (sp + stack_offset, (gdb_byte *)val, reg_size);
 	      stack_offset += reg_size;
 	    }
 	  else if (argreg <= ARGLAST_REGNUM)
 	    {
 	      /* there's room in a register */
 	      reg_size = register_size (gdbarch, argreg);
-	      regval = extract_unsigned_integer (val, reg_size, byte_order);
+	      regval = extract_unsigned_integer ((gdb_byte *)val, reg_size,
+						 byte_order);
 	      regcache_cooked_write_unsigned (regcache, argreg++, regval);
 	    }
 	  /* Store the value reg_size bytes at a time.  This means that things
@@ -1304,8 +1306,6 @@ sh_extract_return_value_nofpu (struct ty
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int len = TYPE_LENGTH (type);
-  int return_register = R0_REGNUM;
-  int offset;
 
   if (len <= 4)
     {
@@ -1318,7 +1318,7 @@ sh_extract_return_value_nofpu (struct ty
     {
       int i, regnum = R0_REGNUM;
       for (i = 0; i < len; i += 4)
-	regcache_raw_read (regcache, regnum++, (char *) valbuf + i);
+	regcache_raw_read (regcache, regnum++, (gdb_byte *) valbuf + i);
     }
   else
     error (_("bad size for return value"));
@@ -1335,9 +1335,10 @@ sh_extract_return_value_fpu (struct type
       int i, regnum = gdbarch_fp0_regnum (gdbarch);
       for (i = 0; i < len; i += 4)
 	if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE)
-	  regcache_raw_read (regcache, regnum++, (char *) valbuf + len - 4 - i);
+	  regcache_raw_read (regcache, regnum++, (gdb_byte *) valbuf + len - 4
+			     - i);
 	else
-	  regcache_raw_read (regcache, regnum++, (char *) valbuf + i);
+	  regcache_raw_read (regcache, regnum++, (gdb_byte *) valbuf + i);
     }
   else
     sh_extract_return_value_nofpu (type, regcache, valbuf);
@@ -1367,7 +1368,7 @@ sh_store_return_value_nofpu (struct type
     {
       int i, regnum = R0_REGNUM;
       for (i = 0; i < len; i += 4)
-	regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
+	regcache_raw_write (regcache, regnum++, (gdb_byte *) valbuf + i);
     }
 }
 
@@ -1383,9 +1384,9 @@ sh_store_return_value_fpu (struct type *
       for (i = 0; i < len; i += 4)
 	if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE)
 	  regcache_raw_write (regcache, regnum++,
-			      (char *) valbuf + len - 4 - i);
+			      (gdb_byte *) valbuf + len - 4 - i);
 	else
-	  regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
+	  regcache_raw_write (regcache, regnum++, (gdb_byte *) valbuf + i);
     }
   else
     sh_store_return_value_nofpu (type, regcache, valbuf);
@@ -1709,8 +1710,6 @@ sh2a_show_regs (struct frame_info *frame
 static void
 sh2a_nofpu_show_regs (struct frame_info *frame)
 {
-  int pr = get_frame_register_unsigned (frame, FPSCR_REGNUM) & 0x80000;
-
   printf_filtered
     ("      PC %s       SR %08lx       PR %08lx     MACH %08lx\n",
      phex (get_frame_register_unsigned (frame,
@@ -2304,7 +2303,7 @@ sh_pseudo_register_read (struct gdbarch 
 			 int reg_nr, gdb_byte *buffer)
 {
   int base_regnum, portion;
-  char temp_buffer[MAX_REGISTER_SIZE];
+  gdb_byte temp_buffer[MAX_REGISTER_SIZE];
 
   if (reg_nr == PSEUDO_BANK_REGNUM)
     regcache_raw_read (regcache, BANK_REGNUM, buffer);
@@ -2323,7 +2322,7 @@ sh_pseudo_register_read (struct gdbarch 
       /* We must pay attention to the endiannes. */
       sh_register_convert_to_virtual (reg_nr,
 				      register_type (gdbarch, reg_nr),
-				      temp_buffer, buffer);
+				      (char *)temp_buffer, (char *)buffer);
     }
   else if (reg_nr >= FV0_REGNUM && reg_nr <= FV_LAST_REGNUM)
     {
@@ -2332,7 +2331,7 @@ sh_pseudo_register_read (struct gdbarch 
       /* Read the real regs for which this one is an alias.  */
       for (portion = 0; portion < 4; portion++)
 	regcache_raw_read (regcache, base_regnum + portion,
-			   ((char *) buffer
+			   (gdb_byte *)((char *) buffer
 			    + register_size (gdbarch,
 					     base_regnum) * portion));
     }
@@ -2368,7 +2367,7 @@ sh_pseudo_register_write (struct gdbarch
       /* Write the real regs for which this one is an alias.  */
       for (portion = 0; portion < 2; portion++)
 	regcache_raw_write (regcache, base_regnum + portion,
-			    (temp_buffer
+			    (gdb_byte *)(temp_buffer
 			     + register_size (gdbarch,
 					      base_regnum) * portion));
     }
@@ -2379,7 +2378,7 @@ sh_pseudo_register_write (struct gdbarch
       /* Write the real regs for which this one is an alias.  */
       for (portion = 0; portion < 4; portion++)
 	regcache_raw_write (regcache, base_regnum + portion,
-			    ((char *) buffer
+			    (gdb_byte *)((char *) buffer
 			     + register_size (gdbarch,
 					      base_regnum) * portion));
     }
@@ -2970,8 +2969,6 @@ extern initialize_file_ftype _initialize
 void
 _initialize_sh_tdep (void)
 {
-  struct cmd_list_element *c;
-
   gdbarch_register (bfd_arch_sh, sh_gdbarch_init, NULL);
 
   add_com ("regs", class_vars, sh_show_regs_command, _("Print all registers"));
diff -uprN src0/gdb/sh64-tdep.c src1/gdb/sh64-tdep.c
--- src0/gdb/sh64-tdep.c	2009-07-06 09:28:21.000000000 -0400
+++ src1/gdb/sh64-tdep.c	2009-08-06 13:15:54.000000000 -0400
@@ -846,15 +846,11 @@ sh64_analyze_prologue (struct gdbarch *g
 		       CORE_ADDR func_pc,
 		       CORE_ADDR current_pc)
 {
-  int reg_nr;
   int pc;
   int opc;
   int insn;
   int r0_val = 0;
   int insn_size;
-  int gdb_register_number;
-  int register_number;
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   
   cache->sp_offset = 0;
@@ -1051,9 +1047,8 @@ sh64_push_dummy_call (struct gdbarch *gd
   int argnum;
   struct type *type;
   CORE_ADDR regval;
-  char *val;
-  char valbuf[8];
-  char valbuf_tmp[8];
+  const gdb_byte *val;
+  gdb_byte valbuf[8];
   int len;
   int argreg_size;
   int fp_args[12];
@@ -1105,7 +1100,7 @@ sh64_push_dummy_call (struct gdbarch *gd
 	      val = valbuf;
 	    }
 	  else
-	    val = (char *) value_contents (args[argnum]);
+	    val = value_contents (args[argnum]);
 
 	  while (len > 0)
 	    {
@@ -1137,7 +1132,7 @@ sh64_push_dummy_call (struct gdbarch *gd
 	}
       else
 	{
-	  val = (char *) value_contents (args[argnum]);
+	  val = value_contents (args[argnum]);
 	  if (len == 4)
 	    {
 	      /* Where is it going to be stored? */
@@ -1211,7 +1206,6 @@ sh64_extract_return_value (struct type *
 			   void *valbuf)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int len = TYPE_LENGTH (type);
 
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
@@ -1244,7 +1238,7 @@ sh64_extract_return_value (struct type *
       if (len <= 8)
 	{
 	  int offset;
-	  char buf[8];
+	  gdb_byte buf[8];
 	  /* Result is in register 2. If smaller than 8 bytes, it is padded 
 	     at the most significant end.  */
 	  regcache_raw_read (regcache, DEFAULT_RETURN_REGNUM, buf);
@@ -1273,7 +1267,7 @@ sh64_store_return_value (struct type *ty
 			 const void *valbuf)
 {
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
-  char buf[64];	/* more than enough...  */
+  gdb_byte buf[64];	/* more than enough...  */
   int len = TYPE_LENGTH (type);
 
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
@@ -1282,9 +1276,9 @@ sh64_store_return_value (struct type *ty
       for (i = 0; i < len; i += 4)
 	if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE)
 	  regcache_raw_write (regcache, regnum++,
-			      (char *) valbuf + len - 4 - i);
+			      valbuf + len - 4 - i);
 	else
-	  regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
+	  regcache_raw_write (regcache, regnum++, (gdb_byte *) valbuf + i);
     }
   else
     {
@@ -1551,7 +1545,8 @@ sh64_register_type (struct gdbarch *gdba
 
 static void
 sh64_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum,
-				  struct type *type, char *from, char *to)
+				  struct type *type, gdb_byte *from,
+				  gdb_byte *to)
 {
   if (gdbarch_byte_order (gdbarch) != BFD_ENDIAN_LITTLE)
     {
@@ -1606,7 +1601,7 @@ sh64_pseudo_register_read (struct gdbarc
   int base_regnum;
   int portion;
   int offset = 0;
-  char temp_buffer[MAX_REGISTER_SIZE];
+  gdb_byte temp_buffer[MAX_REGISTER_SIZE];
 
   if (reg_nr >= DR0_REGNUM 
       && reg_nr <= DR_LAST_REGNUM)
@@ -1638,7 +1633,7 @@ sh64_pseudo_register_read (struct gdbarc
 	 concatenating 2 single precision floating point registers.  */
       for (portion = 0; portion < 2; portion++)
 	regcache_raw_read (regcache, base_regnum + portion, 
-			   ((char *) buffer
+			   (buffer
 			    + register_size (gdbarch, base_regnum) * portion));
     }
 
@@ -1652,7 +1647,7 @@ sh64_pseudo_register_read (struct gdbarc
 	 concatenating 4 single precision floating point registers.  */
       for (portion = 0; portion < 4; portion++)
 	regcache_raw_read (regcache, base_regnum + portion, 
-			   ((char *) buffer
+			   (buffer
 			    + register_size (gdbarch, base_regnum) * portion));
     }
 
@@ -1708,7 +1703,7 @@ sh64_pseudo_register_read (struct gdbarc
 	 concatenating 4 single precision floating point registers.  */
       for (portion = 0; portion < 4; portion++)
 	regcache_raw_read (regcache, base_regnum + portion, 
-			   ((char *) buffer
+			   (buffer
 			    + register_size (gdbarch, base_regnum) * portion));
     }
 
@@ -1773,7 +1768,7 @@ sh64_pseudo_register_write (struct gdbar
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int base_regnum, portion;
   int offset;
-  char temp_buffer[MAX_REGISTER_SIZE];
+  gdb_byte temp_buffer[MAX_REGISTER_SIZE];
 
   if (reg_nr >= DR0_REGNUM
       && reg_nr <= DR_LAST_REGNUM)
@@ -1800,7 +1795,7 @@ sh64_pseudo_register_write (struct gdbar
       /* Write the real regs for which this one is an alias.  */
       for (portion = 0; portion < 2; portion++)
 	regcache_raw_write (regcache, base_regnum + portion,
-			    ((char *) buffer
+			    (buffer
 			     + register_size (gdbarch, 
 					      base_regnum) * portion));
     }
@@ -1813,7 +1808,7 @@ sh64_pseudo_register_write (struct gdbar
       /* Write the real regs for which this one is an alias.  */
       for (portion = 0; portion < 4; portion++)
 	regcache_raw_write (regcache, base_regnum + portion,
-			    ((char *) buffer
+			    (buffer
 			     + register_size (gdbarch, 
 					      base_regnum) * portion));
     }
@@ -1874,7 +1869,7 @@ sh64_pseudo_register_write (struct gdbar
       for (portion = 0; portion < 4; portion++)
 	{
 	  regcache_raw_write (regcache, base_regnum + portion,
-			      ((char *) buffer
+			      (buffer
 			       + register_size (gdbarch, 
 						base_regnum) * portion));
 	}
diff -uprN src0/gdb/solib-svr4.c src1/gdb/solib-svr4.c
--- src0/gdb/solib-svr4.c	2009-07-31 14:51:31.000000000 -0400
+++ src1/gdb/solib-svr4.c	2009-08-05 16:10:52.000000000 -0400
@@ -575,7 +575,6 @@ find_program_interpreter (void)
      interp_sect = bfd_get_section_by_name (exec_bfd, ".interp");
      if (interp_sect != NULL)
       {
-	CORE_ADDR sect_addr = bfd_section_vma (exec_bfd, interp_sect);
 	int sect_size = bfd_section_size (exec_bfd, interp_sect);
 
 	buf = xmalloc (sect_size);
@@ -1265,7 +1280,6 @@ enable_break (struct svr4_info *info)
   asection *interp_sect;
   gdb_byte *interp_name;
   CORE_ADDR sym_addr;
-  struct inferior *inf = current_inferior ();
 
   /* First, remove all the solib event breakpoints.  Their addresses
      may have changed since the last time we ran the program.  */
@@ -1353,7 +1367,7 @@ enable_break (struct svr4_info *info)
 
       TRY_CATCH (ex, RETURN_MASK_ALL)
         {
-	  tmp_bfd = solib_bfd_open (interp_name);
+	  tmp_bfd = solib_bfd_open ((char *)interp_name);
 	}
       if (tmp_bfd == NULL)
 	goto bkpt_at_symbol;
@@ -1368,7 +1382,7 @@ enable_break (struct svr4_info *info)
       so = master_so_list ();
       while (so)
 	{
-	  if (svr4_same_1 (interp_name, so->so_original_name))
+	  if (svr4_same_1 ((const char *)interp_name, so->so_original_name))
 	    {
 	      load_addr_found = 1;
 	      loader_found_in_list = 1;
@@ -1401,7 +1415,7 @@ enable_break (struct svr4_info *info)
 
       if (!loader_found_in_list)
 	{
-	  info->debug_loader_name = xstrdup (interp_name);
+	  info->debug_loader_name = xstrdup ((const char *)interp_name);
 	  info->debug_loader_offset_p = 1;
 	  info->debug_loader_offset = load_addr;
 	  solib_add (NULL, 0, &current_target, auto_solib_add);
@@ -1682,8 +1696,6 @@ svr4_relocate_main_executable (void)
 static void
 svr4_solib_create_inferior_hook (void)
 {
-  struct inferior *inf;
-  struct thread_info *tp;
   struct svr4_info *info;
 
   info = get_svr4_info (PIDGET (inferior_ptid));
diff -uprN src0/gdb/solib.c src1/gdb/solib.c
--- src0/gdb/solib.c	2009-08-05 11:27:16.000000000 -0400
+++ src1/gdb/solib.c	2009-08-05 16:08:24.000000000 -0400
@@ -1082,8 +1082,6 @@ extern initialize_file_ftype _initialize
 void
 _initialize_solib (void)
 {
-  struct cmd_list_element *c;
-
   solib_data = gdbarch_data_register_pre_init (solib_init);
 
   add_com ("sharedlibrary", class_files, sharedlibrary_command,
diff -uprN src0/gdb/source.c src1/gdb/source.c
--- src0/gdb/source.c	2009-07-31 14:43:26.000000000 -0400
+++ src1/gdb/source.c	2009-08-06 09:01:42.000000000 -0400
@@ -171,8 +171,6 @@ get_current_source_symtab_and_line (void
 void
 set_default_source_symtab_and_line (void)
 {
-  struct symtab_and_line cursal;
-
   if (!have_full_symbols () && !have_partial_symbols ())
     error (_("No symbol table is loaded.  Use the \"file\" command."));
 
@@ -1890,7 +1888,6 @@ unset_substitute_path_command (char *arg
 static void
 set_substitute_path_command (char *args, int from_tty)
 {
-  char *from_path, *to_path;
   char **argv;
   struct substitute_path_rule *rule;
   
diff -uprN src0/gdb/stack.c src1/gdb/stack.c
--- src0/gdb/stack.c	2009-07-31 14:43:26.000000000 -0400
+++ src1/gdb/stack.c	2009-08-06 09:15:21.000000000 -0400
@@ -861,9 +861,6 @@ parse_frame_specification_1 (const char 
     numargs = 0;
   else
     {
-      char *addr_string;
-      struct cleanup *tmp_cleanup;
-
       numargs = 0;
       while (1)
 	{
@@ -990,7 +987,7 @@ frame_info (char *addr_exp, int from_tty
   struct symbol *func;
   struct symtab *s;
   struct frame_info *calling_frame_info;
-  int i, count, numregs;
+  int numregs;
   char *funname = 0;
   enum language funlang = language_unknown;
   const char *pc_regname;
@@ -1461,7 +1458,6 @@ print_block_frame_locals (struct block *
   struct dict_iterator iter;
   struct symbol *sym;
   int values_printed = 0;
-  int j;
 
   ALL_BLOCK_SYMBOLS (b, iter, sym)
     {
@@ -1486,46 +1482,6 @@ print_block_frame_locals (struct block *
   return values_printed;
 }
 
-/* Same, but print labels.  */
-
-static int
-print_block_frame_labels (struct gdbarch *gdbarch, struct block *b,
-			  int *have_default, struct ui_file *stream)
-{
-  struct dict_iterator iter;
-  struct symbol *sym;
-  int values_printed = 0;
-
-  ALL_BLOCK_SYMBOLS (b, iter, sym)
-    {
-      if (strcmp (SYMBOL_LINKAGE_NAME (sym), "default") == 0)
-	{
-	  if (*have_default)
-	    continue;
-	  *have_default = 1;
-	}
-      if (SYMBOL_CLASS (sym) == LOC_LABEL)
-	{
-	  struct symtab_and_line sal;
-	  struct value_print_options opts;
-	  sal = find_pc_line (SYMBOL_VALUE_ADDRESS (sym), 0);
-	  values_printed = 1;
-	  fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
-	  get_user_print_options (&opts);
-	  if (opts.addressprint)
-	    {
-	      fprintf_filtered (stream, " ");
-	      fputs_filtered (paddress (gdbarch, SYMBOL_VALUE_ADDRESS (sym)),
-			      stream);
-	    }
-	  fprintf_filtered (stream, " in file %s, line %d\n",
-			    sal.symtab->filename, sal.line);
-	}
-    }
-
-  return values_printed;
-}
-
 /* Print on STREAM all the local variables in frame FRAME, including
    all the blocks active in that frame at its current PC.
 
@@ -1648,8 +1604,6 @@ locals_info (char *args, int from_tty)
 static void
 catch_info (char *ignore, int from_tty)
 {
-  struct symtab_and_line *sal;
-
   /* Assume g++ compiled code; old GDB 4.16 behaviour.  */
   print_frame_label_vars (get_selected_frame (_("No frame selected.")),
                           0, gdb_stdout);
diff -uprN src0/gdb/symfile.c src1/gdb/symfile.c
--- src0/gdb/symfile.c	2009-08-04 13:44:22.000000000 -0400
+++ src1/gdb/symfile.c	2009-08-06 13:33:49.000000000 -0400
@@ -508,7 +508,6 @@ place_section (bfd *abfd, asection *sect
     for (cur_sec = abfd->sections; cur_sec != NULL; cur_sec = cur_sec->next)
       {
 	int indx = cur_sec->index;
-	CORE_ADDR cur_offset;
 
 	/* We don't need to compare against ourself.  */
 	if (cur_sec == sect)
@@ -588,7 +587,6 @@ default_symfile_offsets (struct objfile 
       struct place_section_arg arg;
       bfd *abfd = objfile->obfd;
       asection *cur_sec;
-      CORE_ADDR lowest = 0;
 
       for (cur_sec = abfd->sections; cur_sec != NULL; cur_sec = cur_sec->next)
 	/* We do not expect this to happen; just skip this step if the
@@ -1276,7 +1274,6 @@ get_debug_link_info (struct objfile *obj
   unsigned long crc32;
   char *contents;
   int crc_offset;
-  unsigned char *p;
 
   sect = bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink");
 
@@ -1340,13 +1337,10 @@ The directory where separate debug symbo
 static char *
 find_separate_debug_file (struct objfile *objfile)
 {
-  asection *sect;
   char *basename;
   char *dir;
   char *debugfile;
-  char *name_copy;
   char *canon_name;
-  bfd_size_type debuglink_size;
   unsigned long crc32;
   int i;
   struct build_id *build_id;
@@ -2098,7 +2092,6 @@ add_symbol_file_command (char *args, int
   char *filename = NULL;
   int flags = OBJF_USERLOADED;
   char *arg;
-  int expecting_option = 0;
   int section_index = 0;
   int argcnt = 0;
   int sec_num = 0;
@@ -2492,7 +2485,6 @@ static void
 reread_separate_symbols (struct objfile *objfile)
 {
   char *debug_file;
-  unsigned long crc32;
 
   /* Does the updated objfile's debug info live in a
      separate file?  */
@@ -3041,7 +3033,12 @@ again2:
   /* FIXME, what about the minimal symbol table? */
   return blewit;
 #else
-  return (0);
+  if (1)
+    return (0);
+
+/* workaround gcc warning while #if 0 above exists. */
+  else
+    cashier_psymtab (NULL);
 #endif
 }
 
@@ -3272,7 +3269,6 @@ section_is_overlay (struct obj_section *
 {
   if (overlay_debugging && section)
     {
-      bfd *abfd = section->objfile->obfd;
       asection *bfd_section = section->the_bfd_section;
   
       if (bfd_section_lma (abfd, bfd_section) != 0
@@ -3348,7 +3344,6 @@ pc_in_unmapped_range (CORE_ADDR pc, stru
 {
   if (section_is_overlay (section))
     {
-      bfd *abfd = section->objfile->obfd;
       asection *bfd_section = section->the_bfd_section;
 
       /* We assume the LMA is relocated by the same offset as the VMA.  */
@@ -3402,7 +3397,6 @@ overlay_unmapped_address (CORE_ADDR pc, 
 {
   if (section_is_overlay (section) && pc_in_mapped_range (pc, section))
     {
-      bfd *abfd = section->objfile->obfd;
       asection *bfd_section = section->the_bfd_section;
 
       return pc + bfd_section_lma (abfd, bfd_section)
@@ -3421,7 +3415,6 @@ overlay_mapped_address (CORE_ADDR pc, st
 {
   if (section_is_overlay (section) && pc_in_unmapped_range (pc, section))
     {
-      bfd *abfd = section->objfile->obfd;
       asection *bfd_section = section->the_bfd_section;
 
       return pc + bfd_section_vma (abfd, bfd_section)
@@ -3877,7 +3870,6 @@ static int
 simple_overlay_update_1 (struct obj_section *osect)
 {
   int i, size;
-  bfd *obfd = osect->objfile->obfd;
   asection *bsect = osect->the_bfd_section;
   struct gdbarch *gdbarch = get_objfile_arch (osect->objfile);
   int word_size = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
@@ -3942,7 +3934,6 @@ simple_overlay_update (struct obj_sectio
     if (section_is_overlay (osect))
     {
       int i, size;
-      bfd *obfd = osect->objfile->obfd;
       asection *bsect = osect->the_bfd_section;
 
       size = bfd_get_section_size (bsect);
@@ -4094,7 +4085,6 @@ symfile_find_segment_sections (struct ob
 
   for (i = 0, sect = abfd->sections; sect != NULL; i++, sect = sect->next)
     {
-      CORE_ADDR vma;
       int which = data->segment_info[i];
 
       if (which == 1)
diff -uprN src0/gdb/symmisc.c src1/gdb/symmisc.c
--- src0/gdb/symmisc.c	2009-07-06 09:28:21.000000000 -0400
+++ src1/gdb/symmisc.c	2009-08-06 09:09:11.000000000 -0400
@@ -93,9 +93,6 @@ static int print_symbol (void *);
 void
 free_symtab (struct symtab *s)
 {
-  int i, n;
-  struct blockvector *bv;
-
   switch (s->free_code)
     {
     case free_nothing:
@@ -414,7 +411,7 @@ dump_symtab_1 (struct objfile *objfile, 
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
   int i;
   struct dict_iterator iter;
-  int len, blen;
+  int len;
   struct linetable *l;
   struct blockvector *bv;
   struct symbol *sym;
diff -uprN src0/gdb/symtab.c src1/gdb/symtab.c
--- src0/gdb/symtab.c	2009-07-31 14:43:26.000000000 -0400
+++ src1/gdb/symtab.c	2009-08-06 09:06:30.000000000 -0400
@@ -1690,7 +1690,6 @@ lookup_partial_symbol (struct partial_sy
 		       const char *linkage_name, int global,
 		       domain_enum domain)
 {
-  struct partial_symbol *temp;
   struct partial_symbol **start, **psym;
   struct partial_symbol **top, **real_top, **bottom, **center;
   int length = (global ? pst->n_global_syms : pst->n_static_syms);
@@ -2608,9 +2607,7 @@ skip_prologue_using_lineinfo (CORE_ADDR 
 {
   CORE_ADDR func_start, func_end;
   struct linetable *l;
-  int ind, i, len;
-  int best_lineno = 0;
-  CORE_ADDR best_pc = func_addr;
+  int i;
 
   /* Give up if this symbol has no lineinfo table.  */
   l = LINETABLE (symtab);
@@ -3582,7 +3579,6 @@ completion_list_add_name (char *symname,
 			  char *text, char *word)
 {
   int newsize;
-  int i;
 
   /* clip symbols that cannot match */
 
@@ -4384,7 +4380,6 @@ skip_prologue_using_sal (struct gdbarch 
       if (prologue_sal.symtab->language != language_asm)
 	{
 	  struct linetable *linetable = LINETABLE (prologue_sal.symtab);
-	  int exact;
 	  int idx = 0;
 
 	  /* Skip any earlier lines, and any end-of-sequence marker
@@ -4634,11 +4629,10 @@ append_exact_match_to_sals (char *filena
 struct symtabs_and_lines
 expand_line_sal (struct symtab_and_line sal)
 {
-  struct symtabs_and_lines ret, this_line;
+  struct symtabs_and_lines ret;
   int i, j;
   struct objfile *objfile;
   struct partial_symtab *psymtab;
-  struct symtab *symtab;
   int lineno;
   int deleted = 0;
   struct block **blocks = NULL;
diff -uprN src0/gdb/target.c src1/gdb/target.c
--- src0/gdb/target.c	2009-07-31 14:43:27.000000000 -0400
+++ src1/gdb/target.c	2009-08-06 09:24:00.000000000 -0400
@@ -46,8 +46,6 @@
 
 static void target_info (char *, int);
 
-static void kill_or_be_killed (int);
-
 static void default_terminal_info (char *, int);
 
 static int default_watchpoint_addr_within_range (struct target_ops *,
@@ -73,8 +71,6 @@ static void target_command (char *, int)
 
 static struct target_ops *find_default_run_target (char *);
 
-static void nosupport_runtime (void);
-
 static LONGEST default_xfer_partial (struct target_ops *ops,
 				     enum target_object object,
 				     const char *annex, gdb_byte *readbuf,
@@ -480,48 +476,11 @@ nosymbol (char *name, CORE_ADDR *addrp)
 }
 
 static void
-nosupport_runtime (void)
-{
-  if (ptid_equal (inferior_ptid, null_ptid))
-    noprocess ();
-  else
-    error (_("No run-time support for this"));
-}
-
-
-static void
 default_terminal_info (char *args, int from_tty)
 {
   printf_unfiltered (_("No saved terminal information.\n"));
 }
 
-/* This is the default target_create_inferior and target_attach function.
-   If the current target is executing, it asks whether to kill it off.
-   If this function returns without calling error(), it has killed off
-   the target, and the operation should be attempted.  */
-
-static void
-kill_or_be_killed (int from_tty)
-{
-  if (target_has_execution)
-    {
-      printf_unfiltered (_("You are already running a program:\n"));
-      target_files_info ();
-      if (query (_("Kill it? ")))
-	{
-	  target_kill ();
-	  if (target_has_execution)
-	    error (_("Killing the program did not help."));
-	  return;
-	}
-      else
-	{
-	  error (_("Program not killed."));
-	}
-    }
-  tcomplain ();
-}
-
 /* A default implementation for the to_get_ada_task_ptid target method.
 
    This function builds the PTID by using both LWP and TID as part of
@@ -1221,6 +1180,9 @@ memory_xfer_partial (struct target_ops *
 
     case MEM_NONE:
       return -1;
+
+    case MEM_RW:
+      break;
     }
 
   if (region->attrib.cache)
@@ -1807,7 +1769,7 @@ target_read_stralloc (struct target_ops 
     return xstrdup ("");
 
   buffer[transferred] = 0;
-  if (strlen (buffer) < transferred)
+  if (strlen ((char *)buffer) < transferred)
     warning (_("target object %d, annex %s, "
 	       "contained unexpected null characters"),
 	     (int) object, annex ? annex : "(none)");
@@ -2428,7 +2390,6 @@ target_supports_non_stop (void)
 char *
 target_get_osdata (const char *type)
 {
-  char *document;
   struct target_ops *t;
 
   /* If we're already connected to something that can get us OS
diff -uprN src0/gdb/target-descriptions.c src1/gdb/target-descriptions.c
--- src0/gdb/target-descriptions.c	2009-07-31 14:43:26.000000000 -0400
+++ src1/gdb/target-descriptions.c	2009-08-06 10:31:33.000000000 -0400
@@ -712,7 +712,6 @@ tdesc_register_size (const struct tdesc_
 static struct tdesc_arch_reg *
 tdesc_find_arch_register (struct gdbarch *gdbarch, int regno)
 {
-  struct tdesc_arch_reg *reg;
   struct tdesc_arch_data *data;
 
   data = gdbarch_data (gdbarch, tdesc_data);
@@ -951,7 +950,7 @@ tdesc_use_registers (struct gdbarch *gdb
 		     struct tdesc_arch_data *early_data)
 {
   int num_regs = gdbarch_num_regs (gdbarch);
-  int i, ixf, ixr;
+  int ixf, ixr;
   struct tdesc_feature *feature;
   struct tdesc_reg *reg;
   struct tdesc_arch_data *data;
diff -uprN src0/gdb/top.c src1/gdb/top.c
--- src0/gdb/top.c	2009-06-10 13:49:45.000000000 -0400
+++ src1/gdb/top.c	2009-08-06 10:27:09.000000000 -0400
@@ -361,7 +361,6 @@ execute_command (char *p, int from_tty)
 #ifdef HAVE_SBRK
   long space_at_cmd_start = 0;
 #endif
-  extern int display_time;
   extern int display_space;
 
   if (target_can_async_p ())
@@ -1514,8 +1513,6 @@ Notification of completion for asynchron
 static void
 init_main (void)
 {
-  struct cmd_list_element *c;
-
   /* initialize the prompt stack to a simple "(gdb) " prompt or to
      whatever the DEFAULT_PROMPT is.  */
   the_prompts.top = 0;
diff -uprN src0/gdb/tracepoint.c src1/gdb/tracepoint.c
--- src0/gdb/tracepoint.c	2009-07-31 14:43:27.000000000 -0400
+++ src1/gdb/tracepoint.c	2009-08-05 16:26:01.000000000 -0400
@@ -133,7 +133,6 @@ static void trace_find_tracepoint_comman
 static void trace_find_line_command (char *, int);
 static void trace_find_range_command (char *, int);
 static void trace_find_outside_command (char *, int);
-static void tracepoint_save_command (char *, int);
 static void trace_dump_command (char *, int);
 
 /* support routines */
@@ -2143,8 +2142,6 @@ get_traceframe_number (void)
 void
 _initialize_tracepoint (void)
 {
-  struct cmd_list_element *c;
-
   traceframe_number = -1;
   tracepoint_number = -1;
 
diff -uprN src0/gdb/ui-out.c src1/gdb/ui-out.c
--- src0/gdb/ui-out.c	2009-07-06 09:28:21.000000000 -0400
+++ src1/gdb/ui-out.c	2009-08-06 10:17:54.000000000 -0400
@@ -461,7 +461,6 @@ ui_out_field_int (struct ui_out *uiout,
   int fldno;
   int width;
   int align;
-  struct ui_out_level *current = current_level (uiout);
 
   verify_field (uiout, &fldno, &width, &align);
 
@@ -478,7 +477,6 @@ ui_out_field_fmt_int (struct ui_out *uio
   int fldno;
   int width;
   int align;
-  struct ui_out_level *current = current_level (uiout);
 
   verify_field (uiout, &fldno, &width, &align);
 
diff -uprN src0/gdb/utils.c src1/gdb/utils.c
--- src0/gdb/utils.c	2009-07-31 14:43:27.000000000 -0400
+++ src1/gdb/utils.c	2009-08-06 10:27:58.000000000 -0400
@@ -261,7 +261,6 @@ make_cleanup_close (int fd)
 static void
 do_fclose_cleanup (void *arg)
 {
-  FILE *file = arg;
   fclose (arg);
 }
 
@@ -548,7 +547,6 @@ add_inferior_continuation (void (*contin
 void
 do_all_inferior_continuations (void)
 {
-  struct cleanup *old_chain;
   struct cleanup *as_cleanup;
   struct inferior *inf = current_inferior ();
 
@@ -857,7 +855,6 @@ static const char *internal_problem_mode
   internal_problem_no,
   NULL
 };
-static const char *internal_problem_mode = internal_problem_ask;
 
 /* Print a message reporting an internal error/warning. Ask the user
    if they want to continue, dump core, or just exit.  Return
@@ -1612,7 +1609,8 @@ host_char_to_target (int c, int *target_
   cleanups = make_cleanup_obstack_free (&host_data);
 
   convert_between_encodings (target_charset (), host_charset (),
-			     &the_char, 1, 1, &host_data, translit_none);
+			     (gdb_byte *)&the_char, 1, 1, &host_data,
+			     translit_none);
 
   if (obstack_object_size (&host_data) == 1)
     {
@@ -2765,8 +2763,6 @@ show_debug_timestamp (struct ui_file *fi
 void
 initialize_utils (void)
 {
-  struct cmd_list_element *c;
-
   add_setshow_uinteger_cmd ("width", class_support, &chars_per_line, _("\
 Set number of characters gdb thinks are in a line."), _("\
 Show number of characters gdb thinks are in a line."), NULL,
diff -uprN src0/gdb/valarith.c src1/gdb/valarith.c
--- src0/gdb/valarith.c	2009-07-06 09:28:22.000000000 -0400
+++ src1/gdb/valarith.c	2009-08-06 09:04:41.000000000 -0400
@@ -139,7 +139,6 @@ an integer nor a pointer of the same typ
 struct value *
 value_subscript (struct value *array, LONGEST index)
 {
-  struct value *bound;
   int c_style = current_language->c_style_arrays;
   struct type *tarray;
 
@@ -860,7 +859,6 @@ value_binop (struct value *arg1, struct 
   if (TYPE_CODE (type1) == TYPE_CODE_DECFLOAT
       || TYPE_CODE (type2) == TYPE_CODE_DECFLOAT)
     {
-      struct type *v_type;
       int len_v1, len_v2, len_v;
       enum bfd_endian byte_order_v1, byte_order_v2, byte_order_v;
       gdb_byte v1[16], v2[16];
diff -uprN src0/gdb/valops.c src1/gdb/valops.c
--- src0/gdb/valops.c	2009-07-31 14:43:27.000000000 -0400
+++ src1/gdb/valops.c	2009-08-06 09:04:20.000000000 -0400
@@ -270,7 +270,6 @@ value_cast_structs (struct type *type, s
 struct value *
 value_cast_pointers (struct type *type, struct value *arg2)
 {
-  struct type *type1 = check_typedef (type);
   struct type *type2 = check_typedef (value_type (arg2));
   struct type *t1 = check_typedef (TYPE_TARGET_TYPE (type));
   struct type *t2 = check_typedef (TYPE_TARGET_TYPE (type2));
@@ -866,6 +865,9 @@ value_assign (struct value *toval, struc
 	value_reg = VALUE_REGNUM (toval);
 
 	if (!frame)
+	  frame = get_current_frame ();
+
+	if (!frame)
 	  error (_("Value being assigned to is no longer active."));
 
 	gdbarch = get_frame_arch (frame);
@@ -1323,7 +1325,6 @@ value_array (int lowbound, int highbound
   unsigned int typelength;
   struct value *val;
   struct type *arraytype;
-  CORE_ADDR addr;
 
   /* Validate that the bounds are reasonable and that each of the
      elements have the same size.  */
@@ -2048,8 +2049,6 @@ find_overload_match (struct type **arg_t
   int num_fns = 0;
   struct type *basetype = NULL;
   int boffset;
-  int ix;
-  int static_offset;
   struct cleanup *old_cleanups = NULL;
 
   const char *obj_type_name = NULL;
diff -uprN src0/gdb/valprint.c src1/gdb/valprint.c
--- src0/gdb/valprint.c	2009-07-06 09:28:22.000000000 -0400
+++ src1/gdb/valprint.c	2009-08-06 09:04:54.000000000 -0400
@@ -1621,8 +1621,6 @@ show_print (char *args, int from_tty)
 void
 _initialize_valprint (void)
 {
-  struct cmd_list_element *c;
-
   add_prefix_cmd ("print", no_class, set_print,
 		  _("Generic command for setting how things print."),
 		  &setprintlist, "set print ", 0, &setlist);
diff -uprN src0/gdb/value.c src1/gdb/value.c
--- src0/gdb/value.c	2009-07-31 14:43:27.000000000 -0400
+++ src1/gdb/value.c	2009-08-06 09:03:32.000000000 -0400
@@ -250,7 +250,6 @@ struct value *
 allocate_value_lazy (struct type *type)
 {
   struct value *val;
-  struct type *atype = check_typedef (type);
 
   val = (struct value *) xzalloc (sizeof (struct value));
   val->contents = NULL;
@@ -1460,6 +1459,11 @@ preserve_one_internalvar (struct interna
     case INTERNALVAR_VALUE:
       preserve_one_value (var->u.value, objfile, copied_types);
       break;
+    case INTERNALVAR_VOID:
+    case INTERNALVAR_FUNCTION:
+    case INTERNALVAR_STRING:
+    case INTERNALVAR_MAKE_VALUE:
+      break;
     }
 }
 
@@ -2220,7 +2224,6 @@ value_from_double (struct type *type, DO
   struct value *val = allocate_value (type);
   struct type *base_type = check_typedef (type);
   enum type_code code = TYPE_CODE (base_type);
-  int len = TYPE_LENGTH (base_type);
 
   if (code == TYPE_CODE_FLT)
     {

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