mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
fix clang "always true" warning in lzma/main.cpp
This commit is contained in:
parent
44d21884d6
commit
1fb297775c
@ -90,20 +90,21 @@ int main(int argc, const char** argv)
|
|||||||
const unsigned HeaderSize = 13;
|
const unsigned HeaderSize = 13;
|
||||||
|
|
||||||
SizeT outSize;
|
SizeT outSize;
|
||||||
|
bool outSizeIsValid;
|
||||||
if (encode) {
|
if (encode) {
|
||||||
outSize = size * 2;
|
outSize = size * 2;
|
||||||
|
outSizeIsValid = true;
|
||||||
} else {
|
} else {
|
||||||
int32_t outSize32 = read4(data + PropHeaderSize);
|
int32_t outSize32 = read4(data + PropHeaderSize);
|
||||||
if (outSize32 >= 0) {
|
if (outSize32 < 0 and argc == 5) {
|
||||||
outSize = outSize32;
|
outSize32 = atoi(argv[4]);
|
||||||
} else if (argc == 5) {
|
|
||||||
outSize = atoi(argv[4]);
|
|
||||||
} else {
|
|
||||||
outSize = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
outSize = outSize32;
|
||||||
|
outSizeIsValid = outSize32 >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (outSize >= 0) {
|
if (outSizeIsValid) {
|
||||||
uint8_t* out = static_cast<uint8_t*>(malloc(outSize));
|
uint8_t* out = static_cast<uint8_t*>(malloc(outSize));
|
||||||
if (out) {
|
if (out) {
|
||||||
SizeT inSize = size;
|
SizeT inSize = size;
|
||||||
|
Loading…
Reference in New Issue
Block a user