OSDN Git Service

2010-06-09 Kai Tietz <kai.tietz@onevision.com>
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 Jun 2010 13:57:42 +0000 (13:57 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 Jun 2010 13:57:42 +0000 (13:57 +0000)
        * lto.c (lto_resolution_read):  Pre-initialize local variable r.
        * lto-coff.c (coff_write_object_file): Add braces to if.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160475 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/lto/ChangeLog
gcc/lto/lto-coff.c
gcc/lto/lto.c

index f021ba8..0da0eca 100644 (file)
@@ -1,3 +1,8 @@
+2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
+
+       * lto.c (lto_resolution_read):  Pre-initialize local variable r.
+       * lto-coff.c (coff_write_object_file): Add braces to if.
+
 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
 
        * lto.c (lto_read_in_decl_state): Use typed GC allocation.
index 0eca893..1f4264e 100644 (file)
@@ -770,12 +770,14 @@ coff_write_object_file (lto_coff_file *coff_file)
       if (!write_err)
        write_err = (write (coff_file->fd, outlen, 4) != 4);
       if (stringsec)
-       COFF_FOR_ALL_DATA(stringsec, data)
-         if (!write_err)
-       write_err = (write (coff_file->fd, data->d_buf, data->d_size)
-                       != data->d_size);
-       else
-         break;
+       {
+         COFF_FOR_ALL_DATA(stringsec, data)
+           if (!write_err)
+             write_err = (write (coff_file->fd, data->d_buf, data->d_size)
+                          != data->d_size);
+           else
+             break;
+       }
     }
 
   return write_err;
index 721d8fb..740a8b8 100644 (file)
@@ -317,7 +317,7 @@ lto_resolution_read (FILE *resolution, lto_file *file)
       int t;
       unsigned index;
       char r_str[27];
-      enum ld_plugin_symbol_resolution r;
+      enum ld_plugin_symbol_resolution r = (enum ld_plugin_symbol_resolution) 0;
       unsigned int j;
       unsigned int lto_resolution_str_len =
        sizeof (lto_resolution_str) / sizeof (char *);