qpcpp/include/lib-qpcpp.lnt

430 lines
10 KiB
Plaintext
Raw Normal View History

2013-10-10 20:01:51 -04:00
//////////////////////////////////////////////////////////////////////////////
// Product: PC-Lint 9.x option file for linting QP/C++ applications
2014-04-13 21:35:34 -04:00
// Last updated for version 5.3.0
// Last updated on 2014-04-12
//
// Q u a n t u m L e a P s
// ---------------------------
// innovating embedded systems
//
// Copyright (C) Quantum Leaps, www.state-machine.com.
//
// 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:
// Web: www.state-machine.com
// Email: info@state-machine.com
2013-10-10 20:01:51 -04:00
//////////////////////////////////////////////////////////////////////////////
2012-08-14 18:00:48 -04:00
2014-04-13 21:35:34 -04:00
// general
2013-02-12 10:02:51 -05:00
-esym(1960, // Rule 7-3-1, Global declaration of symbol
char_t,
int_t,
enum_t,
float32_t,
float64_t)
2012-08-14 18:00:48 -04:00
-estring(1960, // 11-0-1(req) non-private data member
2013-10-10 20:01:51 -04:00
sig,
poolId_,
refCtr_)
2012-08-14 18:00:48 -04:00
-estring(1927, // 8-5-1(req) not in the ctor initializer
2013-12-30 17:41:15 -05:00
QP::QEvt::poolId_,
QP::QEvt::refCtr_)
2013-10-10 20:01:51 -04:00
-estring(1923, // 16-2-2(req) could become const variable
2013-12-30 17:41:15 -05:00
QP_API_VERSION,
2013-10-10 20:01:51 -04:00
QP_VERSION_STR,
QP_RELEASE,
Q_EVT_CTOR,
Q_SIGNAL_SIZE,
QP_VERSION)
2012-08-14 18:00:48 -04:00
-emacro(923, Q_UINT2PTR_CAST) // 5-2-7, 5-2-8 cast from int to pointer
2013-10-10 20:01:51 -04:00
-emacro(930, QEVT_INITIALIZER)// 5-2-7, 5-2-8 cast from enum to unsigned
2012-08-14 18:00:48 -04:00
-estring(1960, // 16-0-4(req) function-like macro
Q_DIM,
2013-10-10 20:01:51 -04:00
Q_UINT2PTR_CAST,
QEVT_INITIALIZER)
2012-08-14 18:00:48 -04:00
-esym(1790, // Base class has no virtual functions
2013-12-30 17:41:15 -05:00
QP::QEvt)
2012-08-14 18:00:48 -04:00
-estring(1712, QEvt) // default constructor not defined
-estring(1401, // member not initialized in the ctor
2013-12-30 17:41:15 -05:00
QP::QEvt::poolId_,
QP::QEvt::refCtr_)
2013-10-10 20:01:51 -04:00
-emacro(866, Q_DIM) // Unusual use of 'SYM' in argument to sizeof
-estring(970,bool) // Use of 'bool' outside of a typedef
2012-08-14 18:00:48 -04:00
// Assertions
2013-10-10 20:01:51 -04:00
-esym(1960, // Rule 7-3-1, Global declaration of symbol
Q_onAssert,
Q_onTestAssert)
2013-12-30 17:41:15 -05:00
-emacro(944, Q_ASSERT_COMPILE) // 0-1-1/2/9 operator ? always evaluates to True
2013-10-10 20:01:51 -04:00
-emacro(948, Q_ASSERT_COMPILE) // 0-1-9 Operator '==' always evaluates to True
2013-12-30 17:41:15 -05:00
-esym(752, Q_assert_compile) // 0-1-3 local declarator not referenced
2012-08-14 18:00:48 -04:00
-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,
2013-10-10 20:01:51 -04:00
Q_TEST_ASSERT,
Q_DEFINE_THIS_MODULE)
-emacro(1924, // 5-2-4 C-style cast
2012-08-14 18:00:48 -04:00
Q_ASSERT,
2014-04-13 21:35:34 -04:00
Q_ASSERT_ID,
2012-08-14 18:00:48 -04:00
Q_ALLEGE,
2014-04-13 21:35:34 -04:00
Q_ALLEGE_ID,
Q_ERROR,
Q_ERROR_ID)
2013-10-10 20:01:51 -04:00
-emacro(522, // Highest operation lacks side-effects
Q_ASSERT,
2014-04-13 21:35:34 -04:00
Q_ASSERT_ID,
2012-08-14 18:00:48 -04:00
Q_ALLEGE,
2014-04-13 21:35:34 -04:00
Q_ALLEGE_ID,
Q_ERROR,
Q_ERROR_ID)
2013-10-10 20:01:51 -04:00
-function(exit, // give these functions the semantics of "exit"
Q_onAssert,
Q_onTestAssert)
2012-08-14 18:00:48 -04:00
// QEP
-emacro(929, // 5-2-7(req) cast pointer to pointer
2013-10-10 20:01:51 -04:00
Q_STATE_CAST,
Q_ACTION_CAST,
2012-08-14 18:00:48 -04:00
Q_EVT_CAST)
-emacro(1939, // 5-2-2, Down cast detected
Q_EVT_CAST,
2013-10-10 20:01:51 -04:00
Q_NEW,
Q_NEW_X)
2013-12-30 17:41:15 -05:00
-estring(1960,QP::QMAttr) // 9-5-1 declaration of union
2012-08-14 18:00:48 -04:00
-esym(1960, // 16-0-4 function-like macro
Q_ROM_BYTE,
Q_TRAN,
2014-04-13 21:35:34 -04:00
Q_TRAN_HIST,
2012-08-14 18:00:48 -04:00
Q_SUPER,
Q_STATE_CAST,
2013-10-10 20:01:51 -04:00
Q_ACTION_CAST,
2012-08-14 18:00:48 -04:00
Q_EVT_CAST)
2013-10-10 20:01:51 -04:00
-esym(1960, // 16-0-4 function-like macro
QM_ENTRY,
QM_EXIT,
QM_TRAN,
2014-04-13 21:35:34 -04:00
QM_TRAN_HIST,
QM_TRAN_INIT,
QM_TRAN_EP,
QM_TRAN_XP,
2013-10-10 20:01:51 -04:00
QM_HANDLED,
QM_UNHANDLED,
2014-04-13 21:35:34 -04:00
QM_SUPER,
QM_SUPER_SUB)
2012-08-14 18:00:48 -04:00
-esym(1712, // default constructor not defined
2013-10-10 20:01:51 -04:00
QMsm,
QHsm,
QFsm)
2012-08-14 18:00:48 -04:00
2013-10-10 20:01:51 -04:00
// QF
-emacro(929, // 5-2-7 cast from pointer to pointer
Q_NEW,
Q_NEW_X)
-efunc(925, // 5-2-8, 5-2-9 cast from pointer to pointer
*toActive,
*toTimeEvt)
2012-08-14 18:00:48 -04:00
-esym(1927, // 8-5-1 Symbol not in the ctor initializer list
2013-12-30 17:41:15 -05:00
QP::QActive::m_prio,
QP::QActive::m_eQueue,
QP::QActive::m_osObject,
QP::QActive::m_thread)
2012-08-14 18:00:48 -04:00
-estring(1923, // 16-2-2 could become const variable
QF_MAX_ACTIVE,
QF_MAX_EPOOL,
2013-10-10 20:01:51 -04:00
QF_MAX_TICK_RATE,
2012-08-14 18:00:48 -04:00
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,
2013-10-10 20:01:51 -04:00
QF_CRIT_EXIT_NOP,
QF_LOG2LKUP,
2012-08-14 18:00:48 -04:00
QF_QS_CRIT_ENTRY,
QF_QS_CRIT_EXIT,
QF_QS_ISR_ENTRY,
QF_QS_ISR_EXIT,
QF_QS_ACTION)
2013-10-10 20:01:51 -04:00
-esym(1960, // 16-0-2, '#define' used within a block
QF_EVENT_SIZ_SIZE,
QF_TIMEEVT_CTR_SIZE,
QF_ACTIVE_SUPER_,
2012-08-14 18:00:48 -04:00
QF_ACTIVE_STATE_)
-esym(1960, // 16-0-4 function-like macro
QF_INT_DISABLE,
QF_INT_ENABLE,
QF_CRIT_ENTRY,
QF_CRIT_EXIT,
2013-10-10 20:01:51 -04:00
QF_CRIT_EXIT_NOP,
QF_CPU_SLEEP,
Q_NEW,
Q_NEW_X,
2012-08-14 18:00:48 -04:00
PUBLISH,
2013-10-10 20:01:51 -04:00
POST,
POST_X,
TICK,
TICK_X,
tick,
postFIFO)
2012-08-14 18:00:48 -04:00
-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,
2013-02-12 10:02:51 -05:00
QF_MPOOL_EL,
2013-10-10 20:01:51 -04:00
QF_LOG2)
2012-08-14 18:00:48 -04:00
-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
2013-02-12 10:02:51 -05:00
-esym(1960, remove) // 17-0-2, Re-use of C++ identifier
2012-08-14 18:00:48 -04:00
-esym(1790, // Base class has no virtual functions
2013-12-30 17:41:15 -05:00
QP::QHsm,
QP::QFsm,
QP::QActive)
2012-08-14 18:00:48 -04:00
-esym(1401, // member not initialized by constructor
2013-12-30 17:41:15 -05:00
QP::QActive::m_prio,
QP::QActive::m_eQueue,
QP::QActive::m_osObject,
QP::QActive::m_thread)
2013-10-10 20:01:51 -04:00
-esym(1704, // constructor has private access specification
2013-12-30 17:41:15 -05:00
QP::QTimeEvt::QTimeEvt,
QP::QEQueue::QEQueue,
QP::QMPool::QMPool)
2012-08-14 18:00:48 -04:00
-esym(1712, // default constructor not defined for class
2013-12-30 17:41:15 -05:00
QActive,
QMActive,
QTimeEvt)
2012-08-14 18:00:48 -04:00
-esym(641, *Signals) // Converting enum '*Signals' to 'int'
2013-12-30 17:41:15 -05:00
-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
2012-08-14 18:00:48 -04:00
// QK
-esym(1960, // 16-0-4 function-like macro
QK_ISR_ENTRY,
QK_ISR_EXIT,
QK_EXT_SAVE,
QK_EXT_RESTORE,
QK_TLS)
2013-02-12 10:02:51 -05:00
-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_)
2012-08-14 18:00:48 -04:00
// 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(923, // 5-2-7, 5-2-8 cast from pointer to int
QS_OBJ_,
QS_FUN_)
2013-10-10 20:01:51 -04:00
-estring(1923, // 16-2-2 macro could become const variable
2012-08-14 18:00:48 -04:00
QS_RESET,
QS_TIME_SIZE,
QS_OBJ_PTR_SIZE,
QS_FUN_PTR_SIZE,
QS_OBJ_,
2013-10-10 20:01:51 -04:00
QS_FUN_,
QS_TEST,
QS_TEST_ASSERTION)
2012-08-14 18:00:48 -04:00
-esym(1960, // 16-0-4 function-like macro
QS_INIT,
QS_EXIT,
QS_DUMP,
2013-10-10 20:01:51 -04:00
QS_RESET,
2012-08-14 18:00:48 -04:00
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,
2013-10-10 20:01:51 -04:00
QS_USR_DICTIONARY,
QS_ASSERTION,
QS_TEST_ASSERTION,
QS_TEST,
2012-08-14 18:00:48 -04:00
QS_FLUSH,
QS_STR_ROM,
QS_MEM,
QS_SIG)
-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_U8_,
2013-10-10 20:01:51 -04:00
QS_2U8_,
2012-08-14 18:00:48 -04:00
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(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)
-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,
2013-10-10 20:01:51 -04:00
QS_ASSERTION,
2012-08-14 18:00:48 -04:00
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_,
2013-10-10 20:01:51 -04:00
QS_U8_,
QS_2U8_,
2012-08-14 18:00:48 -04:00
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,
2013-10-10 20:01:51 -04:00
QS_FUN_DICTIONARY,
2012-08-14 18:00:48 -04:00
QS_USR_DICTIONARY)
-emacro(717, QS_*) // do ... while(0);
-emacro(725, QS_END*) // Expected positive indentation
2013-12-30 17:41:15 -05:00
-esym(641, QP::QSType) // Converting enum '*QSType' to 'int'
2012-08-14 18:00:48 -04:00
// Miscallaneous
-estring(793,6) // ANSI/ISO limit of 6 significant chars exceeded
-e546 // Suspicious use of &
2013-10-10 20:01:51 -04:00