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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user