qpcpp/include/qpcpp.lnt

469 lines
11 KiB
Plaintext
Raw Normal View History

2015-05-14 16:05:04 -04:00
//////////////////////////////////////////////////////////////////////////////
// Product: PC-Lint 9.x option file for linting QP/C++ applications
2016-12-14 19:07:52 -05:00
// Last updated for version 5.8.1
// Last updated on 2016-12-12
2014-04-13 21:35:34 -04:00
//
// Q u a n t u m L e a P s
// ---------------------------
// innovating embedded systems
//
2015-12-31 14:56:37 -05:00
// Copyright (C) Quantum Leaps, LLC. All rights reserved.
2014-04-13 21:35:34 -04:00
//
// 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:
2015-12-31 14:56:37 -05:00
// http://www.state-machine.com
// mailto:info@state-machine.com
2015-05-14 16:05:04 -04:00
//////////////////////////////////////////////////////////////////////////////
2015-06-06 18:30:55 -04:00
// General
-estring(793,6) // ANSI/ISO limit of 6 significant chars exceeded
-esym(1960, // Rule 7-3-1, Global declaration of symbol
2015-05-14 16:05:04 -04:00
char_t,
int_t,
enum_t,
float32_t,
float64_t)
2015-06-06 18:30:55 -04:00
-estring(1960, // 11-0-1(req) non-private data member
2015-05-14 16:05:04 -04:00
sig,
poolId_,
refCtr_)
2015-06-06 18:30:55 -04:00
-estring(1927, // 8-5-1(req) not in the ctor initializer
2015-05-14 16:05:04 -04:00
QP::QEvt::poolId_,
QP::QEvt::refCtr_)
2015-06-06 18:30:55 -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,
2015-05-14 16:05:04 -04:00
QP_RELEASE,
Q_EVT_CTOR,
Q_SIGNAL_SIZE,
QP_VERSION)
2015-06-06 18:30:55 -04:00
-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
2015-05-14 16:05:04 -04:00
Q_DIM,
Q_UINT2PTR_CAST,
QEVT_INITIALIZER)
2015-06-06 18:30:55 -04:00
-esym(1790, // Base class has no virtual functions
2015-05-14 16:05:04 -04:00
QP::QEvt)
2015-06-06 18:30:55 -04:00
-estring(1712, QEvt) // default constructor not defined
-estring(1401, // member not initialized in the ctor
2015-05-14 16:05:04 -04:00
QP::QEvt::poolId_,
QP::QEvt::refCtr_)
2015-06-06 18:30:55 -04:00
-emacro(866, Q_DIM) // Unusual use of 'SYM' in argument to sizeof
-estring(970,bool) // Use of 'bool' outside of a typedef
2015-05-14 16:05:04 -04:00
// Assertions
2015-06-06 18:30:55 -04:00
-esym(1960, // Rule 7-3-1, Global declaration of symbol
2013-10-10 20:01:51 -04:00
Q_onAssert,
2015-05-14 16:05:04 -04:00
Q_onTestAssert)
2015-06-06 18:30:55 -04:00
-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
2015-05-14 16:05:04 -04:00
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_TEST_ASSERT,
Q_DEFINE_THIS_MODULE)
2015-06-06 18:30:55 -04:00
-emacro(522, // Highest operation lacks side-effects
2015-05-14 16:05:04 -04:00
Q_ASSERT,
Q_ASSERT_ID,
Q_ALLEGE,
Q_ALLEGE_ID,
Q_ERROR,
Q_ERROR_ID)
2015-06-06 18:30:55 -04:00
-emacro(1924, // 5-2-4 C-style cast
2015-05-14 16:05:04 -04:00
Q_ASSERT,
Q_ASSERT_ID,
Q_ALLEGE,
Q_ALLEGE_ID,
Q_ERROR,
Q_ERROR_ID)
2015-06-06 18:30:55 -04:00
-function(exit, // give these functions the semantics of "exit"
2013-10-10 20:01:51 -04:00
Q_onAssert,
2015-05-14 16:05:04 -04:00
Q_onTestAssert)
// QEP
2015-06-06 18:30:55 -04:00
-emacro(929, // 5-2-7(req) cast pointer to pointer
2015-05-14 16:05:04 -04:00
Q_STATE_CAST,
Q_ACTION_CAST,
Q_EVT_CAST)
2015-06-06 18:30:55 -04:00
-emacro(1939, // 5-2-2, Down cast detected
2015-05-14 16:05:04 -04:00
Q_EVT_CAST,
2013-10-10 20:01:51 -04:00
Q_NEW,
2015-09-29 11:34:38 -04:00
Q_NEW_X,
Q_NEW_REF)
2015-06-06 18:30:55 -04:00
-estring(1960, // 9-5-1 declaration of union
2016-12-01 10:31:49 -05:00
QP::QHsmAttr)
2015-06-06 18:30:55 -04:00
-esym(1960, // 16-0-4 function-like macro
2015-05-14 16:05:04 -04:00
Q_TRAN,
Q_TRAN_HIST,
Q_SUPER,
Q_STATE_CAST,
Q_ACTION_CAST,
Q_EVT_CAST)
2015-06-06 18:30:55 -04:00
-esym(1960, // 16-0-4 function-like macro
2015-05-14 16:05:04 -04:00
QM_ENTRY,
QM_EXIT,
2016-12-01 10:31:49 -05:00
QM_SM_EXIT,
2015-05-14 16:05:04 -04:00
QM_TRAN,
QM_TRAN_HIST,
QM_TRAN_INIT,
2014-04-13 21:35:34 -04:00
QM_TRAN_EP,
QM_TRAN_XP,
2015-05-14 16:05:04 -04:00
QM_HANDLED,
QM_UNHANDLED,
2014-04-13 21:35:34 -04:00
QM_SUPER,
2015-05-14 16:05:04 -04:00
QM_SUPER_SUB)
2015-06-06 18:30:55 -04:00
-esym(1712, // default constructor not defined
2015-05-14 16:05:04 -04:00
QMsm,
2016-12-01 10:31:49 -05:00
QHsm)
-esym(1511, // 2-10-2 Member hides non-virtual member
QP::QHsm::isIn,
QP::QHsm::state,
QP::QHsm::childState)
2015-05-14 16:05:04 -04:00
// QF
2015-06-06 18:30:55 -04:00
-emacro(929, // 5-2-7 cast from pointer to pointer
2013-10-10 20:01:51 -04:00
Q_NEW,
2015-09-29 11:34:38 -04:00
Q_NEW_X,
Q_NEW_REF)
2015-06-06 18:30:55 -04:00
-efunc(925, // 5-2-8, 5-2-9 cast from pointer to pointer
2015-05-14 16:05:04 -04:00
*toActive,
*toTimeEvt)
2015-06-06 18:30:55 -04:00
-esym(1927, // 8-5-1 Symbol not in the ctor initializer list
2015-05-14 16:05:04 -04:00
QP::QMActive::m_prio,
QP::QMActive::m_eQueue,
QP::QMActive::m_osObject,
QP::QMActive::m_thread)
2015-06-06 18:30:55 -04:00
-esym(1536, // 9-3-1, 9-3-2 Exposing low access member
2015-05-14 16:05:04 -04:00
QP::QMActive::m_osObject,
QP::QMActive::m_thread)
2016-09-29 19:54:50 -04:00
-estring(1960, // 11-0-1(req) non-private data member
2016-10-08 12:46:03 -04:00
m_eQueue,
2016-09-29 19:54:50 -04:00
m_thread,
m_prio)
2015-06-06 18:30:55 -04:00
-estring(1923, // 16-2-2 could become const variable
2015-05-14 16:05:04 -04:00
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)
2015-06-06 18:30:55 -04:00
-estring(1923, // 16-2-2 could become const variable
2015-05-14 16:05:04 -04:00
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)
2015-06-06 18:30:55 -04:00
-esym(1960, // 16-0-2, '#define' used within a block
2015-05-14 16:05:04 -04:00
QF_EVENT_SIZ_SIZE,
QF_TIMEEVT_CTR_SIZE,
QF_ACTIVE_SUPER_,
QF_ACTIVE_STATE_)
2015-06-06 18:30:55 -04:00
-esym(1960, // 16-0-4 function-like macro
2015-05-14 16:05:04 -04:00
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,
2015-05-14 16:05:04 -04:00
Q_NEW_X,
2015-09-29 11:34:38 -04:00
Q_NEW_REF,
Q_DELETE_REF,
2015-05-14 16:05:04 -04:00
PUBLISH,
2013-10-10 20:01:51 -04:00
POST,
POST_X,
2015-05-14 16:05:04 -04:00
TICK,
2013-10-10 20:01:51 -04:00
TICK_X,
tick,
2015-05-14 16:05:04 -04:00
postFIFO)
2015-06-06 18:30:55 -04:00
-esym(1960, // 16-0-4 function-like macro
2015-05-14 16:05:04 -04:00
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)
2015-06-06 18:30:55 -04:00
-esym(1960, // 16-0-4 function-like macro
2015-05-14 16:05:04 -04:00
QACTIVE_EQUEUE_WAIT_,
QACTIVE_EQUEUE_SIGNAL_,
QACTIVE_EQUEUE_ONEMPTY_,
QF_EPOOL_INIT_,
QF_EPOOL_EVENT_SIZE_,
QF_EPOOL_GET_,
QF_EPOOL_PUT_)
2015-06-06 18:30:55 -04:00
-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
2015-05-14 16:05:04 -04:00
QP::QMActive::m_prio,
QP::QMActive::m_eQueue,
QP::QMActive::m_osObject,
QP::QMActive::m_thread)
2015-06-06 18:30:55 -04:00
-esym(1704, // constructor has private access specification
2015-05-14 16:05:04 -04:00
QP::QTimeEvt::QTimeEvt,
2013-12-30 17:41:15 -05:00
QP::QEQueue::QEQueue,
QP::QMPool::QMPool)
2015-06-06 18:30:55 -04:00
-esym(1712, // default constructor not defined for class
2015-05-14 16:05:04 -04:00
QMActive,
QActive,
2016-12-14 19:07:52 -05:00
QTimeEvt,
QTicker)
2015-06-06 18:30:55 -04:00
-esym(641, *Signals) // Converting enum '*Signals' to 'int'
-esym(754, sto_) // local structure member 'sto' not referenced
2015-05-14 16:05:04 -04:00
-efunc(1960, QP::QPSet*::isEmpty) // incorrect reporting int->bool
-efunc(1960, QP::QPSet*::notEmpty) // incorrect reporting int->bool
2014-09-22 11:48:11 -04:00
-efunc(1960, QP::QPSet*::hasElement) // incorrect reporting int->bool
2015-05-14 16:05:04 -04:00
// QK
2016-09-01 11:58:57 -04:00
-estring(1960, // 11-0-1(req) non-private data member
2016-09-29 19:54:50 -04:00
actPrio,
nextPrio,
2016-09-01 11:58:57 -04:00
lockPrio,
lockHolder,
intNest,
readySet)
2015-06-06 18:30:55 -04:00
-esym(1960, // 16-0-4 function-like macro
2015-05-14 16:05:04 -04:00
QK_ISR_ENTRY,
QK_ISR_EXIT,
QK_EXT_SAVE,
QK_EXT_RESTORE,
QK_TLS)
2015-06-06 18:30:55 -04:00
-esym(1960, // 7-3-1, Global declaration of symbol
2015-05-14 16:05:04 -04:00
QK_readySet_,
QK_currPrio_,
QK_intNest_,
QK_init,
QK_sched_,
QK_schedExt_,
QK_schedPrio_,
QK_ceilingPrio_)
2016-04-01 13:55:34 -04:00
// QXK
-estring(1960, // 11-0-1(req) non-private data member
curr,
next,
lockPrio,
lockHolder,
2016-09-01 11:58:57 -04:00
intNest,
2016-04-01 13:55:34 -04:00
readySet)
-esym(1712, // default constructor not defined
QXThread)
-esym(1960, signal) // 17-0-2, Re-use of C++ identifier
2015-05-14 16:05:04 -04:00
// QS
2015-06-06 18:30:55 -04:00
-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
2015-05-14 16:05:04 -04:00
QS_OBJ_,
QS_FUN_)
2015-09-29 11:34:38 -04:00
-emacro(1960, QS_PTR_AT_) // 5-0-15 pointer arithmetic
2015-06-06 18:30:55 -04:00
-estring(1923, // 16-2-2 macro could become const variable
2015-05-14 16:05:04 -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,
2015-05-14 16:05:04 -04:00
QS_TEST_ASSERTION)
2015-06-06 18:30:55 -04:00
-esym(1960, // 16-0-4 function-like macro
2015-05-14 16:05:04 -04:00
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)
2015-06-06 18:30:55 -04:00
-esym(1960, // 16-0-4 function-like macro
2015-05-14 16:05:04 -04:00
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,
2013-10-10 20:01:51 -04:00
QS_TEST_ASSERTION,
2015-05-14 16:05:04 -04:00
QS_TEST,
QS_FLUSH,
QS_STR_ROM,
QS_MEM,
QS_SIG)
2015-06-06 18:30:55 -04:00
-esym(1960, // 16-0-4 function-like macro
2015-05-14 16:05:04 -04:00
QS_CRIT_ENTRY_,
QS_CRIT_EXIT_,
QS_BEGIN_,
QS_END_,
QS_GLB_FILTER_,
QS_BEGIN_NOCRIT_,
QS_END_NOCRIT_,
2013-10-10 20:01:51 -04:00
QS_U8_,
2015-05-14 16:05:04 -04:00
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_)
2015-06-06 18:30:55 -04:00
-esym(1923, // 16-2-2 could become const variable
2015-05-14 16:05:04 -04:00
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)
2015-06-06 18:30:55 -04:00
-esym(1923, // 16-2-2 could become const variable
2015-05-14 16:05:04 -04:00
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)
2015-06-06 18:30:55 -04:00
-esym(1923, // 16-2-2 could become const variable
2015-05-14 16:05:04 -04:00
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_)
2015-06-06 18:30:55 -04:00
-esym(1963, // 16-3-2, '#/##' operator used in macro
2015-05-14 16:05:04 -04:00
QS_SIG_DICTIONARY,
QS_OBJ_DICTIONARY,
QS_FUN_DICTIONARY,
QS_USR_DICTIONARY)
2015-06-06 18:30:55 -04:00
-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'
2015-12-31 14:56:37 -05:00
// Deprecated features--provided in the backwards compatibility API of QP/C
-estring(961, // MISRA04-19.7(adv) function-like macro
Q_ROM_BYTE)