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: gdb-6.3.50.20050804 remove compiler warnings


This patch fixes the warnings generated by gcc-4.0.1.
Diff generated against gdb-6.3.50-20050804.

-- 
Rich Coe		richard.coe@med.ge.com
General Electric Healthcare Technologies
Global Software Platforms, Computer Technology Team

diff -urNp gdb-6.3-old/gdb/ada-lang.c gdb-6.3/gdb/ada-lang.c
--- gdb-6.3-old/gdb/ada-lang.c	2005-08-04 16:01:41.660917952 -0500
+++ gdb-6.3/gdb/ada-lang.c	2005-08-05 08:19:35.734103016 -0500
@@ -316,7 +316,8 @@ extract_string (CORE_ADDR addr, char *bu
   do
     {
       target_read_memory (addr + char_index * sizeof (char),
-                          buf + char_index * sizeof (char), sizeof (char));
+                          (gdb_byte *) buf + char_index * sizeof (char),
+			  sizeof (char));
       char_index++;
     }
   while (buf[char_index - 1] != '\000');
@@ -1090,7 +1091,7 @@ static char *bound_name[] = {
 static void
 modify_general_field (char *addr, LONGEST fieldval, int bitpos, int bitsize)
 {
-  modify_field (addr + bitpos / 8, fieldval, bitpos % 8, bitsize);
+  modify_field ((gdb_byte *) addr + bitpos / 8, fieldval, bitpos % 8, bitsize);
 }
 
 
@@ -2020,7 +2021,7 @@ ada_value_assign (struct value *toval, s
     {
       int len = (value_bitpos (toval)
 		 + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
-      char *buffer = (char *) alloca (len);
+      gdb_byte *buffer = (gdb_byte *) alloca (len);
       struct value *val;
 
       if (TYPE_CODE (type) == TYPE_CODE_FLT)
@@ -3575,11 +3576,11 @@ make_array_descriptor (struct type *type
 
   for (i = ada_array_arity (ada_check_typedef (value_type (arr))); i > 0; i -= 1)
     {
-      modify_general_field (value_contents_writeable (bounds),
+      modify_general_field ((char *) value_contents_writeable (bounds),
                             value_as_long (ada_array_bound (arr, i, 0)),
                             desc_bound_bitpos (bounds_type, i, 0),
                             desc_bound_bitsize (bounds_type, i, 0));
-      modify_general_field (value_contents_writeable (bounds),
+      modify_general_field ((char *) value_contents_writeable (bounds),
                             value_as_long (ada_array_bound (arr, i, 1)),
                             desc_bound_bitpos (bounds_type, i, 1),
                             desc_bound_bitsize (bounds_type, i, 1));
@@ -3587,12 +3588,12 @@ make_array_descriptor (struct type *type
 
   bounds = ensure_lval (bounds, sp);
 
-  modify_general_field (value_contents_writeable (descriptor),
+  modify_general_field ((char *) value_contents_writeable (descriptor),
                         VALUE_ADDRESS (ensure_lval (arr, sp)),
                         fat_pntr_data_bitpos (desc_type),
                         fat_pntr_data_bitsize (desc_type));
 
-  modify_general_field (value_contents_writeable (descriptor),
+  modify_general_field ((char *) value_contents_writeable (descriptor),
                         VALUE_ADDRESS (bounds),
                         fat_pntr_bounds_bitpos (desc_type),
                         fat_pntr_bounds_bitsize (desc_type));
diff -urNp gdb-6.3-old/gdb/ada-lex.l gdb-6.3/gdb/ada-lex.l
--- gdb-6.3-old/gdb/ada-lex.l	2005-08-04 16:01:41.663917496 -0500
+++ gdb-6.3/gdb/ada-lex.l	2005-08-05 07:11:44.517022088 -0500
@@ -147,9 +147,9 @@ static int find_dot_all (const char *);
 		}
 
 <INITIAL>"'[\""{HEXDIG}{2}"\"]'"   {
-                   int v;
+                   int v, rc;
                    yylval.typed_val.type = type_char ();
-		   sscanf (yytext+3, "%2x", &v);
+		   rc = sscanf (yytext+3, "%2x", &v);
 		   yylval.typed_val.val = v;
 		   return CHARLIT;
 		}
@@ -170,10 +170,10 @@ static int find_dot_all (const char *);
 		}
 
 <IN_STRING>{GRAPHIC}*"[\""{HEXDIG}{2}"\"]" {
-		   int n;
+		   int n, rc;
 		   resize_tempbuf (yyleng-5+tempbuf_len+1);
 		   strncpy (tempbuf+tempbuf_len, yytext, yyleng-6);
-		   sscanf(yytext+yyleng-4, "%2x", &n);
+		   rc = sscanf(yytext+yyleng-4, "%2x", &n);
 		   tempbuf[yyleng-6+tempbuf_len] = (char) n;
 		   tempbuf_len += yyleng-5;
 		}
@@ -511,14 +511,15 @@ processInt (const char *base0, const cha
 static int
 processReal (const char *num0)
 {
+  int rc;
 #if defined (PRINTF_HAS_LONG_DOUBLE)
   if (sizeof (DOUBLEST) > sizeof (double))
-    sscanf (num0, "%Lg", &yylval.typed_val_float.dval);
+    rc = sscanf (num0, "%Lg", &yylval.typed_val_float.dval);
   else
 #endif
     {
       double temp;
-      sscanf (num0, "%lg", &temp);
+      rc = sscanf (num0, "%lg", &temp);
       yylval.typed_val_float.dval = temp;
     }
 
diff -urNp gdb-6.3-old/gdb/breakpoint.c gdb-6.3/gdb/breakpoint.c
--- gdb-6.3-old/gdb/breakpoint.c	2005-08-04 16:01:41.825892872 -0500
+++ gdb-6.3/gdb/breakpoint.c	2005-08-05 07:12:31.146933264 -0500
@@ -4550,7 +4550,7 @@ re_enable_breakpoints_at_startup (void)
       ALL_BREAKPOINTS (b)
 	if (b->enable_state == bp_startup_disabled)
 	  {
-	    char buf[1];
+	    gdb_byte buf[1];
 
 	    /* Do not reenable the breakpoint if the shared library
 	       is still not mapped in.  */
diff -urNp gdb-6.3-old/gdb/cli/cli-cmds.c gdb-6.3/gdb/cli/cli-cmds.c
--- gdb-6.3-old/gdb/cli/cli-cmds.c	2005-08-04 16:01:42.587777048 -0500
+++ gdb-6.3/gdb/cli/cli-cmds.c	2005-08-05 07:08:44.109448208 -0500
@@ -308,9 +308,10 @@ quit_command (char *args, int from_tty)
 static void
 pwd_command (char *args, int from_tty)
 {
+  char *cwd;
   if (args)
     error (_("The \"pwd\" command does not take an argument: %s"), args);
-  getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
+  cwd = getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
 
   if (strcmp (gdb_dirbuf, current_directory) != 0)
     printf_unfiltered (_("Working directory %s\n (canonically %s).\n"),
diff -urNp gdb-6.3-old/gdb/coff-pe-read.c gdb-6.3/gdb/coff-pe-read.c
--- gdb-6.3-old/gdb/coff-pe-read.c	2005-08-04 16:01:41.858887856 -0500
+++ gdb-6.3/gdb/coff-pe-read.c	2005-08-05 08:02:48.193272504 -0500
@@ -296,7 +296,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);
 
@@ -333,7 +333,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 -urNp gdb-6.3-old/gdb/complaints.c gdb-6.3/gdb/complaints.c
--- gdb-6.3-old/gdb/complaints.c	2005-08-04 16:01:41.871885880 -0500
+++ gdb-6.3/gdb/complaints.c	2005-08-05 08:21:14.681060792 -0500
@@ -321,7 +321,8 @@ complaints_show_value (struct ui_file *f
 void
 _initialize_complaints (void)
 {
-  add_setshow_zinteger_cmd ("complaints", class_support, &stop_whining, _("\
+  add_setshow_zinteger_cmd ("complaints", class_support, (int *) &stop_whining,
+			    _("\
 Set max number of complaints about incorrect symbols."), _("\
 Show max number of complaints about incorrect symbols."), NULL,
 			    NULL, complaints_show_value,
diff -urNp gdb-6.3-old/gdb/corefile.c gdb-6.3/gdb/corefile.c
--- gdb-6.3-old/gdb/corefile.c	2005-08-04 16:01:41.876885120 -0500
+++ gdb-6.3/gdb/corefile.c	2005-08-05 08:12:46.564306280 -0500
@@ -295,7 +295,7 @@ safe_read_memory_integer (CORE_ADDR mema
 LONGEST
 read_memory_integer (CORE_ADDR memaddr, int len)
 {
-  char buf[sizeof (LONGEST)];
+  gdb_byte buf[sizeof (LONGEST)];
 
   read_memory (memaddr, buf, len);
   return extract_signed_integer (buf, len);
@@ -304,7 +304,7 @@ read_memory_integer (CORE_ADDR memaddr, 
 ULONGEST
 read_memory_unsigned_integer (CORE_ADDR memaddr, int len)
 {
-  char buf[sizeof (ULONGEST)];
+  gdb_byte buf[sizeof (ULONGEST)];
 
   read_memory (memaddr, buf, len);
   return extract_unsigned_integer (buf, len);
@@ -328,7 +328,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 */
 
@@ -340,7 +340,7 @@ read_memory_string (CORE_ADDR memaddr, c
 CORE_ADDR
 read_memory_typed_address (CORE_ADDR addr, struct type *type)
 {
-  char *buf = alloca (TYPE_LENGTH (type));
+  gdb_byte *buf = alloca (TYPE_LENGTH (type));
   read_memory (addr, buf, TYPE_LENGTH (type));
   return extract_typed_address (buf, type);
 }
@@ -362,7 +362,7 @@ write_memory (CORE_ADDR memaddr, const b
 void
 write_memory_unsigned_integer (CORE_ADDR addr, int len, ULONGEST value)
 {
-  char *buf = alloca (len);
+  gdb_byte *buf = alloca (len);
   store_unsigned_integer (buf, len, value);
   write_memory (addr, buf, len);
 }
@@ -371,7 +371,7 @@ write_memory_unsigned_integer (CORE_ADDR
 void
 write_memory_signed_integer (CORE_ADDR addr, int len, LONGEST value)
 {
-  char *buf = alloca (len);
+  gdb_byte *buf = alloca (len);
   store_signed_integer (buf, len, value);
   write_memory (addr, buf, len);
 }
diff -urNp gdb-6.3-old/gdb/dwarf2-frame.c gdb-6.3/gdb/dwarf2-frame.c
--- gdb-6.3-old/gdb/dwarf2-frame.c	2005-08-04 16:01:41.954873264 -0500
+++ gdb-6.3/gdb/dwarf2-frame.c	2005-08-05 08:15:04.520333776 -0500
@@ -1715,7 +1715,7 @@ dwarf2_build_frame_info (struct objfile 
       asection *got, *txt;
 
       unit.cie = NULL;
-      unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
+      unit.dwarf_frame_buffer = (gdb_byte *) dwarf2_read_section (objfile,
 						     dwarf_eh_frame_section);
 
       unit.dwarf_frame_size = bfd_get_section_size (dwarf_eh_frame_section);
@@ -1743,7 +1743,7 @@ dwarf2_build_frame_info (struct objfile 
   if (dwarf_frame_section)
     {
       unit.cie = NULL;
-      unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
+      unit.dwarf_frame_buffer = (gdb_byte *) dwarf2_read_section (objfile,
 						     dwarf_frame_section);
       unit.dwarf_frame_size = bfd_get_section_size (dwarf_frame_section);
       unit.dwarf_frame_section = dwarf_frame_section;
diff -urNp gdb-6.3-old/gdb/dwarf2read.c gdb-6.3/gdb/dwarf2read.c
--- gdb-6.3-old/gdb/dwarf2read.c	2005-08-04 16:01:41.956872960 -0500
+++ gdb-6.3/gdb/dwarf2read.c	2005-08-05 08:08:57.174178880 -0500
@@ -769,7 +769,7 @@ static void dwarf2_read_abbrevs (bfd *ab
 
 static void dwarf2_free_abbrev_table (void *);
 
-static struct abbrev_info *peek_die_abbrev (char *, int *, struct dwarf2_cu *);
+static struct abbrev_info *peek_die_abbrev (char *, unsigned int *, struct dwarf2_cu *);
 
 static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int,
 						 struct dwarf2_cu *);
@@ -807,13 +807,13 @@ static unsigned int read_4_bytes (bfd *,
 static unsigned long read_8_bytes (bfd *, char *);
 
 static CORE_ADDR read_address (bfd *, char *ptr, struct dwarf2_cu *,
-			       int *bytes_read);
+			       unsigned int *bytes_read);
 
 static LONGEST read_initial_length (bfd *, char *,
-                                    struct comp_unit_head *, int *bytes_read);
+                                    struct comp_unit_head *, unsigned int *bytes_read);
 
 static LONGEST read_offset (bfd *, char *, const struct comp_unit_head *,
-                            int *bytes_read);
+                            unsigned int *bytes_read);
 
 static char *read_n_bytes (bfd *, char *, unsigned int);
 
@@ -1283,7 +1283,7 @@ read_comp_unit_head (struct comp_unit_he
 		     char *info_ptr, bfd *abfd)
 {
   int signed_addr;
-  int bytes_read;
+  unsigned int bytes_read;
   cu_header->length = read_initial_length (abfd, info_ptr, cu_header,
                                            &bytes_read);
   info_ptr += bytes_read;
@@ -1641,7 +1641,7 @@ create_all_comp_units (struct objfile *o
       char *beg_of_comp_unit;
       struct dwarf2_per_cu_data *this_cu;
       unsigned long offset;
-      int bytes_read;
+      unsigned int bytes_read;
 
       offset = info_ptr - dwarf2_per_objfile->info_buffer;
 
@@ -2152,7 +2152,7 @@ add_partial_enumeration (struct partial_
    the initial number.  */
 
 static struct abbrev_info *
-peek_die_abbrev (char *info_ptr, int *bytes_read, struct dwarf2_cu *cu)
+peek_die_abbrev (char *info_ptr, unsigned int *bytes_read, struct dwarf2_cu *cu)
 {
   bfd *abfd = cu->objfile->obfd;
   unsigned int abbrev_number;
@@ -3070,7 +3070,7 @@ dwarf2_get_pc_bounds (struct die_info *d
 	  /* Base address selection entry.  */
 	  CORE_ADDR base;
 	  int found_base;
-	  int dummy;
+	  unsigned int dummy;
 	  char *buffer;
 	  CORE_ADDR marker;
 	  int low_set;
@@ -5842,7 +5842,7 @@ read_8_bytes (bfd *abfd, char *buf)
 }
 
 static CORE_ADDR
-read_address (bfd *abfd, char *buf, struct dwarf2_cu *cu, int *bytes_read)
+read_address (bfd *abfd, char *buf, struct dwarf2_cu *cu, unsigned int *bytes_read)
 {
   struct comp_unit_head *cu_header = &cu->header;
   CORE_ADDR retval = 0;
@@ -5935,7 +5935,7 @@ read_address (bfd *abfd, char *buf, stru
 
 static LONGEST
 read_initial_length (bfd *abfd, char *buf, struct comp_unit_head *cu_header,
-                     int *bytes_read)
+                     unsigned int *bytes_read)
 {
   LONGEST length = bfd_get_32 (abfd, (bfd_byte *) buf);
 
@@ -5979,7 +5979,7 @@ read_initial_length (bfd *abfd, char *bu
 
 static LONGEST
 read_offset (bfd *abfd, char *buf, const struct comp_unit_head *cu_header,
-             int *bytes_read)
+             unsigned int *bytes_read)
 {
   LONGEST retval = 0;
 
@@ -6033,8 +6033,7 @@ read_indirect_string (bfd *abfd, char *b
 		      const struct comp_unit_head *cu_header,
 		      unsigned int *bytes_read_ptr)
 {
-  LONGEST str_offset = read_offset (abfd, buf, cu_header,
-				    (int *) bytes_read_ptr);
+  LONGEST str_offset = read_offset (abfd, buf, cu_header, bytes_read_ptr);
 
   if (dwarf2_per_objfile->str_buffer == NULL)
     {
@@ -6320,7 +6319,7 @@ dwarf_decode_line_header (unsigned int o
   struct cleanup *back_to;
   struct line_header *lh;
   char *line_ptr;
-  int bytes_read;
+  unsigned int bytes_read;
   int i;
   char *cur_dir, *cur_file;
 
@@ -6780,7 +6779,7 @@ var_decode_location (struct attribute *a
       && DW_BLOCK (attr)->size == 1 + cu_header->addr_size
       && DW_BLOCK (attr)->data[0] == DW_OP_addr)
     {
-      int dummy;
+      unsigned int dummy;
 
       SYMBOL_VALUE_ADDRESS (sym) =
 	read_address (objfile->obfd, DW_BLOCK (attr)->data + 1, cu, &dummy);
@@ -7093,8 +7092,8 @@ dwarf2_const_value (struct attribute *at
 	obstack_alloc (&objfile->objfile_obstack, cu_header->addr_size);
       /* NOTE: cagney/2003-05-09: In-lined store_address call with
          it's body - store_unsigned_integer.  */
-      store_unsigned_integer (SYMBOL_VALUE_BYTES (sym), cu_header->addr_size,
-			      DW_ADDR (attr));
+      store_unsigned_integer ((gdb_byte *) SYMBOL_VALUE_BYTES (sym),
+			      cu_header->addr_size, DW_ADDR (attr));
       SYMBOL_CLASS (sym) = LOC_CONST_BYTES;
       break;
     case DW_FORM_block1:
@@ -9142,7 +9141,7 @@ dwarf_decode_macros (struct line_header 
         case DW_MACINFO_define:
         case DW_MACINFO_undef:
           {
-            int bytes_read;
+            unsigned int bytes_read;
             int line;
             char *body;
 
@@ -9170,7 +9169,7 @@ dwarf_decode_macros (struct line_header 
 
         case DW_MACINFO_start_file:
           {
-            int bytes_read;
+            unsigned int bytes_read;
             int line, file;
 
             line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
@@ -9221,7 +9220,7 @@ dwarf_decode_macros (struct line_header 
 
         case DW_MACINFO_vendor_ext:
           {
-            int bytes_read;
+            unsigned int bytes_read;
             int constant;
             char *string;
 
@@ -9264,7 +9263,7 @@ dwarf2_symbol_mark_computed (struct attr
       /* We don't know how long the location list is, but make sure we
 	 don't run off the edge of the section.  */
       baton->size = dwarf2_per_objfile->loc_size - DW_UNSND (attr);
-      baton->data = dwarf2_per_objfile->loc_buffer + DW_UNSND (attr);
+      baton->data = (gdb_byte *) dwarf2_per_objfile->loc_buffer + DW_UNSND (attr);
       baton->base_address = cu->header.base_address;
       if (cu->header.base_known == 0)
 	complaint (&symfile_complaints,
@@ -9289,7 +9288,7 @@ dwarf2_symbol_mark_computed (struct attr
 	     that buffer, but when we do clean up properly this may
 	     need to change.  */
 	  baton->size = DW_BLOCK (attr)->size;
-	  baton->data = DW_BLOCK (attr)->data;
+	  baton->data = (gdb_byte *) DW_BLOCK (attr)->data;
 	}
       else
 	{
diff -urNp gdb-6.3-old/gdb/expprint.c gdb-6.3/gdb/expprint.c
--- gdb-6.3-old/gdb/expprint.c	2005-08-04 16:01:41.972870528 -0500
+++ gdb-6.3/gdb/expprint.c	2005-08-05 07:28:57.988910480 -0500
@@ -177,7 +177,7 @@ print_subexp_standard (struct expression
       /* LA_PRINT_STRING will print using the current repeat count threshold.
          If necessary, we can temporarily set it to zero, or pass it as an
          additional parameter to LA_PRINT_STRING.  -fnf */
-      LA_PRINT_STRING (stream, &exp->elts[pc + 2].string, nargs, 1, 0);
+      LA_PRINT_STRING (stream, (gdb_byte *) &exp->elts[pc + 2].string, nargs, 1, 0);
       return;
 
     case OP_BITSTRING:
@@ -191,7 +191,7 @@ print_subexp_standard (struct expression
       nargs = longest_to_int (exp->elts[pc + 1].longconst);
       (*pos) += 3 + BYTES_TO_EXP_ELEM (nargs + 1);
       fputs_filtered ("@\"", stream);
-      LA_PRINT_STRING (stream, &exp->elts[pc + 2].string, nargs, 1, 0);
+      LA_PRINT_STRING (stream, (gdb_byte *) &exp->elts[pc + 2].string, nargs, 1, 0);
       fputs_filtered ("\"", stream);
       return;
 
@@ -270,7 +270,7 @@ print_subexp_standard (struct expression
 	}
       if (tem > 0)
 	{
-	  LA_PRINT_STRING (stream, tempstr, nargs - 1, 1, 0);
+	  LA_PRINT_STRING (stream, (gdb_byte *) tempstr, nargs - 1, 1, 0);
 	  (*pos) = pc;
 	}
       else
diff -urNp gdb-6.3-old/gdb/i386-linux-nat.c gdb-6.3/gdb/i386-linux-nat.c
--- gdb-6.3-old/gdb/i386-linux-nat.c	2005-08-04 16:01:42.065856392 -0500
+++ gdb-6.3/gdb/i386-linux-nat.c	2005-08-04 16:03:23.736400120 -0500
@@ -907,7 +907,7 @@ child_resume (ptid_t ptid, int step, enu
          that's about to be restored, and set the trace flag there.  */
 
       /* First check if PC is at a system call.  */
-      if (deprecated_read_memory_nobpt (pc, (char *) buf, LINUX_SYSCALL_LEN) == 0
+      if (deprecated_read_memory_nobpt (pc, buf, LINUX_SYSCALL_LEN) == 0
 	  && memcmp (buf, linux_syscall, LINUX_SYSCALL_LEN) == 0)
 	{
 	  int syscall = read_register_pid (LINUX_SYSCALL_REGNUM,
@@ -926,9 +926,9 @@ child_resume (ptid_t ptid, int step, enu
 	      /* Set the trace flag in the context that's about to be
                  restored.  */
 	      addr += LINUX_SIGCONTEXT_EFLAGS_OFFSET;
-	      read_memory (addr, (char *) &eflags, 4);
+	      read_memory (addr, (gdb_byte *) &eflags, 4);
 	      eflags |= 0x0100;
-	      write_memory (addr, (char *) &eflags, 4);
+	      write_memory (addr, (gdb_byte *) &eflags, 4);
 	    }
 	}
     }
diff -urNp gdb-6.3-old/gdb/inflow.c gdb-6.3/gdb/inflow.c
--- gdb-6.3-old/gdb/inflow.c	2005-08-04 16:01:42.117848488 -0500
+++ gdb-6.3/gdb/inflow.c	2005-08-05 08:24:43.741278808 -0500
@@ -519,7 +519,7 @@ new_tty_prefork (const char *ttyname)
 void
 new_tty (void)
 {
-  int tty;
+  int tty, fd;
 
   if (inferior_thisrun_terminal == 0)
     return;
@@ -552,17 +552,17 @@ new_tty (void)
   if (tty != 0)
     {
       close (0);
-      dup (tty);
+      fd = dup (tty);
     }
   if (tty != 1)
     {
       close (1);
-      dup (tty);
+      fd = dup (tty);
     }
   if (tty != 2)
     {
       close (2);
-      dup (tty);
+      fd = dup (tty);
     }
   if (tty > 2)
     close (tty);
diff -urNp gdb-6.3-old/gdb/kod.c gdb-6.3/gdb/kod.c
--- gdb-6.3-old/gdb/kod.c	2005-08-04 16:01:42.121847880 -0500
+++ gdb-6.3/gdb/kod.c	2005-08-05 07:34:04.111372792 -0500
@@ -121,7 +121,7 @@ gdb_kod_query (char *arg, char *result, 
 
   /* Send actual request.  */
   if (target_read_partial (&current_target, TARGET_OBJECT_KOD,
-			   arg, result, 0, bufsiz) < 0)
+			   arg, (gdb_byte *) result, 0, bufsiz) < 0)
     strcpy (result, "ERR: remote query failed");
 }
 
diff -urNp gdb-6.3-old/gdb/linespec.c gdb-6.3/gdb/linespec.c
--- gdb-6.3-old/gdb/linespec.c	2005-08-04 16:01:42.133846056 -0500
+++ gdb-6.3/gdb/linespec.c	2005-08-05 08:02:14.597379856 -0500
@@ -1310,8 +1310,8 @@ decode_objc (char **argptr, int funfirst
   struct symbol *sym = NULL;
   char *copy = NULL;
   struct block *block = NULL;
-  int i1 = 0;
-  int i2 = 0;
+  unsigned int i1 = 0;
+  unsigned int i2 = 0;
 
   values.sals = NULL;
   values.nelts = 0;
@@ -1640,6 +1640,7 @@ find_method (int funfirstline, char ***c
 				     * sizeof (struct minimal_symbol *));
 
   msym_arr[0] = NULL;
+  values.sals = NULL;
 
   /* Find all methods with a matching name, and put them in
      sym_arr.  */
@@ -1901,7 +1902,7 @@ decode_dollar (char *copy, int funfirstl
   if (!*p)		/* Reached end of token without hitting non-digit.  */
     {
       /* We have a value history reference.  */
-      sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &index);
+      int rc = sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &index);
       valx = access_value_history ((copy[1] == '$') ? -index : index);
       if (TYPE_CODE (value_type (valx)) != TYPE_CODE_INT)
 	error (_("History values used in line specs must have integer values."));
diff -urNp gdb-6.3-old/gdb/linux-nat.c gdb-6.3/gdb/linux-nat.c
--- gdb-6.3-old/gdb/linux-nat.c	2005-08-04 16:01:42.147843928 -0500
+++ gdb-6.3/gdb/linux-nat.c	2005-08-04 16:06:23.707040424 -0500
@@ -2440,7 +2440,7 @@ linux_nat_xfer_memory (CORE_ADDR memaddr
   if (is_lwp (inferior_ptid))
     inferior_ptid = pid_to_ptid (GET_LWP (inferior_ptid));
 
-  xfer = linux_proc_xfer_memory (memaddr, myaddr, len, write, attrib, target);
+  xfer = linux_proc_xfer_memory (memaddr, (char *)myaddr, len, write, attrib, target);
   if (xfer == 0)
     xfer = child_xfer_memory (memaddr, myaddr, len, write, attrib, target);
 
@@ -2855,7 +2855,8 @@ linux_nat_info_proc_cmd (char *args, int
       sprintf (fname1, "/proc/%lld/cmdline", pid);
       if ((procfile = fopen (fname1, "r")) > 0)
 	{
-	  fgets (buffer, sizeof (buffer), procfile);
+	  char *s;
+	  s = fgets (buffer, sizeof (buffer), procfile);
 	  printf_filtered ("cmdline = '%s'\n", buffer);
 	  fclose (procfile);
 	}
@@ -3246,7 +3247,7 @@ get_signo (const char *name)
   if (ms == NULL)
     return 0;
 
-  if (target_read_memory (SYMBOL_VALUE_ADDRESS (ms), (char *) &signo,
+  if (target_read_memory (SYMBOL_VALUE_ADDRESS (ms), (gdb_byte *) &signo,
 			  sizeof (signo)) != 0)
     return 0;
 
diff -urNp gdb-6.3-old/gdb/macroexp.c gdb-6.3/gdb/macroexp.c
--- gdb-6.3-old/gdb/macroexp.c	2005-08-04 16:01:42.195836632 -0500
+++ gdb-6.3/gdb/macroexp.c	2005-08-05 07:31:35.753926552 -0500
@@ -927,7 +927,7 @@ expand (const char *id,
   else if (def->kind == macro_function_like)
     {
       struct cleanup *back_to = make_cleanup (null_cleanup, 0);
-      int argc;
+      int argc = 0;
       struct macro_buffer *argv = NULL;
       struct macro_buffer substituted;
       struct macro_buffer substituted_src;
diff -urNp gdb-6.3-old/gdb/main.c gdb-6.3/gdb/main.c
--- gdb-6.3-old/gdb/main.c	2005-08-04 16:01:42.196836480 -0500
+++ gdb-6.3/gdb/main.c	2005-08-05 07:29:46.387552768 -0500
@@ -116,6 +116,7 @@ captured_main (void *data)
   static int quiet = 0;
   static int batch = 0;
   static int set_args = 0;
+  char *cwd;
 
   /* Pointers to various arguments from command line.  */
   char *symarg = NULL;
@@ -180,7 +181,7 @@ captured_main (void *data)
   line[0] = '\0';		/* Terminate saved (now empty) cmd line */
   instream = stdin;
 
-  getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
+  cwd = getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
   current_directory = gdb_dirbuf;
 
   gdb_stdout = stdio_fileopen (stdout);
diff -urNp gdb-6.3-old/gdb/mi/mi-cmd-env.c gdb-6.3/gdb/mi/mi-cmd-env.c
--- gdb-6.3-old/gdb/mi/mi-cmd-env.c	2005-08-04 16:01:43.494639184 -0500
+++ gdb-6.3/gdb/mi/mi-cmd-env.c	2005-08-05 07:09:12.485134448 -0500
@@ -69,6 +69,7 @@ env_execute_cli_command (const char *cmd
 enum mi_cmd_result
 mi_cmd_env_pwd (char *command, char **argv, int argc)
 {
+  char *cwd;
   if (argc > 0)
     error (_("mi_cmd_env_pwd: No arguments required"));
           
@@ -80,7 +81,7 @@ mi_cmd_env_pwd (char *command, char **ar
      
   /* Otherwise the mi level is 2 or higher.  */
 
-  getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
+  cwd = getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
   ui_out_field_string (uiout, "cwd", gdb_dirbuf);
 
   return MI_CMD_DONE;
diff -urNp gdb-6.3-old/gdb/objc-exp.y gdb-6.3/gdb/objc-exp.y
--- gdb-6.3-old/gdb/objc-exp.y	2005-08-04 16:01:42.250828272 -0500
+++ gdb-6.3/gdb/objc-exp.y	2005-08-05 07:10:36.095423752 -0500
@@ -1022,23 +1022,24 @@ parse_number (p, len, parsed_float, puti
   if (parsed_float)
     {
       char c;
+      int rc;
 
       /* It's a float since it contains a point or an exponent.  */
 
       if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
-	sscanf (p, "%g", (float *)&putithere->typed_val_float.dval);
+	rc = sscanf (p, "%g", (float *)&putithere->typed_val_float.dval);
       else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
-	sscanf (p, "%lg", (double *)&putithere->typed_val_float.dval);
+	rc = sscanf (p, "%lg", (double *)&putithere->typed_val_float.dval);
       else
 	{
 #ifdef PRINTF_HAS_LONG_DOUBLE
-	  sscanf (p, "%Lg", &putithere->typed_val_float.dval);
+	  rc = sscanf (p, "%Lg", &putithere->typed_val_float.dval);
 #else
 	  /* Scan it into a double, then assign it to the long double.
 	     This at least wins with values representable in the range
 	     of doubles.  */
 	  double temp;
-	  sscanf (p, "%lg", &temp);
+	  rc = sscanf (p, "%lg", &temp);
 	  putithere->typed_val_float.dval = temp;
 #endif
 	}
diff -urNp gdb-6.3-old/gdb/osabi.c gdb-6.3/gdb/osabi.c
--- gdb-6.3-old/gdb/osabi.c	2005-08-04 16:01:42.270825232 -0500
+++ gdb-6.3/gdb/osabi.c	2005-08-05 07:32:14.875979096 -0500
@@ -546,7 +546,7 @@ generic_elf_osabi_sniffer (bfd *abfd)
       /* The FreeBSD folks have been naughty; they stored the string
          "FreeBSD" in the padding of the e_ident field of the ELF
          header to "brand" their ELF binaries in FreeBSD 3.x.  */
-      if (strcmp (&elf_elfheader (abfd)->e_ident[8], "FreeBSD") == 0)
+      if (strcmp ((char *) &elf_elfheader (abfd)->e_ident[8], "FreeBSD") == 0)
 	osabi = GDB_OSABI_FREEBSD_ELF;
     }
 
diff -urNp gdb-6.3-old/gdb/remote.c gdb-6.3/gdb/remote.c
--- gdb-6.3-old/gdb/remote.c	2005-08-04 16:01:42.375809272 -0500
+++ gdb-6.3/gdb/remote.c	2005-08-05 07:55:26.137475200 -0500
@@ -1409,7 +1409,7 @@ threadref_to_int (threadref *ref)
   int i, value = 0;
   unsigned char *scan;
 
-  scan = (char *) ref;
+  scan = (unsigned char *) ref;
   scan += 4;
   i = 4;
   while (i-- > 0)
@@ -1517,7 +1517,7 @@ remote_unpack_thread_info_response (char
   /* Packets are terminated with nulls.  */
   while ((pkt < limit) && mask && *pkt)
     {
-      pkt = unpack_int (pkt, &tag);	/* tag */
+      pkt = unpack_int (pkt, (int *) &tag);	/* tag */
       pkt = unpack_byte (pkt, &length);	/* length */
       if (!(tag & mask))		/* Tags out of synch with mask.  */
 	{
@@ -2844,7 +2844,7 @@ remote_wait (ptid_t ptid, struct target_
       unsigned char *p;
 
       ofunc = signal (SIGINT, remote_interrupt);
-      getpkt (buf, (rs->remote_packet_size), 1);
+      getpkt ((char *)buf, (rs->remote_packet_size), 1);
       signal (SIGINT, ofunc);
 
       /* This is a hook for when we need to do something (perhaps the
@@ -2860,7 +2860,7 @@ remote_wait (ptid_t ptid, struct target_
 	  warning (_("Remote failure reply: %s"), buf);
 	  continue;
 	case 'F':		/* File-I/O request.  */
-	  remote_fileio_request (buf);
+	  remote_fileio_request ((char *)buf);
 	  continue;
 	case 'T':		/* Status with PC, SP, FP, ...  */
 	  {
@@ -2888,10 +2888,10 @@ remote_wait (ptid_t ptid, struct target_
 		/* If this packet is an awatch packet, don't parse the
 		   'a' as a register number.  */
 
-		if (strncmp (p, "awatch", strlen("awatch")) != 0)
+		if (strncmp ((char *)p, "awatch", strlen("awatch")) != 0)
 		  {
 		    /* Read the ``P'' register number.  */
-		    pnum = strtol (p, &p_temp, 16);
+		    pnum = strtol ((char *)p, &p_temp, 16);
 		    p1 = (unsigned char *) p_temp;
 		  }
 		else
@@ -2899,29 +2899,29 @@ remote_wait (ptid_t ptid, struct target_
 
 		if (p1 == p)	/* No register number present here.  */
 		  {
-		    p1 = (unsigned char *) strchr (p, ':');
+		    p1 = (unsigned char *) strchr ((char *)p, ':');
 		    if (p1 == NULL)
 		      warning (_("Malformed packet(a) (missing colon): %s\n\
 Packet: '%s'\n"),
 			       p, buf);
-		    if (strncmp (p, "thread", p1 - p) == 0)
+		    if (strncmp ((char *)p, "thread", p1 - p) == 0)
 		      {
-			p_temp = unpack_varlen_hex (++p1, &thread_num);
+			p_temp = unpack_varlen_hex ((char *)++p1, &thread_num);
 			record_currthread (thread_num);
 			p = (unsigned char *) p_temp;
 		      }
-		    else if ((strncmp (p, "watch", p1 - p) == 0)
-			     || (strncmp (p, "rwatch", p1 - p) == 0)
-			     || (strncmp (p, "awatch", p1 - p) == 0))
+		    else if ((strncmp ((char *)p, "watch", p1 - p) == 0)
+			     || (strncmp ((char *)p, "rwatch", p1 - p) == 0)
+			     || (strncmp ((char *)p, "awatch", p1 - p) == 0))
 		      {
 			remote_stopped_by_watchpoint_p = 1;
-			p = unpack_varlen_hex (++p1, &addr);
+			p = (unsigned char *) unpack_varlen_hex ((char *) ++p1, &addr);
 			remote_watch_data_address = (CORE_ADDR)addr;
 		      }
 		    else
  		      {
  			/* Silently skip unknown optional info.  */
- 			p_temp = strchr (p1 + 1, ';');
+ 			p_temp = strchr ((char *)p1 + 1, ';');
  			if (p_temp)
 			  p = (unsigned char *) p_temp;
  		      }
@@ -2941,7 +2941,7 @@ Packet: '%s'\n"),
 Packet: '%s'\n"),
 			     phex_nz (pnum, 0), p, buf);
 
-		    fieldsize = hex2bin (p, regs, 
+		    fieldsize = hex2bin ((char *)p, regs, 
 					 register_size (current_gdbarch, 
 							reg->regnum));
 		    p += 2 * fieldsize;
@@ -2984,7 +2984,7 @@ Packet: '%s'\n"),
 
 	  goto got_status;
 	case 'O':		/* Console output.  */
-	  remote_console_output (buf + 1);
+	  remote_console_output ((char *) buf + 1);
 	  continue;
 	case '\0':
 	  if (last_sent_signal != TARGET_SIGNAL_0)
@@ -3040,7 +3040,7 @@ remote_async_wait (ptid_t ptid, struct t
          _never_ wait for ever -> test on target_is_async_p().
          However, before we do that we need to ensure that the caller
          knows how to take the target into/out of async mode.  */
-      getpkt (buf, (rs->remote_packet_size), wait_forever_enabled_p);
+      getpkt ((char *) buf, (rs->remote_packet_size), wait_forever_enabled_p);
       if (!target_is_async_p ())
 	signal (SIGINT, ofunc);
 
@@ -3055,7 +3055,7 @@ remote_async_wait (ptid_t ptid, struct t
 	  warning (_("Remote failure reply: %s"), buf);
 	  continue;
 	case 'F':		/* File-I/O request.  */
-	  remote_fileio_request (buf);
+	  remote_fileio_request ((char *) buf);
 	  continue;
 	case 'T':		/* Status with PC, SP, FP, ...  */
 	  {
@@ -3083,10 +3083,10 @@ remote_async_wait (ptid_t ptid, struct t
 		/* If this packet is an awatch packet, don't parse the 'a'
 		   as a register number.  */
 
-		if (!strncmp (p, "awatch", strlen ("awatch")) != 0)
+		if (!strncmp ((char *) p, "awatch", strlen ("awatch")) != 0)
 		  {
 		    /* Read the register number.  */
-		    pnum = strtol (p, &p_temp, 16);
+		    pnum = strtol ((char *) p, &p_temp, 16);
 		    p1 = (unsigned char *) p_temp;
 		  }
 		else
@@ -3094,31 +3094,31 @@ remote_async_wait (ptid_t ptid, struct t
 
 		if (p1 == p)	/* No register number present here.  */
 		  {
-		    p1 = (unsigned char *) strchr (p, ':');
+		    p1 = (unsigned char *) strchr ((char *) p, ':');
 		    if (p1 == NULL)
 		      error (_("Malformed packet(a) (missing colon): %s\n\
 Packet: '%s'\n"),
 			     p, buf);
-		    if (strncmp (p, "thread", p1 - p) == 0)
+		    if (strncmp ((char *) p, "thread", p1 - p) == 0)
 		      {
-			p_temp = unpack_varlen_hex (++p1, &thread_num);
+			p_temp = unpack_varlen_hex ((char *) ++p1, &thread_num);
 			record_currthread (thread_num);
 			p = (unsigned char *) p_temp;
 		      }
-		    else if ((strncmp (p, "watch", p1 - p) == 0)
-			     || (strncmp (p, "rwatch", p1 - p) == 0)
-			     || (strncmp (p, "awatch", p1 - p) == 0))
+		    else if ((strncmp ((char *) p, "watch", p1 - p) == 0)
+			     || (strncmp ((char *) p, "rwatch", p1 - p) == 0)
+			     || (strncmp ((char *) p, "awatch", p1 - p) == 0))
 		      {
 			remote_stopped_by_watchpoint_p = 1;
-			p = unpack_varlen_hex (++p1, &addr);
+			p = (unsigned char *) unpack_varlen_hex ((char *)++p1, &addr);
 			remote_watch_data_address = (CORE_ADDR)addr;
 		      }
 		    else
  		      {
  			/* Silently skip unknown optional info.  */
- 			p_temp = (unsigned char *) strchr (p1 + 1, ';');
+ 			p_temp = strchr ((char *)p1 + 1, ';');
  			if (p_temp)
-			  p = p_temp;
+			  p = (unsigned char *) p_temp;
  		      }
 		  }
 
@@ -3136,7 +3136,7 @@ Packet: '%s'\n"),
 Packet: '%s'\n"),
 			     pnum, p, buf);
 
-		    fieldsize = hex2bin (p, regs, 
+		    fieldsize = hex2bin ((char *) p, regs, 
 					 register_size (current_gdbarch, 
 							reg->regnum));
 		    p += 2 * fieldsize;
@@ -3178,7 +3178,7 @@ Packet: '%s'\n"),
 
 	  goto got_status;
 	case 'O':		/* Console output.  */
-	  remote_console_output (buf + 1);
+	  remote_console_output ((char *) buf + 1);
 	  /* Return immediately to the event loop. The event loop will
              still be waiting on the inferior afterwards.  */
           status->kind = TARGET_WAITKIND_IGNORE;
@@ -3407,7 +3407,7 @@ remote_prepare_to_store (void)
 {
   struct remote_state *rs = get_remote_state ();
   int i;
-  char buf[MAX_REGISTER_SIZE];
+  gdb_byte buf[MAX_REGISTER_SIZE];
 
   /* Make sure the entire registers array is valid.  */
   switch (remote_protocol_P.support)
@@ -3699,7 +3699,7 @@ remote_write_bytes (CORE_ADDR memaddr, c
 
   /* Append "<memaddr>".  */
   memaddr = remote_address_masked (memaddr);
-  p += hexnumstr (p, (ULONGEST) memaddr);
+  p += hexnumstr ((char *) p, (ULONGEST) memaddr);
 
   /* Append ",".  */
   *p++ = ',';
@@ -3707,7 +3707,7 @@ remote_write_bytes (CORE_ADDR memaddr, c
   /* Append <len>.  Retain the location/size of <len>.  It may need to
      be adjusted once the packet body has been created.  */
   plen = p;
-  plenlen = hexnumstr (p, (ULONGEST) todo);
+  plenlen = hexnumstr ((char *) p, (ULONGEST) todo);
   p += plenlen;
 
   /* Append ":".  */
@@ -3746,7 +3746,7 @@ remote_write_bytes (CORE_ADDR memaddr, c
 	     and we have actually sent fewer bytes than planned.
 	     Fix-up the length field of the packet.  Use the same
 	     number of characters as before.  */
-	  plen += hexnumnstr (plen, (ULONGEST) nr_bytes, plenlen);
+	  plen += hexnumnstr ((char *) plen, (ULONGEST) nr_bytes, plenlen);
 	  *plen = ':';  /* overwrite \0 from hexnumnstr() */
 	}
       break;
@@ -3754,7 +3754,7 @@ remote_write_bytes (CORE_ADDR memaddr, c
       /* Normal mode: Send target system values byte by byte, in
 	 increasing byte addresses.  Each byte is encoded as a two hex
 	 value.  */
-      nr_bytes = bin2hex (myaddr, p, todo);
+      nr_bytes = bin2hex (myaddr, (char *) p, todo);
       p += 2 * nr_bytes;
       break;
     case PACKET_SUPPORT_UNKNOWN:
@@ -3764,8 +3764,8 @@ remote_write_bytes (CORE_ADDR memaddr, c
       internal_error (__FILE__, __LINE__, _("bad switch"));
     }
 
-  putpkt_binary (buf, (int) (p - buf));
-  getpkt (buf, sizeof_buf, 0);
+  putpkt_binary ((char *) buf, (int) (p - buf));
+  getpkt ((char *) buf, sizeof_buf, 0);
 
   if (buf[0] == 'E')
     {
@@ -3885,9 +3885,9 @@ remote_xfer_memory (CORE_ADDR mem_addr, 
     return 0;
 
   if (should_write)
-    res = remote_write_bytes (targ_addr, buffer, targ_len);
+    res = remote_write_bytes (targ_addr, (char *) buffer, targ_len);
   else
-    res = remote_read_bytes (targ_addr, buffer, targ_len);
+    res = remote_read_bytes (targ_addr, (char *) buffer, targ_len);
 
   return res;
 }
@@ -5022,7 +5022,7 @@ remote_xfer_partial (struct target_ops *
 	      if (buf2[0] == 'O' && buf2[1] == 'K' && buf2[2] == '\0')
 		break;		/* Got EOF indicator.  */
 	      /* Got some data.  */
-	      i = hex2bin (buf2, readbuf, len);
+	      i = hex2bin (buf2, (char *) readbuf, len);
 	      if (i > 0)
 		{
 		  readbuf = (void *) ((char *) readbuf + i);
@@ -5079,9 +5079,9 @@ remote_xfer_partial (struct target_ops *
   if (i < 0)
     return i;
 
-  getpkt (readbuf, len, 0);
+  getpkt ((char *) readbuf, len, 0);
 
-  return strlen (readbuf);
+  return strlen ((char *) readbuf);
 }
 
 static void
diff -urNp gdb-6.3-old/gdb/source.c gdb-6.3/gdb/source.c
--- gdb-6.3-old/gdb/source.c	2005-08-04 16:01:42.453797416 -0500
+++ gdb-6.3/gdb/source.c	2005-08-05 07:57:11.252495288 -0500
@@ -90,7 +90,7 @@ static int current_source_line;
    and friends should be rewritten to count characters and see where
    things are wrapping, but that would be a fair amount of work.  */
 
-int lines_to_list = 10;
+unsigned int lines_to_list = 10;
 static void
 show_lines_to_list (struct ui_file *file, int from_tty,
 		    struct cmd_list_element *c, const char *value)
@@ -130,7 +130,7 @@ get_first_line_listed (void)
    calculate the end line and use it in the call to print_source_lines
    as it does not automatically use this value. */
 
-int
+unsigned int
 get_lines_to_list (void)
 {
   return lines_to_list;
@@ -1264,8 +1264,9 @@ print_source_lines_base (struct symtab *
 
 	      if (c1 != '\n')
 		printf_filtered ("^%c", c + 0100);
-	      if (c1 != EOF)
-		ungetc (c1, stream);
+	      if (c1 != EOF) {
+		int rc = ungetc (c1, stream);
+	      }
 	    }
 	  else
 	    {
diff -urNp gdb-6.3-old/gdb/source.h gdb-6.3/gdb/source.h
--- gdb-6.3-old/gdb/source.h	2005-08-04 16:01:42.453797416 -0500
+++ gdb-6.3/gdb/source.h	2005-08-05 07:16:16.253711832 -0500
@@ -45,7 +45,7 @@ extern int get_first_line_listed (void);
    cli "list".  The caller of print_source_lines must use this to
    calculate the end line and use it in the call to print_source_lines
    as it does not automatically use this value. */
-extern int get_lines_to_list (void);
+extern unsigned int get_lines_to_list (void);
 
 /* Return the current source file for listing and next line to list.
    NOTE: The returned sal pc and end fields are not valid. */
diff -urNp gdb-6.3-old/gdb/stabsread.c gdb-6.3/gdb/stabsread.c
--- gdb-6.3-old/gdb/stabsread.c	2005-08-04 16:01:42.491791640 -0500
+++ gdb-6.3/gdb/stabsread.c	2005-08-05 08:09:42.750250264 -0500
@@ -1794,7 +1794,7 @@ again:
 	  struct type *domain = read_type (pp, objfile);
 	  struct type *return_type;
 	  struct field *args;
-	  int nargs, varargs;
+	  int nargs = 0, varargs = 0;
 
 	  if (**pp != ',')
 	    /* Invalid member type data format.  */
diff -urNp gdb-6.3-old/gdb/symfile.c gdb-6.3/gdb/symfile.c
--- gdb-6.3-old/gdb/symfile.c	2005-08-04 16:01:42.439799544 -0500
+++ gdb-6.3/gdb/symfile.c	2005-08-05 08:00:49.990242096 -0500
@@ -1149,7 +1149,7 @@ separate_debug_file_exists (const char *
 {
   unsigned long file_crc = 0;
   int fd;
-  char buffer[8*1024];
+  gdb_byte buffer[8*1024];
   int count;
 
   fd = open (name, O_RDONLY | O_BINARY);
@@ -1586,7 +1586,7 @@ load_section_callback (bfd *abfd, asecti
 		     method to the target vector and then use
 		     that.  remote.c could implement that method
 		     using the ``qCRC'' packet.  */
-		  char *check = xmalloc (len);
+		  gdb_byte *check = xmalloc (len);
 		  struct cleanup *verify_cleanups =
 		    make_cleanup (xfree, check);
 
@@ -3496,7 +3496,7 @@ static void
 read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr, int len)
 {
   /* FIXME (alloca): Not safe if array is very large. */
-  char *buf = alloca (len * TARGET_LONG_BYTES);
+  gdb_byte *buf = alloca (len * TARGET_LONG_BYTES);
   int i;
 
   read_memory (memaddr, buf, len * TARGET_LONG_BYTES);
@@ -3536,7 +3536,7 @@ simple_read_overlay_table (void)
     = (void *) xmalloc (cache_novlys * sizeof (*cache_ovly_table));
   cache_ovly_table_base = SYMBOL_VALUE_ADDRESS (ovly_table_msym);
   read_target_long_array (cache_ovly_table_base,
-                          (int *) cache_ovly_table,
+                          (unsigned int *) cache_ovly_table,
                           cache_novlys * 4);
 
   return 1;			/* SUCCESS */
@@ -3598,7 +3598,7 @@ simple_overlay_update_1 (struct obj_sect
 	/* && cache_ovly_table[i][SIZE] == size */ )
       {
 	read_target_long_array (cache_ovly_table_base + i * TARGET_LONG_BYTES,
-				(int *) cache_ovly_table[i], 4);
+				cache_ovly_table[i], 4);
 	if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
 	    && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
 	    /* && cache_ovly_table[i][SIZE] == size */ )
diff -urNp gdb-6.3-old/gdb/target.c gdb-6.3/gdb/target.c
--- gdb-6.3-old/gdb/target.c	2005-08-04 16:01:42.525786472 -0500
+++ gdb-6.3/gdb/target.c	2005-08-05 07:33:27.196984632 -0500
@@ -1229,10 +1229,10 @@ target_xfer_memory_partial (CORE_ADDR me
     }
 
   if (region->attrib.cache)
-    res = dcache_xfer_memory (target_dcache, memaddr, myaddr,
+    res = dcache_xfer_memory (target_dcache, memaddr, (gdb_byte *) myaddr,
 			      reg_len, write_p);
   else
-    res = do_xfer_memory (memaddr, myaddr, reg_len, write_p,
+    res = do_xfer_memory (memaddr, (gdb_byte *) myaddr, reg_len, write_p,
 			  &region->attrib);
       
   if (res <= 0)
@@ -1431,7 +1431,7 @@ ULONGEST
 get_target_memory_unsigned (struct target_ops *ops,
 			    CORE_ADDR addr, int len)
 {
-  char buf[sizeof (ULONGEST)];
+  gdb_byte buf[sizeof (ULONGEST)];
 
   gdb_assert (len <= sizeof (buf));
   get_target_memory (ops, addr, buf, len);
diff -urNp gdb-6.3-old/gdb/top.c gdb-6.3/gdb/top.c
--- gdb-6.3-old/gdb/top.c	2005-08-04 16:01:42.508789056 -0500
+++ gdb-6.3/gdb/top.c	2005-08-05 08:21:44.882469480 -0500
@@ -1536,12 +1536,13 @@ Use \"on\" to enable the notification, a
 void
 gdb_init (char *argv0)
 {
+  char *cwd;
   if (pre_init_ui_hook)
     pre_init_ui_hook ();
 
   /* Run the init function of each source file */
 
-  getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
+  cwd = getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
   current_directory = gdb_dirbuf;
 
 #ifdef __MSDOS__
diff -urNp gdb-6.3-old/gdb/ui-file.c gdb-6.3/gdb/ui-file.c
--- gdb-6.3-old/gdb/ui-file.c	2005-08-04 16:01:42.510788752 -0500
+++ gdb-6.3/gdb/ui-file.c	2005-08-05 08:23:00.072038928 -0500
@@ -478,11 +478,12 @@ stdio_file_read (struct ui_file *file, c
 static void
 stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
 {
+  size_t rc;
   struct stdio_file *stdio = ui_file_data (file);
   if (stdio->magic != &stdio_file_magic)
     internal_error (__FILE__, __LINE__,
 		    _("stdio_file_write: bad magic number"));
-  fwrite (buf, length_buf, 1, stdio->file);
+  rc = fwrite (buf, length_buf, 1, stdio->file);
 }
 
 static void
diff -urNp gdb-6.3-old/gdb/utils.c gdb-6.3/gdb/utils.c
--- gdb-6.3-old/gdb/utils.c	2005-08-04 16:01:42.511788600 -0500
+++ gdb-6.3/gdb/utils.c	2005-08-05 08:22:17.217553800 -0500
@@ -701,6 +701,7 @@ internal_vproblem (struct internal_probl
   int quit_p;
   int dump_core_p;
   char *reason;
+  int rc;
 
   /* Don't allow infinite error/warning recursion.  */
   {
@@ -716,7 +717,7 @@ internal_vproblem (struct internal_probl
 	abort ();	/* NOTE: GDB has only three calls to abort().  */
       default:
 	dejavu = 3;
-	write (STDERR_FILENO, msg, sizeof (msg));
+	rc = write (STDERR_FILENO, msg, sizeof (msg));
 	exit (1);
       }
   }
diff -urNp gdb-6.3-old/gdb/valprint.c gdb-6.3/gdb/valprint.c
--- gdb-6.3-old/gdb/valprint.c	2005-08-04 16:01:42.524786624 -0500
+++ gdb-6.3/gdb/valprint.c	2005-08-05 07:21:21.890248016 -0500
@@ -957,7 +957,7 @@ partial_memory_read (CORE_ADDR memaddr, 
   int errcode;			/* Error from last read. */
 
   /* First try a complete read. */
-  errcode = target_read_memory (memaddr, myaddr, len);
+  errcode = target_read_memory (memaddr, (gdb_byte *) myaddr, len);
   if (errcode == 0)
     {
       /* Got it all. */
@@ -968,7 +968,7 @@ partial_memory_read (CORE_ADDR memaddr, 
       /* Loop, reading one byte at a time until we get as much as we can. */
       for (errcode = 0, nread = 0; len > 0 && errcode == 0; nread++, len--)
 	{
-	  errcode = target_read_memory (memaddr++, myaddr++, 1);
+	  errcode = target_read_memory (memaddr++, (gdb_byte *) myaddr++, 1);
 	}
       /* If an error, the last read was unsuccessful, so adjust count. */
       if (errcode != 0)
@@ -1078,7 +1078,7 @@ val_print_string (CORE_ADDR addr, int le
 	    {
 	      unsigned long c;
 
-	      c = extract_unsigned_integer (bufptr, width);
+	      c = extract_unsigned_integer ((gdb_byte *) bufptr, width);
 	      addr += width;
 	      bufptr += width;
 	      if (c == 0)
@@ -1109,13 +1109,13 @@ val_print_string (CORE_ADDR addr, int le
 
   if (len == -1 && !found_nul)
     {
-      char *peekbuf;
+      gdb_byte *peekbuf;
 
       /* We didn't find a null terminator we were looking for.  Attempt
          to peek at the next character.  If not successful, or it is not
          a null byte, then force ellipsis to be printed.  */
 
-      peekbuf = (char *) alloca (width);
+      peekbuf = (gdb_byte *) alloca (width);
 
       if (target_read_memory (addr, peekbuf, width) == 0
 	  && extract_unsigned_integer (peekbuf, width) != 0)
@@ -1140,7 +1140,7 @@ val_print_string (CORE_ADDR addr, int le
 	{
 	  fputs_filtered (" ", stream);
 	}
-      LA_PRINT_STRING (stream, buffer, (bufptr - buffer) / width, width, force_ellipsis);
+      LA_PRINT_STRING (stream, (gdb_byte *) buffer, (bufptr - buffer) / width, width, force_ellipsis);
     }
 
   if (errcode != 0)
diff -urNp gdb-6.3-old/gdb/value.c gdb-6.3/gdb/value.c
--- gdb-6.3-old/gdb/value.c	2005-08-04 16:01:42.525786472 -0500
+++ gdb-6.3/gdb/value.c	2005-08-05 07:17:49.551528408 -0500
@@ -1075,7 +1075,7 @@ unpack_double (struct type *type, const 
          Hopefully someone will add both the missing floatformat
          definitions and the new cases for floatformat_is_valid ().  */
 
-      if (!floatformat_is_valid (floatformat_from_type (type), valaddr))
+      if (!floatformat_is_valid (floatformat_from_type (type), (char *)valaddr))
 	{
 	  *invp = 1;
 	  return 0.0;


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