9231e41
Index: gdb-6.5/gdb/configure
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/configure	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/configure	2006-07-11 02:47:23.000000000 -0300
9231e41
@@ -20125,7 +20125,8 @@ fi
8898d54
 # gdb/doc/gdbint.texinfo.
8898d54
 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
9231e41
 -Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral \
9231e41
--Wunused-label -Wunused-function -Wno-pointer-sign"
8898d54
+-Wunused-label -Wunused-function -Wno-pointer-sign -Wno-unused \
8898d54
+-Wp,-U_FORTIFY_SOURCE"
8898d54
 
9231e41
 # GCC supports -Wuninitialized only with -O or -On, n != 0.
9231e41
 if test x${CFLAGS+set} = xset; then
9231e41
Index: gdb-6.5/gdb/mi/mi-cmd-env.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/mi/mi-cmd-env.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/mi/mi-cmd-env.c	2006-07-11 02:47:23.000000000 -0300
8898d54
@@ -126,7 +126,7 @@ mi_cmd_env_path (char *command, char **a
8898d54
   static struct mi_opt opts[] =
8898d54
   {
8898d54
     {"r", RESET_OPT, 0},
8898d54
-    0
8898d54
+    {0}
8898d54
   };
8898d54
 
8898d54
   dont_repeat ();
8898d54
@@ -198,7 +198,7 @@ mi_cmd_env_dir (char *command, char **ar
8898d54
   static struct mi_opt opts[] =
8898d54
   {
8898d54
     {"r", RESET_OPT, 0},
8898d54
-    0
8898d54
+    {0}
8898d54
   };
8898d54
 
8898d54
   dont_repeat ();
9231e41
Index: gdb-6.5/gdb/mi/mi-getopt.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/mi/mi-getopt.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/mi/mi-getopt.c	2006-07-11 02:47:23.000000000 -0300
8898d54
@@ -82,7 +82,7 @@ mi_valid_noargs (const char *prefix, int
8898d54
   char *optarg;
8898d54
   static struct mi_opt opts[] =
8898d54
   {
8898d54
-    0
8898d54
+    {0}
8898d54
   };
8898d54
 
8898d54
   if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) == -1)
9231e41
Index: gdb-6.5/gdb/mi/mi-cmd-break.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/mi/mi-cmd-break.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/mi/mi-cmd-break.c	2006-07-11 02:47:23.000000000 -0300
8898d54
@@ -90,7 +90,7 @@ mi_cmd_break_insert (char *command, char
8898d54
     {"c", CONDITION_OPT, 1},
8898d54
     {"i", IGNORE_COUNT_OPT, 1},
8898d54
     {"p", THREAD_OPT, 1},
8898d54
-    0
8898d54
+    {0}
8898d54
   };
8898d54
 
8898d54
   /* Parse arguments. It could be -r or -h or -t, <location> or ``--''
9231e41
@@ -196,7 +196,7 @@ mi_cmd_break_watch (char *command, char 
8898d54
   {
8898d54
     {"r", READ_OPT, 0},
8898d54
     {"a", ACCESS_OPT, 0},
8898d54
-    0
8898d54
+    {0}
8898d54
   };
8898d54
 
8898d54
   /* Parse arguments. */
9231e41
Index: gdb-6.5/gdb/mi/mi-cmd-disas.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/mi/mi-cmd-disas.c	2006-07-11 02:47:12.000000000 -0300
9231e41
+++ gdb-6.5/gdb/mi/mi-cmd-disas.c	2006-07-11 02:47:23.000000000 -0300
8898d54
@@ -84,7 +84,7 @@ mi_cmd_disassemble (char *command, char 
8898d54
     {"n", NUM_OPT, 1},
8898d54
     {"s", START_OPT, 1},
8898d54
     {"e", END_OPT, 1},
8898d54
-    0
8898d54
+    {0}
8898d54
   };
8898d54
 
8898d54
   /* Get the options with their arguments. Keep track of what we
9231e41
Index: gdb-6.5/gdb/mi/mi-main.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/mi/mi-main.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/mi/mi-main.c	2006-07-11 02:47:23.000000000 -0300
9231e41
@@ -773,7 +773,7 @@ mi_cmd_data_read_memory (char *command, 
8898d54
   static struct mi_opt opts[] =
8898d54
   {
8898d54
     {"o", OFFSET_OPT, 1},
8898d54
-    0
8898d54
+    {0}
8898d54
   };
8898d54
 
8898d54
   while (1)
9231e41
@@ -975,7 +975,7 @@ mi_cmd_data_write_memory (char *command,
8898d54
   static struct mi_opt opts[] =
8898d54
   {
8898d54
     {"o", OFFSET_OPT, 1},
8898d54
-    0
8898d54
+    {0}
8898d54
   };
8898d54
 
8898d54
   while (1)
9231e41
Index: gdb-6.5/gdb/p-valprint.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/p-valprint.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/p-valprint.c	2006-07-11 02:47:23.000000000 -0300
9231e41
@@ -753,7 +753,7 @@ pascal_object_print_value_fields (struct
8898d54
 				  int dont_print_statmem)
8898d54
 {
8898d54
   int i, len, n_baseclasses;
8898d54
-  struct obstack tmp_obstack;
8898d54
+  struct obstack tmp_obstack = {0};
8898d54
   char *last_dont_print = obstack_next_free (&dont_print_statmem_obstack);
8898d54
 
8898d54
   CHECK_TYPEDEF (type);
9231e41
@@ -922,7 +922,7 @@ pascal_object_print_value (struct type *
8898d54
 			   enum val_prettyprint pretty,
8898d54
 			   struct type **dont_print_vb)
8898d54
 {
8898d54
-  struct obstack tmp_obstack;
8898d54
+  struct obstack tmp_obstack = {0};
8898d54
   struct type **last_dont_print
8898d54
   = (struct type **) obstack_next_free (&dont_print_vb_obstack);
8898d54
   int i, n_baseclasses = TYPE_N_BASECLASSES (type);
9231e41
Index: gdb-6.5/gdb/cp-valprint.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/cp-valprint.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/cp-valprint.c	2006-07-11 02:47:23.000000000 -0300
9231e41
@@ -265,7 +265,7 @@ cp_print_value_fields (struct type *type
9231e41
 		       struct type **dont_print_vb,int dont_print_statmem)
8898d54
 {
8898d54
   int i, len, n_baseclasses;
8898d54
-  struct obstack tmp_obstack;
8898d54
+  struct obstack tmp_obstack = {0};
8898d54
   char *last_dont_print = obstack_next_free (&dont_print_statmem_obstack);
8898d54
   int fields_seen = 0;
8898d54
 
9231e41
@@ -524,7 +524,7 @@ cp_print_value (struct type *type, struc
9231e41
 		struct ui_file *stream, int format, int recurse,
9231e41
 		enum val_prettyprint pretty, struct type **dont_print_vb)
8898d54
 {
8898d54
-  struct obstack tmp_obstack;
8898d54
+  struct obstack tmp_obstack = {0};
8898d54
   struct type **last_dont_print
8898d54
     = (struct type **) obstack_next_free (&dont_print_vb_obstack);
8898d54
   int i, n_baseclasses = TYPE_N_BASECLASSES (type);
9231e41
Index: gdb-6.5/gdb/tui/tui-layout.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/tui/tui-layout.c	2006-07-11 02:47:12.000000000 -0300
9231e41
+++ gdb-6.5/gdb/tui/tui-layout.c	2006-07-11 02:47:23.000000000 -0300
8898d54
@@ -755,7 +755,7 @@ show_source_disasm_command (void)
8898d54
 	  if (TUI_DISASM_WIN == NULL)
8898d54
 	    {
8898d54
 	      make_disasm_window (&TUI_DISASM_WIN, asm_height, src_height - 1);
8898d54
-	      init_and_make_win ((void **) & locator,
8898d54
+	      init_and_make_win ((void **)(char *) & locator,
8898d54
 			       LOCATOR_WIN,
8898d54
 			       2 /* 1 */ ,
8898d54
 			       tui_term_width (),
8898d54
@@ -848,7 +848,7 @@ show_data (enum tui_layout_type new_layo
8898d54
 	make_source_window (&tui_win_list[win_type], src_height, data_height - 1);
8898d54
       else
8898d54
 	make_disasm_window (&tui_win_list[win_type], src_height, data_height - 1);
8898d54
-      init_and_make_win ((void **) & locator,
8898d54
+      init_and_make_win ((void **)(char *) & locator,
8898d54
 		       LOCATOR_WIN,
8898d54
 		       2 /* 1 */ ,
8898d54
 		       tui_term_width (),
8898d54
@@ -963,7 +963,7 @@ make_source_or_disasm_window (struct tui
8898d54
     execution_info = tui_source_exec_info_win_ptr ();
8898d54
   else
8898d54
     execution_info = tui_disassem_exec_info_win_ptr ();
8898d54
-  init_and_make_win ((void **) & execution_info,
8898d54
+  init_and_make_win ((void **)(char *) & execution_info,
8898d54
 		   EXEC_INFO_WIN,
8898d54
 		   height,
8898d54
 		   3,
8898d54
@@ -1013,7 +1013,7 @@ show_source_or_disasm_and_command (enum 
8898d54
 	    make_source_window (win_info_ptr, src_height - 1, 0);
8898d54
 	  else
8898d54
 	    make_disasm_window (win_info_ptr, src_height - 1, 0);
8898d54
-	  init_and_make_win ((void **) & locator,
8898d54
+	  init_and_make_win ((void **)(char *) & locator,
8898d54
 			   LOCATOR_WIN,
8898d54
 			   2 /* 1 */ ,
8898d54
 			   tui_term_width (),
9231e41
Index: gdb-6.5/gdb/testsuite/gdb.base/move-dir.h
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/testsuite/gdb.base/move-dir.h	2006-07-11 02:47:12.000000000 -0300
9231e41
+++ gdb-6.5/gdb/testsuite/gdb.base/move-dir.h	2006-07-11 02:47:23.000000000 -0300
8898d54
@@ -1,4 +1,4 @@
8898d54
-#include <stdlib.h>
8898d54
+#include <stdio.h>
8898d54
 
8898d54
 void other() {
8898d54
   const char* ostring = "other";
9231e41
Index: gdb-6.5/gdb/testsuite/gdb.base/sigrepeat.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/testsuite/gdb.base/sigrepeat.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/testsuite/gdb.base/sigrepeat.c	2006-07-11 02:47:23.000000000 -0300
9231e41
@@ -22,6 +22,7 @@
9231e41
 #include <stdlib.h>
8898d54
 #include <string.h>
8898d54
 #include <signal.h>
8898d54
+#include <stdlib.h>
8898d54
 #include <sys/time.h>
8898d54
 
9231e41
 static volatile int done[2];
9231e41
Index: gdb-6.5/gdb/s390-tdep.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/s390-tdep.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/s390-tdep.c	2006-07-11 02:47:23.000000000 -0300
9231e41
@@ -2309,6 +2309,9 @@ s390_return_value (struct gdbarch *gdbar
8898d54
 	case RETURN_VALUE_STRUCT_CONVENTION:
9231e41
 	  error (_("Function return value unknown."));
8898d54
 	  break;
8898d54
+
8898d54
+        default:
8898d54
+      	  break;
8898d54
 	}
8898d54
     }
8898d54
 
9231e41
Index: gdb-6.5/gdb/remote.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/remote.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/remote.c	2006-07-11 02:49:02.000000000 -0300
9231e41
@@ -2523,10 +2523,10 @@ cleanup_sigint_signal_handler (void *dum
8898d54
 {
8898d54
   signal (SIGINT, handle_sigint);
8898d54
   if (sigint_remote_twice_token)
9231e41
-    delete_async_signal_handler ((struct async_signal_handler **) 
9231e41
+    delete_async_signal_handler ((struct async_signal_handler **) (char *)
9231e41
 				 &sigint_remote_twice_token);
8898d54
   if (sigint_remote_token)
9231e41
-    delete_async_signal_handler ((struct async_signal_handler **) 
9231e41
+    delete_async_signal_handler ((struct async_signal_handler **) (char *)
9231e41
 				 &sigint_remote_token);
8898d54
 }
8898d54
 
9231e41
Index: gdb-6.5/gdb/f-exp.y
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/f-exp.y	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/f-exp.y	2006-07-11 02:47:24.000000000 -0300
9231e41
@@ -567,6 +567,8 @@ ptype	:	typebase
8898d54
 		      case tp_function:
8898d54
 			follow_type = lookup_function_type (follow_type);
8898d54
 			break;
8898d54
+		      default:
8898d54
+			break;
8898d54
 		      }
8898d54
 		  $$ = follow_type;
8898d54
 		}
9231e41
Index: gdb-6.5/gdb/remote-fileio.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/remote-fileio.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/remote-fileio.c	2006-07-11 02:47:24.000000000 -0300
9231e41
@@ -1317,19 +1317,19 @@ static struct {
8898d54
   char *name;
8898d54
   void (*func)(char *);
8898d54
 } remote_fio_func_map[] = {
8898d54
-  "open", remote_fileio_func_open,
8898d54
-  "close", remote_fileio_func_close,
8898d54
-  "read", remote_fileio_func_read,
8898d54
-  "write", remote_fileio_func_write,
8898d54
-  "lseek", remote_fileio_func_lseek,
8898d54
-  "rename", remote_fileio_func_rename,
8898d54
-  "unlink", remote_fileio_func_unlink,
8898d54
-  "stat", remote_fileio_func_stat,
8898d54
-  "fstat", remote_fileio_func_fstat,
8898d54
-  "gettimeofday", remote_fileio_func_gettimeofday,
8898d54
-  "isatty", remote_fileio_func_isatty,
8898d54
-  "system", remote_fileio_func_system,
8898d54
-  NULL, NULL
8898d54
+	{"open", remote_fileio_func_open},
8898d54
+	{"close", remote_fileio_func_close},
8898d54
+	{"read", remote_fileio_func_read},
8898d54
+	{"write", remote_fileio_func_write},
8898d54
+	{"lseek", remote_fileio_func_lseek},
8898d54
+	{"rename", remote_fileio_func_rename},
8898d54
+	{"unlink", remote_fileio_func_unlink},
8898d54
+	{"stat", remote_fileio_func_stat},
8898d54
+	{"fstat", remote_fileio_func_fstat},
8898d54
+	{"gettimeofday", remote_fileio_func_gettimeofday},
8898d54
+	{"isatty", remote_fileio_func_isatty},
8898d54
+	{"system", remote_fileio_func_system},
8898d54
+	{NULL, NULL}
8898d54
 };
8898d54
 
8898d54
 static int
9231e41
Index: gdb-6.5/gdb/source.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/source.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/source.c	2006-07-11 02:47:24.000000000 -0300
9231e41
@@ -160,7 +160,7 @@ get_current_source_symtab_and_line (void
9231e41
 void
9231e41
 set_default_source_symtab_and_line (void)
8898d54
 {
8898d54
-  struct symtab_and_line cursal;
8898d54
+  struct symtab_and_line cursal = {0};
8898d54
 
9231e41
   if (!have_full_symbols () && !have_partial_symbols ())
9231e41
     error (_("No symbol table is loaded.  Use the \"file\" command."));
9231e41
@@ -1314,7 +1314,7 @@ static void
8898d54
 line_info (char *arg, int from_tty)
8898d54
 {
8898d54
   struct symtabs_and_lines sals;
8898d54
-  struct symtab_and_line sal;
8898d54
+  struct symtab_and_line sal = {0};
8898d54
   CORE_ADDR start_pc, end_pc;
8898d54
   int i;
8898d54
 
9231e41
Index: gdb-6.5/gdb/symfile.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/symfile.c	2006-07-11 02:47:11.000000000 -0300
9231e41
+++ gdb-6.5/gdb/symfile.c	2006-07-11 02:52:26.000000000 -0300
9231e41
@@ -2877,6 +2877,8 @@ add_psymbol_with_dem_name_to_list (char 
8898d54
 	deprecated_bcache (buf, dem_namelength + 1, objfile->psymbol_cache);
8898d54
       break;
8898d54
       /* FIXME What should be done for the default case? Ignoring for now. */
8898d54
+    default:
8898d54
+      break;
8898d54
     }
8898d54
 
8898d54
   /* val and coreaddr are mutually exclusive, one of them *will* be zero */
9231e41
Index: gdb-6.5/gdb/linespec.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/linespec.c	2006-07-11 02:47:12.000000000 -0300
9231e41
+++ gdb-6.5/gdb/linespec.c	2006-07-11 02:47:24.000000000 -0300
9231e41
@@ -1631,7 +1631,7 @@ static struct symtabs_and_lines
8898d54
 find_method (int funfirstline, char ***canonical, char *saved_arg,
8898d54
 	     char *copy, struct type *t, struct symbol *sym_class)
8898d54
 {
8898d54
-  struct symtabs_and_lines values;
8898d54
+  struct symtabs_and_lines values = {0};
8898d54
   struct symbol *sym = 0;
8898d54
   int i1;	/*  Counter for the symbol array.  */
8898d54
   struct symbol **sym_arr =  alloca (total_number_of_methods (t)
9231e41
Index: gdb-6.5/gdb/macroscope.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/macroscope.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/macroscope.c	2006-07-11 02:47:24.000000000 -0300
8898d54
@@ -33,7 +33,7 @@
8898d54
 struct macro_scope *
8898d54
 sal_macro_scope (struct symtab_and_line sal)
8898d54
 {
8898d54
-  struct macro_source_file *main, *inclusion;
8898d54
+  struct macro_source_file *main_sf, *inclusion;
8898d54
   struct macro_scope *ms;
8898d54
 
8898d54
   if (! sal.symtab
8898d54
@@ -42,8 +42,8 @@ sal_macro_scope (struct symtab_and_line 
8898d54
 
8898d54
   ms = (struct macro_scope *) xmalloc (sizeof (*ms));
8898d54
 
8898d54
-  main = macro_main (sal.symtab->macro_table);
8898d54
-  inclusion = macro_lookup_inclusion (main, sal.symtab->filename);
8898d54
+  main_sf = macro_main (sal.symtab->macro_table);
8898d54
+  inclusion = macro_lookup_inclusion (main_sf, sal.symtab->filename);
8898d54
 
8898d54
   if (inclusion)
8898d54
     {
8898d54
@@ -66,7 +66,7 @@ sal_macro_scope (struct symtab_and_line 
8898d54
 
8898d54
          For the time being, though, we'll just treat these as
8898d54
          occurring at the end of the main source file.  */
8898d54
-      ms->file = main;
8898d54
+      ms->file = main_sf;
8898d54
       ms->line = -1;
8898d54
 
8898d54
       complaint (&symfile_complaints,
8898d54
@@ -83,7 +83,6 @@ struct macro_scope *
8898d54
 default_macro_scope (void)
8898d54
 {
8898d54
   struct symtab_and_line sal;
8898d54
-  struct macro_source_file *main;
8898d54
   struct macro_scope *ms;
8898d54
 
8898d54
   /* If there's a selected frame, use its PC.  */ 
9231e41
Index: gdb-6.5/gdb/target.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/target.c	2006-07-11 02:47:12.000000000 -0300
9231e41
+++ gdb-6.5/gdb/target.c	2006-07-11 02:52:25.000000000 -0300
9231e41
@@ -1142,6 +1142,9 @@ target_xfer_memory (CORE_ADDR memaddr, g
8898d54
 	  if (!write)
8898d54
 	    return EIO;
8898d54
 	  break;
8898d54
+
8898d54
+	default:
8898d54
+	  break;
8898d54
 	}
8898d54
 
8898d54
       while (reg_len > 0)
9231e41
@@ -1220,6 +1223,9 @@ target_xfer_memory_partial (CORE_ADDR me
8898d54
 	  return -1;
8898d54
 	}
8898d54
       break;
8898d54
+
8898d54
+    default:
8898d54
+      break;
8898d54
     }
8898d54
 
8898d54
   if (region->attrib.cache)
9231e41
Index: gdb-6.5/gdb/gdb-events.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/gdb-events.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/gdb-events.c	2006-07-11 02:47:24.000000000 -0300
9231e41
@@ -321,6 +321,8 @@ gdb_events_deliver (struct gdb_events *v
8898d54
 	case architecture_changed:
8898d54
 	  vector->architecture_changed ();
8898d54
 	  break;
8898d54
+	default:
8898d54
+	  break;
8898d54
 	}
8898d54
       delivering_events = event->next;
8898d54
       xfree (event);
9231e41
Index: gdb-6.5/gdb/dwarf2read.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/dwarf2read.c	2006-07-11 02:47:12.000000000 -0300
9231e41
+++ gdb-6.5/gdb/dwarf2read.c	2006-07-11 02:52:25.000000000 -0300
9231e41
@@ -9179,6 +9179,7 @@ dwarf_decode_macros (struct line_header 
8898d54
   for (;;)
8898d54
     {
8898d54
       enum dwarf_macinfo_record_type macinfo_type;
8898d54
+      int tmp;
8898d54
 
8898d54
       /* Do we at least have room for a macinfo type byte?  */
8898d54
       if (mac_ptr >= mac_end)
9231e41
@@ -9190,13 +9191,16 @@ dwarf_decode_macros (struct line_header 
8898d54
       macinfo_type = read_1_byte (abfd, mac_ptr);
8898d54
       mac_ptr++;
8898d54
 
8898d54
+      /* Check for a zero macinfo type which indicates the end of the macro
8898d54
+         information.  We do this as the compiler may warn us if we
8898d54
+         try and look for 0 in the switch below because 0 is not
8898d54
+         an enumerated value.  */
8898d54
+      tmp = (int)macinfo_type;
8898d54
+      if (tmp == 0)
8898d54
+	return;
9231e41
+
8898d54
       switch (macinfo_type)
8898d54
         {
8898d54
-          /* A zero macinfo type indicates the end of the macro
8898d54
-             information.  */
8898d54
-        case 0:
8898d54
-          return;
8898d54
-
8898d54
         case DW_MACINFO_define:
8898d54
         case DW_MACINFO_undef:
8898d54
           {
9231e41
Index: gdb-6.5/gdb/stabsread.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/stabsread.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/stabsread.c	2006-07-11 02:47:24.000000000 -0300
8898d54
@@ -1794,7 +1794,8 @@ again:
8898d54
 	  struct type *domain = read_type (pp, objfile);
8898d54
 	  struct type *return_type;
8898d54
 	  struct field *args;
8898d54
-	  int nargs, varargs;
8898d54
+	  int nargs = 0;
8898d54
+	  int varargs = 0;
8898d54
 
8898d54
 	  if (**pp != ',')
8898d54
 	    /* Invalid member type data format.  */
9231e41
Index: gdb-6.5/gdb/dwarf2expr.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/dwarf2expr.c	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/dwarf2expr.c	2006-07-11 02:47:24.000000000 -0300
9231e41
@@ -559,6 +559,8 @@ execute_stack_op (struct dwarf_expr_cont
8898d54
 	      op_ptr = read_uleb128 (op_ptr, op_end, ®);
8898d54
 	      result += reg;
8898d54
 	      break;
8898d54
+	    default:
8898d54
+	      break;
8898d54
 	    }
8898d54
 	  break;
8898d54
 
9231e41
Index: gdb-6.5/gdb/varobj.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/varobj.c	2006-07-11 02:47:21.000000000 -0300
9231e41
+++ gdb-6.5/gdb/varobj.c	2006-07-11 02:47:24.000000000 -0300
9231e41
@@ -325,10 +325,9 @@ struct language_specific
8898d54
 
8898d54
 /* Array of known source language routines. */
8898d54
 static struct language_specific
8898d54
-  languages[vlang_end][sizeof (struct language_specific)] = {
8898d54
+  languages[vlang_end] = {
8898d54
   /* Unknown (try treating as C */
8898d54
-  {
8898d54
-   vlang_unknown,
8898d54
+  {vlang_unknown,
8898d54
    c_number_of_children,
8898d54
    c_name_of_variable,
8898d54
    c_name_of_child,
9231e41
@@ -339,8 +338,7 @@ static struct language_specific
8898d54
    c_value_of_variable}
8898d54
   ,
8898d54
   /* C */
8898d54
-  {
8898d54
-   vlang_c,
8898d54
+  {vlang_c,
8898d54
    c_number_of_children,
8898d54
    c_name_of_variable,
8898d54
    c_name_of_child,
9231e41
@@ -351,8 +349,7 @@ static struct language_specific
8898d54
    c_value_of_variable}
8898d54
   ,
8898d54
   /* C++ */
8898d54
-  {
8898d54
-   vlang_cplus,
8898d54
+  {vlang_cplus,
8898d54
    cplus_number_of_children,
8898d54
    cplus_name_of_variable,
8898d54
    cplus_name_of_child,
9231e41
@@ -363,8 +360,7 @@ static struct language_specific
8898d54
    cplus_value_of_variable}
8898d54
   ,
8898d54
   /* Java */
8898d54
-  {
8898d54
-   vlang_java,
8898d54
+  {vlang_java,
8898d54
    java_number_of_children,
8898d54
    java_name_of_variable,
8898d54
    java_name_of_child,
9231e41
@@ -519,7 +515,7 @@ varobj_create (char *objname,
8898d54
 
8898d54
       /* Set language info */
8898d54
       lang = variable_language (var);
8898d54
-      var->root->lang = languages[lang];
8898d54
+      var->root->lang = &languages[lang];
8898d54
 
8898d54
       /* Set ourselves as our root */
8898d54
       var->root->rootvar = var;
9231e41
Index: gdb-6.5/gdb/configure.ac
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/configure.ac	2006-07-11 02:46:52.000000000 -0300
9231e41
+++ gdb-6.5/gdb/configure.ac	2006-07-11 02:47:24.000000000 -0300
9231e41
@@ -1133,7 +1133,8 @@ fi
8898d54
 # gdb/doc/gdbint.texinfo.
8898d54
 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
9231e41
 -Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral \
9231e41
--Wunused-label -Wunused-function -Wno-pointer-sign"
8898d54
+-Wunused-label -Wunused-function -Wno-pointer-sign -Wno-unused \
8898d54
+-Wp,-U_FORTIFY_SOURCE"
9231e41
 
9231e41
 # GCC supports -Wuninitialized only with -O or -On, n != 0.
9231e41
 if test x${CFLAGS+set} = xset; then
9231e41
Index: gdb-6.5/gdb/doublest.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/doublest.c	2005-12-17 20:33:59.000000000 -0200
9231e41
+++ gdb-6.5/gdb/doublest.c	2006-07-11 02:55:55.000000000 -0300
9231e41
@@ -94,15 +94,10 @@ get_field (const bfd_byte *data, enum fl
9231e41
     {
9231e41
       result |= (unsigned long)*(data + cur_byte) << cur_bitshift;
9231e41
       cur_bitshift += FLOATFORMAT_CHAR_BIT;
9231e41
-      switch (order)
9231e41
-	{
9231e41
-	case floatformat_little:
9231e41
-	  ++cur_byte;
9231e41
-	  break;
9231e41
-	case floatformat_big:
9231e41
-	  --cur_byte;
9231e41
-	  break;
9231e41
-	}
9231e41
+      if (order == floatformat_little)
9231e41
+	++cur_byte;
9231e41
+      else
9231e41
+	--cur_byte;
9231e41
     }
9231e41
   if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
9231e41
     /* Mask out bits which are not part of the field */