mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 02:32:47 +00:00
Workarround for gcc 2.60 expression evaluation bug.
This commit is contained in:
parent
7c8f1b02e3
commit
0ab452aa42
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18132
@ -194,7 +194,11 @@ static int scale_round(int n, int x, int y)
|
||||
}
|
||||
else {
|
||||
if (-(unsigned)n <= (-(unsigned)INT_MIN - y2)/x)
|
||||
return (n*x - y2)/y;
|
||||
{
|
||||
// XXX simplify expression to work around bug in gcc-2.6.0
|
||||
int tmp = n*x - y2;
|
||||
return tmp/y;
|
||||
}
|
||||
return int(n*double(x)/double(y) - .5);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user