[BTRFS] Fix build

CORE-16679
This commit is contained in:
Victor Perevertkin 2020-04-23 07:28:34 +03:00
parent 194ea909fd
commit 3ba423996c
No known key found for this signature in database
GPG Key ID: C750B7222E9C7830
2 changed files with 21 additions and 15 deletions

View File

@ -888,7 +888,7 @@ NTSTATUS write_compressed(fcb* fcb, uint64_t start_data, uint64_t end_data, void
void* csum = NULL;
#ifdef __REACTOS__
int32_t i2;
uint32_t i3;
uint32_t i3, j;
#endif // __REACTOS__
if (fcb->Vcb->options.compress_type != 0 && fcb->prop_compression == PropCompression_None)
@ -929,7 +929,11 @@ NTSTATUS write_compressed(fcb* fcb, uint64_t start_data, uint64_t end_data, void
if (!NT_SUCCESS(Status)) {
ERR("add_calc_job_comp returned %08lx\n", Status);
#ifndef __REACTOS__
for (unsigned int j = 0; j < i; j++) {
#else
for (j = 0; j < i; j++) {
#endif // __REACTOS__
KeWaitForSingleObject(&parts[j].cj->event, Executive, KernelMode, false, NULL);
ExFreePool(parts[j].cj);
}

View File

@ -187,21 +187,23 @@ void calc_sha256(uint8_t* hash, const void* input, size_t len)
const uint32_t s1 = right_rot(w[(j + 14) & 0xf], 17) ^ right_rot(w[(j + 14) & 0xf], 19) ^ (w[(j + 14) & 0xf] >> 10);
w[j] = w[j] + s0 + w[(j + 9) & 0xf] + s1;
}
const uint32_t s1 = right_rot(ah[4], 6) ^ right_rot(ah[4], 11) ^ right_rot(ah[4], 25);
const uint32_t ch = (ah[4] & ah[5]) ^ (~ah[4] & ah[6]);
const uint32_t temp1 = ah[7] + s1 + ch + k[i << 4 | j] + w[j];
const uint32_t s0 = right_rot(ah[0], 2) ^ right_rot(ah[0], 13) ^ right_rot(ah[0], 22);
const uint32_t maj = (ah[0] & ah[1]) ^ (ah[0] & ah[2]) ^ (ah[1] & ah[2]);
const uint32_t temp2 = s0 + maj;
{
const uint32_t s1 = right_rot(ah[4], 6) ^ right_rot(ah[4], 11) ^ right_rot(ah[4], 25);
const uint32_t ch = (ah[4] & ah[5]) ^ (~ah[4] & ah[6]);
const uint32_t temp1 = ah[7] + s1 + ch + k[i << 4 | j] + w[j];
const uint32_t s0 = right_rot(ah[0], 2) ^ right_rot(ah[0], 13) ^ right_rot(ah[0], 22);
const uint32_t maj = (ah[0] & ah[1]) ^ (ah[0] & ah[2]) ^ (ah[1] & ah[2]);
const uint32_t temp2 = s0 + maj;
ah[7] = ah[6];
ah[6] = ah[5];
ah[5] = ah[4];
ah[4] = ah[3] + temp1;
ah[3] = ah[2];
ah[2] = ah[1];
ah[1] = ah[0];
ah[0] = temp1 + temp2;
ah[7] = ah[6];
ah[6] = ah[5];
ah[5] = ah[4];
ah[4] = ah[3] + temp1;
ah[3] = ah[2];
ah[2] = ah[1];
ah[1] = ah[0];
ah[0] = temp1 + temp2;
}
}
}