]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Change "uint" to "unsigned"
authorChristopher Wellons <wellons@nullprogram.com>
Sun, 18 Jul 2021 20:57:19 +0000 (16:57 -0400)
committerAlan Modra <amodra@gmail.com>
Mon, 19 Jul 2021 11:32:21 +0000 (21:02 +0930)
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.

libiberty/ChangeLog
libiberty/rust-demangle.c

index 8e39fd28eba8f8d40f9b41075ca19cd47947c5e3..3f749455f05d12b725012577fdf7e3ac29d2fb09 100644 (file)
@@ -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
index df09b7b8fddb82b21f97afee8821166d92220094..ac1eb8eb02c6d42533c0faa7aebdce432ac947e9 100644 (file)
@@ -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;
 };