This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

warning patch


Another warning patch committed.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.


binutils/ChangeLog
2000-07-10  David Huggins-Daines  <dhd@linuxcare.com>

	* stabs.c (parse_stab_range_type): Cast to proper type to fix
	warning.

2000-07-10  Ryan Bradetich  <rbradetich@uswest.net>

	* readelf.c (get_dynamic_data): Add casts and use unsigned chars
	to fix warnings.
	(process_symbol_table): Ditto.
	(procesS_extended_line_op): Ditto.
	(display_debug_lines): Ditto.
	(display_debug_pubnames): Ditto.
	(read_and_display_attr): Ditto.

Index: binutils/readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.60
diff -u -p -r1.60 readelf.c
--- readelf.c	2000/06/19 01:22:37	1.60
+++ readelf.c	2000/07/10 13:23:57
@@ -4230,10 +4230,10 @@ get_dynamic_data (file, number)
      FILE *       file;
      unsigned int number;
 {
-  char * e_data;
+  unsigned char * e_data;
   int *  i_data;
 
-  e_data = (char *) malloc (number * 4);
+  e_data = (unsigned char *) malloc (number * 4);
 
   if (e_data == NULL)
     {
@@ -4270,8 +4270,8 @@ process_symbol_table (file)
      FILE * file;
 {
   Elf32_Internal_Shdr *   section;
-  char   nb [4];
-  char   nc [4];
+  unsigned char   nb [4];
+  unsigned char   nc [4];
   int    nbuckets = 0;
   int    nchains = 0;
   int *  buckets = NULL;
@@ -4885,7 +4885,7 @@ process_extended_line_op (data, is_stmt,
 
       printf (_("   %d\t"), ++ state_machine_regs.last_file_entry);
       name = data;
-      data += strlen (data) + 1;
+      data += strlen ((char *) data) + 1;
       printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
       data += bytes_read;
       printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
@@ -4990,7 +4990,7 @@ display_debug_lines (section, start, fil
 	    {
 	      printf (_("  %s\n"), data);
 
-	      data += strlen (data) + 1;
+	      data += strlen ((char *) data) + 1;
 	    }
 	}
 
@@ -5007,13 +5007,13 @@ display_debug_lines (section, start, fil
 
 	  while (* data != 0)
 	    {
-	      char * name;
+	      unsigned char * name;
 	      int bytes_read;
 
 	      printf (_("  %d\t"), ++ state_machine_regs.last_file_entry);
 	      name = data;
 
-	      data += strlen (data) + 1;
+	      data += strlen ((char *) data) + 1;
 
 	      printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
 	      data += bytes_read;
@@ -5183,7 +5183,7 @@ display_debug_pubnames (section, start, 
 	    {
 	      data += 4;
 	      printf ("    %ld\t\t%s\n", offset, data);
-	      data += strlen (data) + 1;
+	      data += strlen ((char *) data) + 1;
 	    }
 	}
       while (offset != 0);
@@ -6008,7 +6008,7 @@ read_and_display_attr (attribute, form, 
 
     case DW_FORM_string:
       printf (" %s", data);
-      data += strlen (data) + 1;
+      data += strlen ((char *) data) + 1;
       break;
 
     case DW_FORM_block:
Index: binutils/stabs.c
===================================================================
RCS file: /cvs/src/src/binutils/stabs.c,v
retrieving revision 1.5
diff -u -p -r1.5 stabs.c
--- stabs.c	2000/07/01 10:00:05	1.5
+++ stabs.c	2000/07/10 13:24:07
@@ -1,5 +1,5 @@
 /* stabs.c -- Parse stabs debugging information
-   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com>.
 
    This file is part of GNU Binutils.
@@ -1822,7 +1822,7 @@ parse_stab_range_type (dhandle, info, ty
 	  else if (n3 == (bfd_signed_vma) 0xffffffff)
 	    return debug_make_int_type (dhandle, 4, true);
 #ifdef BFD64
-	  else if (n3 == ((((bfd_vma) 0xffffffff) << 32) | 0xffffffff))
+	  else if (n3 == ((((bfd_signed_vma) 0xffffffff) << 32) | 0xffffffff))
 	    return debug_make_int_type (dhandle, 8, true);
 #endif
 	}


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