PR 9923
[deliverable/binutils-gdb.git] / bfd / archive.c
index 5389f7adcc5b983850c4f9a596f834871d528292..437a0859eaccbb01583382925420e9b737b17d86 100644 (file)
@@ -1233,7 +1233,7 @@ _bfd_slurp_extended_name_table (bfd *abfd)
        char *limit = temp + namedata->parsed_size;
        for (; temp < limit; ++temp)
          {
-           if (*temp == ARFMAG[0])
+           if (*temp == ARFMAG[1])
              temp[temp > ext_names && temp[-1] == '/' ? -1 : 0] = '\0';
            if (*temp == '\\')
              *temp = '/';
@@ -1564,11 +1564,11 @@ _bfd_construct_extended_name_table (bfd *abfd,
             {
              strcpy (strptr, normal);
              if (! trailing_slash)
-               strptr[thislen] = ARFMAG[0];
+               strptr[thislen] = ARFMAG[1];
              else
                {
                  strptr[thislen] = '/';
-                 strptr[thislen + 1] = ARFMAG[0];
+                 strptr[thislen + 1] = ARFMAG[1];
                }
              stroff = strptr - *tabloc;
              last_stroff = stroff;
@@ -1982,7 +1982,7 @@ _bfd_write_archive_contents (bfd *arch)
        return FALSE;
       if ((elength % 2) == 1)
        {
-         if (bfd_bwrite (ARFMAG, 1, arch) != 1)
+         if (bfd_bwrite (&ARFMAG[1], 1, arch) != 1)
            return FALSE;
        }
     }
@@ -2024,7 +2024,7 @@ _bfd_write_archive_contents (bfd *arch)
 
       if ((arelt_size (current) % 2) == 1)
        {
-         if (bfd_bwrite (ARFMAG, 1, arch) != 1)
+         if (bfd_bwrite (&ARFMAG[1], 1, arch) != 1)
            return FALSE;
        }
     }
@@ -2311,7 +2311,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
       /* Can't read mod time for some reason.  */
       return TRUE;
     }
-  if (archstat.st_mtime <= bfd_ardata (arch)->armap_timestamp)
+  if (((long) archstat.st_mtime) <= bfd_ardata (arch)->armap_timestamp)
     /* OK by the linker's rules.  */
     return TRUE;
 
This page took 0.026033 seconds and 4 git commands to generate.