aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Wellons <wellons@nullprogram.com>2021-07-18 16:57:19 -0400
committerAlan Modra <amodra@gmail.com>2021-07-19 21:02:21 +0930
commit999566402e3d7c69032bbf47e28b44fc0926fe62 (patch)
tree649d96a7b66941530263c7063e98360097d873c9
parentAutomatic date update in version.in (diff)
downloadbinutils-gdb-999566402e3d7c69032bbf47e28b44fc0926fe62.tar.gz
binutils-gdb-999566402e3d7c69032bbf47e28b44fc0926fe62.tar.bz2
binutils-gdb-999566402e3d7c69032bbf47e28b44fc0926fe62.zip
Change "uint" to "unsigned"
This fixes a defect introduced in 25162c795. The "uint" type has not been explicitly defined here on mingw, causing compilation to fail. On linux we have this in /usr/include/sys/types.h /* Old compatibility names for C types. */ typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; So it's easy to see how such bugs can creep in. * rust-demangle.c (struct rust_demangler): Change type of "recursion" to unsigned. (RUST_NO_RECURSION_LIMIT): Similarly in cast.
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/rust-demangle.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 8e39fd28eba..3f749455f05 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2021-07-19 Christopher Wellons <wellons@nullprogram.com>
+
+ * rust-demangle.c (struct rust_demangler): Change type of
+ "recursion" to unsigned.
+ (RUST_NO_RECURSION_LIMIT): Similarly in cast.
+
2021-07-15 Nick Clifton <nickc@redhat.com>
PR 99935
diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
index df09b7b8fdd..ac1eb8eb02c 100644
--- a/libiberty/rust-demangle.c
+++ b/libiberty/rust-demangle.c
@@ -75,10 +75,10 @@ struct rust_demangler
int version;
/* Recursion depth. */
- uint recursion;
+ unsigned recursion;
/* Maximum number of times demangle_path may be called recursively. */
#define RUST_MAX_RECURSION_COUNT 1024
-#define RUST_NO_RECURSION_LIMIT ((uint) -1)
+#define RUST_NO_RECURSION_LIMIT ((unsigned) -1)
uint64_t bound_lifetime_depth;
};