]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
-Wimplicit-fallthrough noreturn fixes
authorAlan Modra <amodra@gmail.com>
Wed, 5 Oct 2016 06:14:07 +0000 (16:44 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 5 Oct 2016 23:10:30 +0000 (09:40 +1030)
binutils/
* cxxfilt.c (usage): Add ATTRIBUTE_NORETURN.
* elfedit.c (usage): Likewise.
* nm.c (usage): Likewise.
* objcopy.c (copy_usage, strip_usage): Likewise.
* srconv.c (show_usage): Likewise.
* strings.c (usage): Likewise.
* sysdump.c (show_usage): Likewise.
* srconv.c: Remove unneeded forward function declarations.
* strings.c: Likewise.
* sysdump.c: Likewise.
gas/
* as.h (as_assert): Add ATTRIBUTE_NORETURN.

binutils/ChangeLog
binutils/cxxfilt.c
binutils/elfedit.c
binutils/nm.c
binutils/objcopy.c
binutils/srconv.c
binutils/strings.c
binutils/sysdump.c
gas/ChangeLog
gas/as.h

index bef5ec0a2acaff295666c66d1552fe94363915db..4380b6381dd2611e2922df0de6051131cca52480 100644 (file)
@@ -1,3 +1,16 @@
+2016-10-06  Alan Modra  <amodra@gmail.com>
+
+       * cxxfilt.c (usage): Add ATTRIBUTE_NORETURN.
+       * elfedit.c (usage): Likewise.
+       * nm.c (usage): Likewise.
+       * objcopy.c (copy_usage, strip_usage): Likewise.
+       * srconv.c (show_usage): Likewise.
+       * strings.c (usage): Likewise.
+       * sysdump.c (show_usage): Likewise.
+       * srconv.c: Remove unneeded forward function declarations.
+       * strings.c: Likewise.
+       * sysdump.c: Likewise.
+
 2016-10-06  Alan Modra  <amodra@gmail.com>
 
        * coffdump.c (dump_coff_where): Add missing break.
index 5a3b3340687feebe72f2c3a6098ce222327b73cc..d5863ee962278c1ebfecf3608d7c285c01de794b 100644 (file)
@@ -87,7 +87,7 @@ print_demangler_list (FILE *stream)
   fprintf (stream, "}");
 }
 
