Bugzilla bug #146: cast unsigned to signed type before applying the

unary minus operator to get rid of a compiler warning.  Thanks to
rick@rixsoft.com for the bug report.


git-svn-id: svn://10.0.0.236/trunk@27762 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtc%netscape.com
1999-04-16 00:15:12 +00:00
parent 32d6b82700
commit 5f9abe1e5c

View File

@@ -184,7 +184,12 @@ _pr_strtoull(const char *str, char **endptr, int base)
}
if (negative) {
#ifdef HAVE_LONG_LONG
/* The cast to a signed type is to avoid a compiler warning */
x = -(PRInt64)x;
#else
LL_NEG(x, x);
#endif
}
if (endptr) {