From 518903c3905d1467a90bff5bbe1a155b25c1f5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Thu, 11 Jul 2019 14:39:28 +0200 Subject: [PATCH] Clean warnings --- apps/calculation/test/calculation_store.cpp | 2 -- apps/sequence/test/sequence.cpp | 1 + ion/test/utf8_helper.cpp | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/calculation/test/calculation_store.cpp b/apps/calculation/test/calculation_store.cpp index 08154cd9d..807df942c 100644 --- a/apps/calculation/test/calculation_store.cpp +++ b/apps/calculation/test/calculation_store.cpp @@ -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) { diff --git a/apps/sequence/test/sequence.cpp b/apps/sequence/test/sequence.cpp index 62fe4834b..4aabd852a 100644 --- a/apps/sequence/test/sequence.cpp +++ b/apps/sequence/test/sequence.cpp @@ -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); diff --git a/ion/test/utf8_helper.cpp b/ion/test/utf8_helper.cpp index a0830d360..6398df9cd 100644 --- a/ion/test/utf8_helper.cpp +++ b/ion/test/utf8_helper.cpp @@ -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]); } }