Fix some gcc -Wall warnings:
authorIan Lance Taylor <ian@airs.com>
Sat, 28 Mar 1998 22:45:56 +0000 (22:45 +0000)
committerIan Lance Taylor <ian@airs.com>
Sat, 28 Mar 1998 22:45:56 +0000 (22:45 +0000)
* nlmconv.c (main): Add casts to avoid warnings.
(alpha_mangle_relocs): Likewise.
* objdump.c (dump_section_stabs): Likewise.
* size.c (print_sysv_format): Likewise.
* srcconv.c (wr_ob): Likewise.
* wrstabs.c (stab_modify_type): Likewise.
(stab_variable): Likewise.
* nlmconv.c (main): Initialize variables to avoid warnings.
* nm.c (sort_symbols_by_size): Likewise.
* objdump.c (disassemble_bytes): Likewise.
* wrstabs.c (stab_end_class_type): Likewise.
* coffgrok.c (do_sections_p2): Change j to unsigned int.
(do_lines): Change l to unsigned int.
* nlmheader.y (yylex): Change i to unsigned int.
* nm.c (print_symbol): Change j to long.
* size.c (lprint_number): Comment out.
* srconv.c (wr_ob): Change i to bfd_size_type.
* sysdump.c (unit_info_list): Comment out.
(object_body_list, program_structure, debug_list): Likewise.
* sysinfo.y (yyerror): Return value.

binutils/ChangeLog
binutils/coffgrok.c

index 45a03d4096a1551b872cc1fe2e160f7d7b4f0ee0..b5311623a9f6197d1959e5a2d583e007fba0529a 100644 (file)
@@ -1,3 +1,27 @@
+Sat Mar 28 17:39:27 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       Fix some gcc -Wall warnings:
+       * nlmconv.c (main): Add casts to avoid warnings.
+       (alpha_mangle_relocs): Likewise.
+       * objdump.c (dump_section_stabs): Likewise.
+       * size.c (print_sysv_format): Likewise.
+       * srcconv.c (wr_ob): Likewise.
+       * wrstabs.c (stab_modify_type): Likewise.
+       (stab_variable): Likewise.
+       * nlmconv.c (main): Initialize variables to avoid warnings.
+       * nm.c (sort_symbols_by_size): Likewise.
+       * objdump.c (disassemble_bytes): Likewise.
+       * wrstabs.c (stab_end_class_type): Likewise.
+       * coffgrok.c (do_sections_p2): Change j to unsigned int.
+       (do_lines): Change l to unsigned int.
+       * nlmheader.y (yylex): Change i to unsigned int.
+       * nm.c (print_symbol): Change j to long.
+       * size.c (lprint_number): Comment out.
+       * srconv.c (wr_ob): Change i to bfd_size_type.
+       * sysdump.c (unit_info_list): Comment out.
+       (object_body_list, program_structure, debug_list): Likewise.
+       * sysinfo.y (yyerror): Return value.
+
 Thu Mar 26 17:06:51 1998  Richard Henderson  <rth@cygnus.com>
 
        * defparse.y (explist): Allow epsilon.
index 209467785486e61b1014c2db56b996ee0b5bcda4..88a6572ccd15761af7846bf21c59f0d33ace20fc 100644 (file)
@@ -166,7 +166,8 @@ do_sections_p2 (head)
   asection *section;
   for (section = abfd->sections; section; section = section->next)
     {
-      int j;
+      unsigned int j;
+
       for (j = 0; j < section->reloc_count; j++)
        {
          int idx;
@@ -248,7 +249,8 @@ do_lines (i, name)
 {
   struct coff_line *res = (struct coff_line *) xcalloc (sizeof (struct coff_line), 1);
   asection *s;
-  int l;
+  unsigned int l;
+
   /* Find out if this function has any line numbers in the table */
   for (s = abfd->sections; s; s = s->next)
     {