Silence 2 C++ compiler warnings for builds with disabled assertions

This commit is contained in:
Martin Kinkelin 2021-02-07 23:55:21 +01:00
parent 93551108f5
commit 0c079fbdf9
2 changed files with 2 additions and 2 deletions

View file

@ -588,6 +588,7 @@ void DtoDeclareFunction(FuncDeclaration *fdecl, const bool willDefine) {
// this can e.g. happen for special __xtoHash member functions
Logger::println("Function hasn't had sema3 run yet, running it now.");
const bool semaSuccess = fdecl->functionSemantic3();
(void)semaSuccess;
assert(semaSuccess);
Module::runDeferredSemantic3();
}

View file

@ -1093,10 +1093,9 @@ public:
// evaluate the base expression but delay getting its pointer until the
// potential bounds have been evaluated
DValue *v = toElem(e->e1);
auto getBasePointer = [e, v, etype]() {
auto getBasePointer = [v, etype]() {
if (etype->ty == Tpointer) {
// pointer slicing
assert(e->lwr);
return DtoRVal(v);
} else {
// array slice