-Wimplicit-fallthrough noreturn fixes

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.
This commit is contained in:
Alan Modra 2016-10-05 16:44:07 +10:30
parent 2b80414579
commit 1e0f0b4d01
10 changed files with 26 additions and 66 deletions

View 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.

View 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, "\

View 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"),

View File

@ -231,7 +231,7 @@ static struct option long_options[] =
/* 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);

View 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 *);
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);

View 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);

View 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;
int main (int, char **);

View 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);

View 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.

View File

@ -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);