[ARC] Update test.
[deliverable/binutils-gdb.git] / binutils / ieee.c
index 34b937342e0ee4b8d6ee8dd1c2d0daf9af90ddcb..4cf2b1d7121a3f47265157cfb14626d40bbbe97b 100644 (file)
@@ -1,6 +1,5 @@
 /* ieee.c -- Read and write IEEE-695 debugging information.
-   Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007,
-   2008, 2009, 2010  Free Software Foundation, Inc.
+   Copyright (C) 1996-2016 Free Software Foundation, Inc.
    Written by Ian Lance Taylor <ian@cygnus.com>.
 
    This file is part of GNU Binutils.
@@ -2955,7 +2954,7 @@ ieee_read_cxx_class (struct ieee_info *info, const bfd_byte **pp,
              {
                debug_type return_type;
                const debug_type *arg_types;
-               bfd_boolean varargs;
+               bfd_boolean varargs = FALSE;
 
                if (debug_get_type_kind (dhandle, pv->type)
                    != DEBUG_KIND_FUNCTION)
@@ -4938,7 +4937,7 @@ ieee_finish_compilation_unit (struct ieee_handle *info)
       if (! ieee_change_buffer (info, &info->linenos)
          || ! ieee_write_byte (info, (int) ieee_be_record_enum))
        return FALSE;
-      if (strcmp (info->filename, info->lineno_filename) != 0)
+      if (filename_cmp (info->filename, info->lineno_filename) != 0)
        {
          /* We were not in the main file.  We just closed the
              included line number block, and now we must close the
@@ -5125,7 +5124,10 @@ ieee_add_bb11 (struct ieee_handle *info, asection *sec, bfd_vma low,
          || ! ieee_write_id (info, "")
          || ! ieee_write_number (info, 0)
          || ! ieee_write_id (info, "GNU objcopy"))
-       return FALSE;
+       {
+         free (c);
+         return FALSE;
+       }
 
       free (c);
     }
@@ -5529,7 +5531,10 @@ ieee_function_type (void *p, int argcount, bfd_boolean varargs)
       || ! ieee_write_number (info, 0)
       || ! ieee_write_number (info, retindx)
       || ! ieee_write_number (info, (bfd_vma) argcount + (varargs ? 1 : 0)))
-    return FALSE;
+    {
+      free (args);
+      return FALSE;
+    }
   if (argcount > 0)
     {
       for (i = 0; i < argcount; i++)
@@ -6235,7 +6240,10 @@ ieee_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean is_virtual,
          || ! ieee_write_id (info, fname)
          || ! ieee_write_number (info, bindx)
          || ! ieee_write_number (info, bitpos / 8))
-       return FALSE;
+       {
+         free (fname);
+         return FALSE;
+       }
       flags = 0;
     }
 
@@ -6250,7 +6258,10 @@ ieee_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean is_virtual,
       || ! ieee_write_atn65 (info, nindx, bname)
       || ! ieee_write_asn (info, nindx, 0)
       || ! ieee_write_atn65 (info, nindx, fname))
-    return FALSE;
+    {
+      free (fname);
+      return FALSE;
+    }
   info->type_stack->type.classdef->pmisccount += 5;
 
   free (fname);
@@ -7339,15 +7350,17 @@ ieee_lineno (void *p, const char *filename, unsigned long lineno, bfd_vma addr)
          info->lineno_filename = info->filename;
        }
 
-      if (strcmp (info->pending_lineno_filename, info->lineno_filename) != 0)
+      if (filename_cmp (info->pending_lineno_filename,
+                       info->lineno_filename) != 0)
        {
-         if (strcmp (info->filename, info->lineno_filename) != 0)
+         if (filename_cmp (info->filename, info->lineno_filename) != 0)
            {
              /* We were not in the main file.  Close the block for the
                 included file.  */
              if (! ieee_write_byte (info, (int) ieee_be_record_enum))
                return FALSE;
-             if (strcmp (info->filename, info->pending_lineno_filename) == 0)
+             if (filename_cmp (info->filename,
+                               info->pending_lineno_filename) == 0)
                {
                  /* We need a new NN record, and we aren't about to
                     output one.  */
@@ -7359,7 +7372,8 @@ ieee_lineno (void *p, const char *filename, unsigned long lineno, bfd_vma addr)
                    return FALSE;
                }
            }
-         if (strcmp (info->filename, info->pending_lineno_filename) != 0)
+         if (filename_cmp (info->filename,
+                           info->pending_lineno_filename) != 0)
            {
              /* We are not changing to the main file.  Open a block for
                 the new included file.  */
This page took 0.066197 seconds and 4 git commands to generate.