aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-10-05 16:44:07 +1030
committerAlan Modra <amodra@gmail.com>2016-10-06 09:40:30 +1030
commit1e0f0b4d0191263e35d81a3670d56bf639be274a (patch)
tree28044a8a1465af050024a631369d532e8a8f162f /binutils
parent2b804145796e948fa4c025c07eb201e700281e6b (diff)
downloadgdb-1e0f0b4d0191263e35d81a3670d56bf639be274a.zip
gdb-1e0f0b4d0191263e35d81a3670d56bf639be274a.tar.gz
gdb-1e0f0b4d0191263e35d81a3670d56bf639be274a.tar.bz2
-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.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog13
-rw-r--r--binutils/cxxfilt.c2
-rw-r--r--binutils/elfedit.c2
-rw-r--r--binutils/nm.c2
-rw-r--r--binutils/objcopy.c4
-rw-r--r--binutils/srconv.c42
-rw-r--r--binutils/strings.c5
-rw-r--r--binutils/sysdump.c16
8 files changed, 21 insertions, 65 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index bef5ec0..4380b63 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,18 @@
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.
* stabs.c (stab_xcoff_builtin_type): Likewise.
diff --git a/binutils/cxxfilt.c b/binutils/cxxfilt.c
index 5a3b334..d5863ee 100644
--- a/binutils/cxxfilt.c
+++ b/binutils/cxxfilt.c
@@ -87,7 +87,7 @@ print_demangler_list (FILE *stream)
fprintf (stream, "}");
}
-static void
+ATTRIBUTE_NORETURN static void
usage (FILE *stream, int status)
{
fprintf (stream, "\
diff --git a/binutils/elfedit.c b/binutils/elfedit.c
index 1223b25..20c5043 100644
--- a/binutils/elfedit.c
+++ b/binutils/elfedit.c
@@ -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"),
diff --git a/binutils/nm.c b/binutils/nm.c
index 1fdfae1..6d88748 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -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);
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 2e8ff27..9a64ec3 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -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);
diff --git a/binutils/srconv.c b/binutils/srconv.c
index 0d1dcd8..9df325b 100644
--- a/binutils/srconv.c
+++ b/binutils/srconv.c
@@ -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);
diff --git a/binutils/strings.c b/binutils/strings.c
index bc49bec..58b7e8a 100644
--- a/binutils/strings.c
+++ b/binutils/strings.c
@@ -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 **);
diff --git a/binutils/sysdump.c b/binutils/sysdump.c
index 37ad603..5976fac 100644
--- a/binutils/sysdump.c
+++ b/binutils/sysdump.c
@@ -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);