-Wimplicit-fallthrough warning fixes
[deliverable/binutils-gdb.git] / bfd / srec.c
index 8de6e425cb8ad4d86bad4bd83bdaa0a9e203d5ee..3197ec05b24b2dacc9d1cbc303962dc374d5efed 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for s-record objects.
-   Copyright (C) 1990-2014 Free Software Foundation, Inc.
+   Copyright (C) 1990-2016 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -249,13 +249,13 @@ srec_bad_byte (bfd *abfd,
       char buf[40];
 
       if (! ISPRINT (c))
-       sprintf (buf, "\\%03o", (unsigned int) c);
+       sprintf (buf, "\\%03o", (unsigned int) c & 0xff);
       else
        {
          buf[0] = c;
          buf[1] = '\0';
        }
-      (*_bfd_error_handler)
+      _bfd_error_handler
        (_("%B:%d: Unexpected character `%s' in S-record file\n"),
         abfd, lineno, buf);
       bfd_set_error (bfd_error_bad_value);
@@ -483,8 +483,8 @@ srec_scan (bfd *abfd)
              min_bytes = 5;
            if (bytes < min_bytes)
              {
-               (*_bfd_error_handler) (_("%B:%d: byte count %d too small\n"),
-                                      abfd, lineno, bytes);
+               _bfd_error_handler (_("%B:%d: byte count %d too small\n"),
+                                   abfd, lineno, bytes);
                bfd_set_error (bfd_error_bad_value);
                goto error_return;
              }
@@ -574,7 +574,7 @@ srec_scan (bfd *abfd)
                check_sum = 255 - (check_sum & 0xff);
                if (check_sum != HEX (data))
                  {
-                   (*_bfd_error_handler)
+                   _bfd_error_handler
                      (_("%B:%d: Bad checksum in S-record file\n"),
                       abfd, lineno);
                    bfd_set_error (bfd_error_bad_value);
@@ -607,7 +607,7 @@ srec_scan (bfd *abfd)
                check_sum = 255 - (check_sum & 0xff);
                if (check_sum != HEX (data))
                  {
-                   (*_bfd_error_handler)
+                   _bfd_error_handler
                      (_("%B:%d: Bad checksum in S-record file\n"),
                       abfd, lineno);
                    bfd_set_error (bfd_error_bad_value);
@@ -972,10 +972,12 @@ srec_write_record (bfd *abfd,
     case 7:
       TOHEX (dst, (address >> 24), check_sum);
       dst += 2;
+      /* Fall through.  */
     case 8:
     case 2:
       TOHEX (dst, (address >> 16), check_sum);
       dst += 2;
+      /* Fall through.  */
     case 9:
     case 1:
     case 0:
@@ -1275,10 +1277,10 @@ srec_print_symbol (bfd *abfd,
 #define srec_bfd_link_hash_table_create           _bfd_generic_link_hash_table_create
 #define srec_bfd_link_add_symbols                 _bfd_generic_link_add_symbols
 #define srec_bfd_link_just_syms                   _bfd_generic_link_just_syms
-#define srec_bfd_copy_link_hash_symbol_type \
-  _bfd_generic_copy_link_hash_symbol_type
+#define srec_bfd_copy_link_hash_symbol_type       _bfd_generic_copy_link_hash_symbol_type
 #define srec_bfd_final_link                       _bfd_generic_final_link
 #define srec_bfd_link_split_section               _bfd_generic_link_split_section
+#define srec_bfd_link_check_relocs                _bfd_generic_link_check_relocs
 
 const bfd_target srec_vec =
 {
This page took 0.024564 seconds and 4 git commands to generate.