* cplus-dem.c (demangle_fund_type): Make 'dec' an unsigned int,
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Jul 2000 19:58:34 +0000 (19:58 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Jul 2000 19:58:34 +0000 (19:58 +0000)
        and print it with %u.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35153 138bc75d-0d04-0410-961f-82ee72b054a4

libiberty/ChangeLog
libiberty/cplus-dem.c

index d867941..e2d3813 100644 (file)
@@ -1,3 +1,8 @@
+2000-07-20  Joseph S. Myers  <jsm28@cam.ac.uk>
+
+       * cplus-dem.c (demangle_fund_type): Make 'dec' an unsigned int,
+       and print it with %u.
+
 2000-07-17  Hans-Peter Nilsson  <hp@axis.com>
 
        * testsuite/regress-demangle (failed test): Show result and
index 81ebbfc..5211348 100644 (file)
@@ -3399,7 +3399,7 @@ demangle_fund_type (work, mangled, result)
   int done = 0;
   int success = 1;
   char buf[10];
-  int dec = 0;
+  unsigned int dec = 0;
   string btype;
   type_kind_t tk = tk_integral;
 
@@ -3543,7 +3543,7 @@ demangle_fund_type (work, mangled, result)
          *mangled += min (strlen (*mangled), 2);
        }
       sscanf (buf, "%x", &dec);
-      sprintf (buf, "int%i_t", dec);
+      sprintf (buf, "int%u_t", dec);
       APPEND_BLANK (result);
       string_append (result, buf);
       break;