From fe5d6ba65e2712753de767616ae24ae9e39a6c59 Mon Sep 17 00:00:00 2001 From: MMS Date: Fri, 3 Sep 2021 11:54:02 -0400 Subject: [PATCH] 6.9.4rc2 --- src/qf/qf_mem.cpp | 8 ++++---- src/qf/qf_time.cpp | 10 +++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/qf/qf_mem.cpp b/src/qf/qf_mem.cpp index ef1689e2..bd8cf0ef 100644 --- a/src/qf/qf_mem.cpp +++ b/src/qf/qf_mem.cpp @@ -2,14 +2,14 @@ /// @brief QF/C++ memory management services /// @cond ///*************************************************************************** -/// Last updated for version 6.9.1 -/// Last updated on 2020-09-17 +/// Last updated for version 6.9.4 +/// Last updated on 2021-09-03 /// /// Q u a n t u m L e a P s /// ------------------------ /// Modern Embedded Software /// -/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved. +/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved. /// /// This program is open source software: you can redistribute it and/or /// modify it under the terms of the GNU General Public License as published @@ -107,7 +107,7 @@ void QMPool::init(void * const poolSto, std::uint_fast32_t poolSize, /// the poolSize must fit at least one free block and /// the blockSize must not be too close to the top of the dynamic range Q_REQUIRE_ID(100, (poolSto != nullptr) - && (poolSize >= sizeof(QFreeBlock)) + && (poolSize >= static_cast(sizeof(QFreeBlock))) && (static_cast(blockSize + sizeof(QFreeBlock)) > blockSize)); diff --git a/src/qf/qf_time.cpp b/src/qf/qf_time.cpp index 0836fa5e..7f3a09b6 100644 --- a/src/qf/qf_time.cpp +++ b/src/qf/qf_time.cpp @@ -3,14 +3,14 @@ /// @ingroup qf /// @cond ///*************************************************************************** -/// Last updated for version 6.9.1 -/// Last updated on 2020-09-17 +/// Last updated for version 6.9.4 +/// Last updated on 2021-09-03 /// /// Q u a n t u m L e a P s /// ------------------------ /// Modern Embedded Software /// -/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved. +/// Copyright (C) 2005-2021 Quantum Leaps. All rights reserved. /// /// This program is open source software: you can redistribute it and/or /// modify it under the terms of the GNU General Public License as published @@ -205,6 +205,10 @@ void QF::tickX_(std::uint_fast8_t const tickRate) noexcept /// bool QF::noTimeEvtsActiveX(std::uint_fast8_t const tickRate) noexcept { bool inactive; + + /// @pre the tick rate must be in range + Q_REQUIRE_ID(200, tickRate < QF_MAX_TICK_RATE); + if (timeEvtHead_[tickRate].m_next != nullptr) { inactive = false; }