Colin is correct -- this was fixed in the following commit, which
predates v0.25:

commit 89d81377fd5cc415227bf58857bb2cb34ee5a7f2
Author: Daniel Beer <dlb...@gmail.com>
Date:   Wed May 28 10:40:58 2014 +1200

    demangle: fix prototype mismatch.
    
    We declared the function to take size_t, but it really expected int. The
    implementation is changed to use size_t throughout.
    
    Debian bug report:
    
        https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749434

diff --git a/util/demangle.c b/util/demangle.c
index 31ad8d6..7b53747 100644
--- a/util/demangle.c
+++ b/util/demangle.c
@@ -26,14 +26,14 @@
 /* Buffer in which the demangler result will be constructed. */
 struct dmbuf {
        char            *out;
-       int             max_len;
-       int             len;
+       size_t          max_len;
+       size_t          len;
 };
 
 /* Add a chunk of text to the buffer */
-static int dm_append(struct dmbuf *d, const char *text, int len)
+static int dm_append(struct dmbuf *d, const char *text, size_t len)
 {
-       int i;
+       size_t i;
 
        if (d->len + len + 1 > d->max_len)
                return -1;
@@ -68,7 +68,7 @@ static int dm_component(struct dmbuf *d, const char *text, 
const char **out)
 }
 
 /* Demangler interface */
-int demangle(const char *raw, char *out, int max_len)
+int demangle(const char *raw, char *out, size_t max_len)
 {
        struct dmbuf d;

Reply via email to