qpcpp/include/qpcpp.lnt
2018-11-22 11:34:13 -05:00

490 lines
11 KiB
Plaintext

/// @file
/// @brief PC-Lint 9.x option file for linting QP/C++ applications
/// @cond
///===========================================================================
/// Last updated for version 6.3.7
/// Last updated on 2018-11-08
///
/// Q u a n t u m L e a P s
/// ------------------------
/// Modern Embedded Software
///
/// Copyright (C) 2002-2018 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
/// by the Free Software Foundation, either version 3 of the License, or
/// (at your option) any later version.
///
/// Alternatively, this program may be distributed and modified under the
/// terms of Quantum Leaps commercial licenses, which expressly supersede
/// the GNU General Public License and are specifically designed for
/// licensees interested in retaining the proprietary status of their code.
///
/// This program is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/// GNU General Public License for more details.
///
/// You should have received a copy of the GNU General Public License
/// along with this program. If not, see <http://www.gnu.org/licenses/>.
///
/// Contact information:
/// https://www.state-machine.com
/// mailto:info@state-machine.com
///===========================================================================
/// @endcond
// General
-estring(793,6) // ANSI/ISO limit of 6 significant chars exceeded
-esym(1960, // Rule 7-3-1, Global declaration of symbol
char_t,
int_t,
enum_t,
float32_t,
float64_t)
-estring(1960, // 11-0-1(req) non-private data member
sig,
poolId_,
refCtr_)
-estring(1927, // 8-5-1(req) not in the ctor initializer
QP::QEvt::poolId_,
QP::QEvt::refCtr_)
-estring(1923, // 16-2-2(req) could become const variable
QP_API_VERSION,
QP_VERSION_STR,
QP_RELEASE,
Q_EVT_CTOR,
Q_SIGNAL_SIZE,
QP_VERSION)
-emacro(923, // 5-2-7, 5-2-8 cast from int to pointer
Q_UINT2PTR_CAST)
-emacro(930, // 5-2-7, 5-2-8 cast from enum to unsigned
QEVT_INITIALIZER)
-estring(1960, // 16-0-4(req) function-like macro
Q_DIM,
Q_UINT2PTR_CAST,
QEVT_INITIALIZER)
-esym(1790, // Base class has no virtual functions
QP::QEvt)
-estring(1712, QEvt) // default constructor not defined
-estring(1401, // member not initialized in the ctor
QP::QEvt::poolId_,
QP::QEvt::refCtr_)
-emacro(866, Q_DIM) // Unusual use of 'SYM' in argument to sizeof
-estring(970,bool) // Use of 'bool' outside of a typedef
// Assertions
-esym(1960, // Rule 7-3-1, Global declaration of symbol
Q_onAssert,
Q_onTestAssert,
Q_this_module_)
-emacro(944, // 0-1-1/2/9 operator ? always evaluates to True
Q_ASSERT_COMPILE)
-emacro(948, // 0-1-9 Operator '==' always evaluates to True
Q_ASSERT_COMPILE)
-esym(752, // 0-1-3 local declarator not referenced
Q_assert_compile)
-estring(1960, // 16-0-4 function-like macro
Q_ASSERT,
Q_ASSERT_ID,
Q_ALLEGE,
Q_ALLEGE_ID,
Q_ERROR,
Q_ERROR_ID,
Q_REQUIRE,
Q_REQUIRE_ID,
Q_ENSURE,
Q_ENSURE_ID,
Q_INVARIANT,
Q_INVARIANT_ID,
Q_ASSERT_COMPILE,
Q_DEFINE_THIS_MODULE)
-emacro(522, // Highest operation lacks side-effects
Q_ASSERT,
Q_ASSERT_ID,
Q_ALLEGE,
Q_ALLEGE_ID,
Q_ERROR,
Q_ERROR_ID)
-emacro(1924, // 5-2-4 C-style cast
Q_ASSERT,
Q_ASSERT_ID,
Q_ALLEGE,
Q_ALLEGE_ID,
Q_ERROR,
Q_ERROR_ID)
-function(exit, // give these functions the semantics of "exit"
Q_onAssert,
Q_onTestAssert)
// QEP
-emacro(929, // 5-2-7(req) cast pointer to pointer
Q_STATE_CAST,
Q_ACTION_CAST,
Q_EVT_CAST)
-emacro(1939, // 5-2-2, Down cast detected
Q_EVT_CAST,
Q_NEW,
Q_NEW_X,
Q_NEW_REF)
-estring(1960, // 9-5-1 declaration of union
QP::QHsmAttr)
-esym(1960, // 16-0-4 function-like macro
Q_TRAN,
Q_TRAN_HIST,
Q_SUPER,
Q_STATE_CAST,
Q_ACTION_CAST,
Q_EVT_CAST)
-esym(1960, // 16-0-4 function-like macro
QM_ENTRY,
QM_EXIT,
QM_SM_EXIT,
QM_TRAN,
QM_TRAN_HIST,
QM_TRAN_INIT,
QM_TRAN_EP,
QM_TRAN_XP,
QM_HANDLED,
QM_UNHANDLED,
QM_SUPER,
QM_SUPER_SUB)
-esym(1712, // default constructor not defined
QMsm,
QHsm)
-esym(1511, // 2-10-2 Member hides non-virtual member
QP::QHsm::isIn,
QP::QHsm::state,
QP::QHsm::childState)
// QF
-emacro(929, // 5-2-7 cast from pointer to pointer
Q_NEW,
Q_NEW_X,
Q_NEW_REF)
-efunc(925, // 5-2-8, 5-2-9 cast from pointer to pointer
*toActive,
*toTimeEvt)
-esym(1927, // 8-5-1 Symbol not in the ctor initializer list
QP::QActive::m_prio,
QP::QActive::m_eQueue,
QP::QActive::m_osObject,
QP::QActive::m_thread)
-esym(1536, // 9-3-1, 9-3-2 Exposing low access member
QP::QActive::m_osObject,
QP::QActive::m_thread)
-estring(1960, // 11-0-1(req) non-private data member
m_eQueue,
m_thread,
m_osObject,
m_prio)
-estring(1923, // 16-2-2 could become const variable
QF_MAX_ACTIVE,
QF_MAX_EPOOL,
QF_MAX_TICK_RATE,
QF_EVENT_SIZ_SIZE,
QF_EQUEUE_CTR_SIZE,
QF_MPOOL_SIZ_SIZE,
QF_MPOOL_CTR_SIZE,
QF_TIMEEVT_CTR_SIZE)
-estring(1923, // 16-2-2 could become const variable
QF_INT_DISABLE,
QF_INT_ENABLE,
QF_CRIT_ENTRY,
QF_CRIT_EXIT,
QF_CRIT_EXIT_NOP,
QF_LOG2LKUP,
QF_QS_CRIT_ENTRY,
QF_QS_CRIT_EXIT,
QF_QS_ISR_ENTRY,
QF_QS_ISR_EXIT,
QF_QS_ACTION)
-esym(1960, // 16-0-2, '#define' used within a block
QF_EVENT_SIZ_SIZE,
QF_TIMEEVT_CTR_SIZE,
QF_ACTIVE_SUPER_,
QF_ACTIVE_STATE_)
-esym(1960, // 16-0-4 function-like macro
QF_INT_DISABLE,
QF_INT_ENABLE,
QF_CRIT_ENTRY,
QF_CRIT_EXIT,
QF_CRIT_EXIT_NOP,
QF_CPU_SLEEP,
Q_NEW,
Q_NEW_X,
Q_NEW_REF,
Q_DELETE_REF,
PUBLISH,
POST,
POST_X,
TICK,
TICK_X,
tick,
postFIFO)
-esym(1960, // 16-0-4 function-like macro
QF_QS_CRIT_EXIT,
QF_QS_CRIT_ENTRY,
QF_QS_CRIT_EXIT,
QF_QS_ISR_ENTRY,
QF_QS_ISR_EXIT,
QF_QS_ACTION,
QF_MPOOL_EL,
QF_LOG2)
-esym(1960, // 16-0-4 function-like macro
QACTIVE_EQUEUE_WAIT_,
QACTIVE_EQUEUE_SIGNAL_,
QACTIVE_EQUEUE_ONEMPTY_,
QF_EPOOL_INIT_,
QF_EPOOL_EVENT_SIZE_,
QF_EPOOL_GET_,
QF_EPOOL_PUT_)
-estring(1963, Q_NEW) // 16-3-2(adv) '#/##' used in macro
-esym(1960, remove) // 17-0-2, Re-use of C++ identifier
-esym(1401, // member not initialized by constructor
QP::QActive::m_prio,
QP::QActive::m_eQueue,
QP::QActive::m_osObject,
QP::QActive::m_thread)
-esym(1704, // constructor has private access specification
QP::QTimeEvt::QTimeEvt,
QP::QEQueue::QEQueue,
QP::QMPool::QMPool)
-esym(1712, // default constructor not defined for class
QMActive,
QActive,
QTimeEvt,
QTicker)
-esym(641, *Signals) // Converting enum '*Signals' to 'int'
-esym(754, sto_) // local structure member 'sto' not referenced
-efunc(1960, QP::QPSet*::isEmpty) // incorrect reporting int->bool
-efunc(1960, QP::QPSet*::notEmpty) // incorrect reporting int->bool
-efunc(1960, QP::QPSet*::hasElement) // incorrect reporting int->bool
// QK
-estring(1960, // 11-0-1(req) non-private data member
actPrio,
nextPrio,
lockPrio,
lockHolder,
intNest,
readySet)
-esym(1960, // 16-0-4 function-like macro
QK_ISR_ENTRY,
QK_ISR_EXIT,
QK_EXT_SAVE,
QK_EXT_RESTORE,
QK_TLS)
-esym(1960, // 7-3-1, Global declaration of symbol
QK_readySet_,
QK_currPrio_,
QK_intNest_,
QK_init,
QK_sched_,
QK_schedExt_,
QK_schedPrio_,
QK_ceilingPrio_)
// QXK
-esym(1960, // 3-2-3(req) type previously declared
QP::QActive)
-efunc(925, // 5-2-8, 5-2-9 cast from pointer to pointer
isBlockedOn)
-estring(1960, // 11-0-1(req) non-private data member
m_startPrio)
-estring(1960, // 11-0-1(req) non-private data member
curr,
next,
lockPrio,
lockHolder,
intNest,
idleThread,
readySet)
-esym(1960, // 16-0-4 function-like macro
QXK_TLS)
-esym(1712, // default constructor not defined
QXThread)
-esym(1960, signal) // 17-0-2, Re-use of C++ identifier
-esym(1927, // 8-5-1 Symbol not in the ctor initializer list
QP::QActive::m_startPrio)
// QS
-emacro(506, QS_*) // 0-1-1 constant value boolean
-emacro(774, QS_*) // 0-1-1 'if' always True
-emacro(930, QS_*) // 5-2-7 cast from enum to unsigned char
-emacro(9091, // 5-2-7, 5-2-8 cast from pointer to int
QS_OBJ_,
QS_FUN_)
-emacro(1960, QS_PTR_AT_) // 5-0-15 pointer arithmetic
-estring(1923, // 16-2-2 macro could become const variable
QS_RESET,
QS_TIME_SIZE,
QS_OBJ_PTR_SIZE,
QS_FUN_PTR_SIZE,
QS_REC_DONE,
QS_OBJ_,
QS_FUN_,
QS_TEST_PAUSE)
-esym(1960, // 16-0-4 function-like macro
QS_INIT,
QS_EXIT,
QS_DUMP,
QS_RESET,
QS_FILTER_ON,
QS_FILTER_OFF,
QS_FILTER_SM_OBJ,
QS_FILTER_AO_OBJ,
QS_FILTER_MP_OBJ,
QS_FILTER_EQ_OBJ,
QS_FILTER_TE_OBJ,
QS_FILTER_AP_OBJ,
QS_GET_BYTE,
QS_GET_BLOCK,
QS_BEGIN,
QS_END,
QS_BEGIN_NOCRIT,
QS_END_NOCRIT)
-esym(1960, // 16-0-4 function-like macro
QS_I8,
QS_U8,
QS_I16,
QS_U16,
QS_I32,
QS_I64,
QS_U32,
QS_F32,
QS_F64,
QS_U64,
QS_U32_HEX,
QS_STR,
QS_OBJ,
QS_FUN,
QS_SIG_DICTIONARY,
QS_OBJ_DICTIONARY,
QS_FUN_DICTIONARY,
QS_USR_DICTIONARY,
QS_ASSERTION,
QS_FLUSH,
QS_STR_ROM,
QS_MEM,
QS_SIG,
QS_OUTPUT,
QS_RX_INPUT)
-esym(1960, // 16-0-4 function-like macro
QS_CRIT_ENTRY_,
QS_CRIT_EXIT_,
QS_BEGIN_,
QS_END_,
QS_GLB_FILTER_,
QS_BEGIN_NOCRIT_,
QS_END_NOCRIT_,
QS_REC_DONE,
QS_U8_,
QS_2U8_,
QS_U16_,
QS_U32_,
QS_U64_,
QS_STR_,
QS_TIME_,
QS_SIG_,
QS_EVS_,
QS_OBJ_,
QS_FUN_,
QS_EQC_,
QS_MPC_,
QS_MPS_,
QS_TEC_,
QS_TEST_PAUSE,
QS_TEST_PROBE_DEF,
QS_TEST_PROBE,
QS_TEST_PROBE_ID)
-esym(1923, // 16-2-2 could become const variable
QS_INIT,
QS_EXIT,
QS_DUMP,
QS_FILTER_ON,
QS_FILTER_OFF,
QS_FILTER_SM_OBJ,
QS_FILTER_AO_OBJ,
QS_FILTER_MP_OBJ,
QS_FILTER_EQ_OBJ,
QS_FILTER_TE_OBJ,
QS_FILTER_AP_OBJ,
QS_GET_BYTE,
QS_GET_BLOCK,
QS_BEGIN,
QS_END,
QS_BEGIN_NOCRIT,
QS_END_NOCRIT,
QS_END_REC)
-esym(1923, // 16-2-2 could become const variable
QS_I8,
QS_U8,
QS_I16,
QS_U16,
QS_I32,
QS_I64,
QS_U32,
QS_F32,
QS_F64,
QS_U64,
QS_U32_HEX,
QS_STR,
QS_OBJ,
QS_FUN,
QS_SIG_DICTIONARY,
QS_OBJ_DICTIONARY,
QS_FUN_DICTIONARY,
QS_USR_DICTIONARY,
QS_ASSERTION,
QS_FLUSH,
QS_STR_ROM,
QS_MEM,
QS_SIG)
-esym(1923, // 16-2-2 could become const variable
QS_CRIT_ENTRY_,
QS_CRIT_EXIT_,
QS_BEGIN_,
QS_END_,
QS_BEGIN_NOCRIT_,
QS_END_NOCRIT_,
QS_U8_,
QS_2U8_,
QS_U16_,
QS_U32_,
QS_U64_,
QS_STR_,
QS_STR_ROM_,
QS_TIME_,
QS_SIG_,
QS_EVS_,
QS_OBJ_,
QS_FUN_,
QS_EQC_,
QS_MPC_,
QS_MPS_,
QS_TEC_)
-esym(1963, // 16-3-2, '#/##' operator used in macro
QS_SIG_DICTIONARY,
QS_OBJ_DICTIONARY,
QS_FUN_DICTIONARY,
QS_USR_DICTIONARY)
-esym(1960, QP::QEQueue) // 3-2-3, type previously declared
-emacro(717, QS_*) // do ... while(0);
-emacro(725, QS_END*) // Expected positive indentation
-esym(641, QP::QSType) // Converting enum '*QSType' to 'int'
// Deprecated features--provided in the backwards compatibility API of QP/C
-estring(961, // MISRA04-19.7(adv) function-like macro
Q_ROM_BYTE)