PATCH: tools/winegcc/utils.c -- casts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Interestingly, Wine itself rarely shows this kind of problem, it's
mostly the tool/ directory.  Tested on SuSE Linux 8.2.

Gerald

ChangeLog:
Add proper casts to avoid signed vs. unsigned mismatches in strmake().
Index: utils.c
===================================================================
RCS file: /home/wine/wine/tools/winegcc/utils.c,v
retrieving revision 1.2
diff -u -3 -p -r1.2 utils.c
--- utils.c	15 Oct 2003 03:35:54 -0000	1.2
+++ utils.c	30 Oct 2003 08:19:17 -0000
@@ -79,8 +79,8 @@ char *strmake(const char *fmt, ...)
         va_start(ap, fmt);
 	n = vsnprintf (p, size, fmt, ap);
 	va_end(ap);
-        if (n > -1 && n < size) return p;
-	size = min( size*2, n+1 );
+        if (n > -1 && (size_t)n < size) return p;
+	size = min( size*2, (size_t)n+1 );
 	p = xrealloc (p, size);
     }
 }


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux