binutils int vs bfd_boolean fixes

Message ID 20210329004706.GJ5425@bubble.grove.modra.org
State New
Headers show
Series
  • binutils int vs bfd_boolean fixes
Related show

Commit Message

H.J. Lu via Binutils March 29, 2021, 12:47 a.m.
getopt_long expects variables in long_options to be of type int.

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


-- 
Alan Modra
Australia Development Lab, IBM

Patch

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