mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Fix some more conformance difference related errors/warnings
This commit is contained in:
@ -146,12 +146,12 @@ bool GuidIsNil (const Uuid & uuid) {
|
||||
const wchar * GuidToString (const Uuid & uuid, wchar * dst, unsigned chars) {
|
||||
wchar * src;
|
||||
RPC_STATUS s;
|
||||
s = UuidToStringW( (GUID *) &uuid, &src );
|
||||
s = UuidToStringW( (GUID *) &uuid, (RPC_WSTR*)&src );
|
||||
if (RPC_S_OK == s)
|
||||
StrCopy(dst, src, chars);
|
||||
else
|
||||
StrCopy(dst, L"", chars);
|
||||
RpcStringFreeW(&src);
|
||||
RpcStringFreeW( (RPC_WSTR *)&src );
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
@ -321,7 +321,8 @@ void BigNum::DivNormalized (const BigNum & a, const BigNum & b, BigNum * remaind
|
||||
if (quotient) {
|
||||
Val borrow = 0;
|
||||
Val carry = 0;
|
||||
for (unsigned denomIndex = 0; denomIndex != denomCount; ++denomIndex) {
|
||||
unsigned denomIndex;
|
||||
for (denomIndex = 0; denomIndex != denomCount; ++denomIndex) {
|
||||
DVal product = (DVal)(Mul((*denom)[denomIndex], quotient) + carry);
|
||||
carry = HIGH(product);
|
||||
numer->SetVal(quotientIndex + denomIndex, (DVal)((DVal)(*numer)[quotientIndex + denomIndex] - (DVal)LOW(product) - (DVal)borrow), &borrow);
|
||||
@ -1297,7 +1298,8 @@ void BigNum::Sub (const BigNum & a, Val b) {
|
||||
const unsigned count = a.Count();
|
||||
SetCount(count);
|
||||
Val borrow = b;
|
||||
for (unsigned index = 0; index < count; ++index) {
|
||||
unsigned index;
|
||||
for (index = 0; index < count; ++index) {
|
||||
SetVal(index, (DVal)((DVal)a[index] - (DVal)borrow), &borrow);
|
||||
borrow = (Val)((Val)0 - (Val)borrow);
|
||||
}
|
||||
@ -1314,7 +1316,8 @@ void BigNum::Sub (const BigNum & a, const BigNum & b) {
|
||||
const unsigned bCount = b.Count();
|
||||
GrowToCount(count, true);
|
||||
Val borrow = 0;
|
||||
for (unsigned index = 0; index < count; ++index) {
|
||||
unsigned index;
|
||||
for (index = 0; index < count; ++index) {
|
||||
Val bVal = (index < bCount) ? b[index] : (Val)0;
|
||||
SetVal(index, (DVal)((DVal)a[index] - (DVal)bVal - (DVal)borrow), &borrow);
|
||||
borrow = (Val)((Val)0 - (Val)borrow);
|
||||
|
Reference in New Issue
Block a user