Turn warning about uninitialized storage returns into an error.

This commit is contained in:
Daniel Kirchner
2018-08-02 19:34:38 +02:00
parent 009a55c82d
commit 35c5b7de25
23 changed files with 184 additions and 183 deletions
+5 -5
View File
@@ -144,12 +144,12 @@ void ControlFlowAnalyzer::checkUnassignedStorageReturnValues(
ssl.append("Problematic end of function:", _function.location());
}
m_errorReporter.warning(
m_errorReporter.typeError(
returnVal->location(),
"This variable is of storage pointer type and might be returned without assignment. "
"This can cause storage corruption. Assign the variable (potentially from itself) "
"to remove this warning.",
ssl
ssl,
"This variable is of storage pointer type and might be returned without assignment and "
"could be used uninitialized. Assign the variable (potentially from itself) "
"to fix this error."
);
}
}