From: Alan Modra Date: Sun, 28 Mar 2021 23:17:16 +0000 (+1030) Subject: binutils int vs bfd_boolean fixes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1be305ffcd43050184097a8f41445c85a4b1a411;p=binutils-gdb.git binutils int vs bfd_boolean fixes * objdump.c (process_links): Use type int. * readelf.c (request_dump): Don't increment do_dump, set it. * windint.h (target_is_bigendian): Use type bfd_boolean. * windmc.c (target_is_bigendian): Likewise. * windres.c (target_is_bigendian): Likewise. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 461a1f5c66e..f532e1cd60c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,6 +1,15 @@ +2021-03-29 Alan Modra + + * objdump.c (process_links): Use type int. + * readelf.c (request_dump): Don't increment do_dump, set it. + * windint.h (target_is_bigendian): Use type bfd_boolean. + * windmc.c (target_is_bigendian): Likewise. + * windres.c (target_is_bigendian): Likewise. + 2021-03-22 Martin Liska - * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ with startswith. + * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ + with startswith. * emul_aix.c (ar_emul_aix_parse_arg): Likewise. * objcopy.c (is_mergeable_note_section): Likewise. * objdump.c (dump_dwarf_section): Likewise. diff --git a/binutils/objdump.c b/binutils/objdump.c index cb5ce5b057c..7d8f9d7bde0 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -128,7 +128,7 @@ static const char * source_comment; /* --source_comment. */ static bfd_boolean visualize_jumps = FALSE; /* --visualize-jumps. */ static bfd_boolean color_output = FALSE; /* --visualize-jumps=color. */ static bfd_boolean extended_color_output = FALSE; /* --visualize-jumps=extended-color. */ -static bfd_boolean process_links = FALSE; /* --process-links. */ +static int process_links = FALSE; /* --process-links. */ static int demangle_flags = DMGL_ANSI | DMGL_PARAMS; diff --git a/binutils/readelf.c b/binutils/readelf.c index 7370aa9358a..c995911f525 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -4747,7 +4747,7 @@ request_dump (struct dump_data *dumpdata, dump_type type) int section; char * cp; - do_dump++; + do_dump = TRUE; section = strtoul (optarg, & cp, 0); if (! *cp && section >= 0) diff --git a/binutils/windint.h b/binutils/windint.h index 42c0bef739d..b41a2caf0cb 100644 --- a/binutils/windint.h +++ b/binutils/windint.h @@ -1063,7 +1063,7 @@ struct __attribute__ ((__packed__)) bin_toolbar }; #define BIN_TOOLBAR_SIZE 12 -extern int target_is_bigendian; +extern bfd_boolean target_is_bigendian; typedef struct windres_bfd { diff --git a/binutils/windmc.c b/binutils/windmc.c index be14af5acca..c191cd739b8 100644 --- a/binutils/windmc.c +++ b/binutils/windmc.c @@ -50,7 +50,7 @@ typedef struct mc_msg_item struct bin_messagetable_item *res; } mc_msg_item; -int target_is_bigendian = 0; +bfd_boolean target_is_bigendian = 0; const char *def_target_arch; /* Globals and static variable definitions. */ diff --git a/binutils/windres.c b/binutils/windres.c index b35661cb9f5..a897a328a9d 100644 --- a/binutils/windres.c +++ b/binutils/windres.c @@ -48,7 +48,7 @@ int verbose = 0; -int target_is_bigendian = 0; +bfd_boolean target_is_bigendian = 0; const char *def_target_arch; static void set_endianness (bfd *, const char *);