Clean warnings

This commit is contained in:
Émilie Feral
2019-07-11 14:39:28 +02:00
parent 2bc9c88371
commit 518903c390
3 changed files with 2 additions and 3 deletions

View File

@@ -77,8 +77,6 @@ void assertCalculationDisplay(const char * input, ::Calculation::Calculation::Di
quiz_assert(lastCalculation->exactAndApproximateDisplayedOutputsAreEqual(context) == sign);
}
if (exactOutput) {
constexpr int bufferSize = 500;
char buffer[bufferSize];
quiz_assert(strcmpWithSystemParentheses(lastCalculation->exactOutputText(), exactOutput) == 0);
}
if (approximateOutput) {

View File

@@ -13,6 +13,7 @@ namespace Sequence {
Sequence * addSequence(SequenceStore * store, Sequence::Type type, const char * definition, const char * condition1, const char * condition2) {
Ion::Storage::Record::ErrorStatus err = store->addEmptyModel();
assert(err == Ion::Storage::Record::ErrorStatus::None);
(void) err; // Silence compilation warning about unused variable.
Ion::Storage::Record record = store->recordAtIndex(store->numberOfModels()-1);
Sequence * u = store->modelForRecord(record);
u->setType(type);

View File

@@ -49,7 +49,7 @@ void assert_copy_and_remove_code_point_gives(char * dst, size_t dstSize, const c
size_t resultLen = strlen(result);
quiz_assert(dstSize >= resultLen + 1);
UTF8Helper::CopyAndRemoveCodePoint(dst, dstSize, src, c);
for (int i = 0; i <= resultLen; i++) {
for (size_t i = 0; i <= resultLen; i++) {
quiz_assert(dst[i] == result[i]);
}
}