-static void
+ATTRIBUTE_NORETURN static void
 usage (FILE *stream, int status)
 {
   fprintf (stream, "\
index 1223b25a657ba2073027e4c9cfe844828ff6d60b..20c5043c9aaf4fc95ee0ebb6824cf8f0d52ca046 100644 (file)
@@ -655,7 +655,7 @@ static struct option options[] =
   {0,                  no_argument, 0, 0}
 };
 
-static void
+ATTRIBUTE_NORETURN static void
 usage (FILE *stream, int exit_status)
 {
   fprintf (stream, _("Usage: %s <option(s)> elffile(s)\n"),
index 1fdfae1492738afe53e68bb022ca0a3db9f99a59..6d887485cba2c754ec82b8b97039c948fa11de34 100644 (file)
@@ -231,7 +231,7 @@ static struct option long_options[] =
 \f
 /* Some error-reporting functions.  */
 
-static void
+ATTRIBUTE_NORETURN static void
 usage (FILE *stream, int status)
 {
   fprintf (stream, _("Usage: %s [option(s)] [file(s)]\n"), program_name);
index 2e8ff274a048e2b98cea4d3a54ce18561518d5f5..9a64ec30e652f1e9370f1a271b612010287f2495 100644 (file)
@@ -512,7 +512,7 @@ static bfd_boolean write_debugging_info (bfd *, void *, long *, asymbol ***);
 static const char *lookup_sym_redefinition (const char *);
 static const char *find_section_rename (const char *, flagword *);
 \f
-static void
+ATTRIBUTE_NORETURN static void
 copy_usage (FILE *stream, int exit_status)
 {
   fprintf (stream, _("Usage: %s [option(s)] in-file [out-file]\n"), program_name);
@@ -646,7 +646,7 @@ copy_usage (FILE *stream, int exit_status)
   exit (exit_status);
 }
 
-static void
+ATTRIBUTE_NORETURN static void
 strip_usage (FILE *stream, int exit_status)
 {
   fprintf (stream, _("Usage: %s <option(s)> in-file(s)\n"), program_name);
index 0d1dcd8b453dfb07c337a7507d05cbd1a5278d01..9df325b7ebf3fc1cbecd6ce8bb139375b74caf0d 100644 (file)
@@ -43,52 +43,12 @@ static int addrsize;
 static char *toolname;
 static char **rnames;
 
-static int get_member_id (int);
-static int get_ordinary_id (int);
-static char *section_translate (char *);
-static char *strip_suffix (const char *);
-static void checksum (FILE *, unsigned char *, int, int);
-static void writeINT (int, unsigned char *, int *, int, FILE *);
-static void writeBITS (int, unsigned char *, int *, int);
-static void writeBARRAY (barray, unsigned char *, int *, int, FILE *);
-static void writeCHARS (char *, unsigned char *, int *, int, FILE *);
-static void wr_tr (void);
-static void wr_un (struct coff_ofile *, struct coff_sfile *, int, int);
-static void wr_hd (struct coff_ofile *);
-static void wr_sh (struct coff_ofile *, struct coff_section *);
-static void wr_ob (struct coff_ofile *, struct coff_section *);
-static void wr_rl (struct coff_ofile *, struct coff_section *);
-static void wr_object_body (struct coff_ofile *);
-static void wr_dps_start
-  (struct coff_sfile *, struct coff_section *, struct coff_scope *, int, int);
-static void wr_dps_end (struct coff_section *, struct coff_scope *, int);
-static int *nints (int);
-static void walk_tree_type_1
-  (struct coff_sfile *, struct coff_symbol *, struct coff_type *, int);
-static void walk_tree_type
-  (struct coff_sfile *, struct coff_symbol *, struct coff_type *, int);
 static void walk_tree_symbol
   (struct coff_sfile *, struct coff_section *, struct coff_symbol *, int);
 static void walk_tree_scope
   (struct coff_section *, struct coff_sfile *, struct coff_scope *, int, int);
-static void walk_tree_sfile (struct coff_section *, struct coff_sfile *);
-static void wr_program_structure (struct coff_ofile *, struct coff_sfile *);
-static void wr_du (struct coff_ofile *, struct coff_sfile *, int);
-static void wr_dus (struct coff_ofile *, struct coff_sfile *);
 static int find_base (struct coff_sfile *, struct coff_section *);
-static void wr_dln (struct coff_ofile *, struct coff_sfile *, int);
 static void wr_globals (struct coff_ofile *, struct coff_sfile *, int);
-static void wr_debug (struct coff_ofile *);
-static void wr_cs (void);
-static int wr_sc (struct coff_ofile *, struct coff_sfile *);
-static void wr_er (struct coff_ofile *, struct coff_sfile *, int);
-static void wr_ed (struct coff_ofile *, struct coff_sfile *, int);
-static void wr_unit_info (struct coff_ofile *);
-static void wr_module (struct coff_ofile *);
-static int align (int);
-static void prescan (struct coff_ofile *);
-static void show_usage (FILE *, int);
-extern int main (int, char **);
 
 static FILE *file;
 static bfd *abfd;
@@ -1732,7 +1692,7 @@ prescan (struct coff_ofile *otree)
 
 char *program_name;
 
-static void
+ATTRIBUTE_NORETURN static void
 show_usage (FILE *ffile, int status)
 {
   fprintf (ffile, _("Usage: %s [option(s)] in-file [out-file]\n"), program_name);
index bc49bec137d5c131c007fc4c1f84d3642324c828..58b7e8ab13d4ed03ab774cde22d79a895c73b9d3 100644 (file)
@@ -146,12 +146,9 @@ typedef struct
   bfd_size_type filesize;
 } filename_and_size_t;
 
-static void strings_a_section (bfd *, asection *, void *);
-static bfd_boolean strings_object_file (const char *);
 static bfd_boolean strings_file (char *);
 static void print_strings (const char *, FILE *, file_ptr, int, int, char *);
-static void usage (FILE *, int);
-static long get_char (FILE *, file_ptr *, int *, char **);
+static void usage (FILE *, int) ATTRIBUTE_NORETURN;
 \f
 int main (int, char **);
 
index 37ad6030f36131e2743dd82c2640717fbfecc6a0..5976fac53fb312126f072070afd252b6e9e6f7bc 100644 (file)
@@ -38,21 +38,7 @@ static int code;
 static int addrsize = 4;
 static FILE *file;
 
-static void dh (unsigned char *, int);
-static void itheader (char *, int);
-static void p (void);
-static void tabout (void);
-static void pbarray (barray *);
-static int getone (int);
-static int opt (int);
-static void must (int);
-static void tab (int, char *);
-static void dump_symbol_info (void);
 static void derived_type (void);
-static void module (void);
-static void show_usage (FILE *, int);
-
-extern int main (int, char **);
 
 static char *
 getCHARS (unsigned char *ptr, int *idx, int size, int max)
@@ -649,7 +635,7 @@ module (void)
 
 char *program_name;
 
-static void
+ATTRIBUTE_NORETURN static void
 show_usage (FILE *ffile, int status)
 {
   fprintf (ffile, _("Usage: %s [option(s)] in-file\n"), program_name);
index 80ab144d3facdc5feee07003e9f39a94cb397637..5ccc133e92b7072a2dbc1fa1c6c366d91894fc83 100644 (file)
@@ -1,3 +1,7 @@
+2016-10-06  Alan Modra  <amodra@gmail.com>
+
+       * as.h (as_assert): Add ATTRIBUTE_NORETURN.
+
 2016-10-06  Alan Modra  <amodra@gmail.com>
 
        * config/tc-arc.c (find_opcode_match): Add missing break.
index 169c714adb2cb61bd2bcaec792397f9b31ab1d81..9fa93892eb5a917dae6cc50750590acc68d2aecd 100644 (file)
--- a/gas/as.h
+++ b/gas/as.h
@@ -459,7 +459,7 @@ PRINTF_LIKE (as_warn);
 PRINTF_WHERE_LIKE (as_bad_where);
 PRINTF_WHERE_LIKE (as_warn_where);
 
-void   as_assert (const char *, int, const char *);
+void   as_assert (const char *, int, const char *) ATTRIBUTE_NORETURN;
 void   as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
 void   sprint_value (char *, addressT);
 int    had_errors (void);