Silence unused variable warning when assert is disabled. [NFC] (#4446)

This commit is contained in:
Johan Engelen 2023-07-20 00:17:54 +02:00 committed by GitHub
parent d4f2bed3a4
commit ed429d4524
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1188,7 +1188,7 @@ LLConstant *DtoConstExpInit(const Loc &loc, Type *targetType, Expression *exp) {
val = llvm::ConstantArray::get(at, elements);
}
(void)numTotalVals;
(void)numTotalVals; (void) product; // Silence unused variable warning when assert is disabled.
assert(product == numTotalVals);
return val;
}