mirror of
https://github.com/QuantumLeaps/qpc.git
synced 2025-01-28 07:03:10 +08:00
283 lines
7.2 KiB
Plaintext
283 lines
7.2 KiB
Plaintext
/// @file
|
|
/// @brief PC-Lint-Plus option file for linting QP/C source code
|
|
/// @cond
|
|
///===========================================================================
|
|
/// Last updated for version 6.9.1
|
|
/// Last updated on 2020-09-17
|
|
///
|
|
/// Q u a n t u m L e a P s
|
|
/// ------------------------
|
|
/// Modern Embedded Software
|
|
///
|
|
/// Copyright (C) 2005-2020 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 <www.gnu.org/licenses>.
|
|
///
|
|
/// Contact information:
|
|
/// <www.state-machine.com/licensing>
|
|
/// <info@state-machine.com>
|
|
///===========================================================================
|
|
/// @endcond
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// general options
|
|
-unit_check // perform only subset check (suppresses Global Wrapup)
|
|
-max_threads=1 // suppress message "no '-max_threads=N' option"
|
|
//-vf // print names of all source files (for debugging linting)
|
|
|
|
// include directories
|
|
-i. // QP/C port includes (see also qk/ and qv/)
|
|
-i%QPC%/include // QP/C public includes
|
|
-i%QPC%/src // QP/C package-scope includes
|
|
|
|
// standards
|
|
// language standard...
|
|
-std=c89 // C language standard
|
|
au-misra3.lnt // MISRA-C:2012
|
|
au-misra3-amd1.lnt // MISRA-C:2012 amendment 1 options
|
|
au-ds.lnt // Dan Saks recommendations
|
|
//-strong(AXJ) // Strong type checking
|
|
|
|
// size/alignment options
|
|
cpu.lnt // for the chosen CPU
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// QP/C options for clients
|
|
qpc.lnt // QP/C options
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// additional suppression rules for building QP/C source code...
|
|
|
|
// QEP -----------------------------------------------------------------------
|
|
|
|
// M3-D4.8(a) complete definition is unnecessary in this translation unit
|
|
-efile(9045,
|
|
-qep.h)
|
|
|
|
// M3-D4.9(adv) function-like macro
|
|
-esym(9026,
|
|
QEP_TRIG_,
|
|
QEP_ENTER_,
|
|
QEP_EXIT_,
|
|
QEP_ACT_PTR_INC_)
|
|
|
|
// QF ------------------------------------------------------------------------
|
|
// M3-D4.8(a) complete definition is unnecessary in this translation unit
|
|
-efile(9045,
|
|
-qf.h,
|
|
-qequeue.h,
|
|
-qmpool.h,
|
|
-qf_pkg.h)
|
|
|
|
// M3-D4.9(adv) function-like macro
|
|
-esym(9026,
|
|
QF_EVT_CONST_CAST_,
|
|
QF_EVT_REF_CTR_INC_,
|
|
QF_EVT_REF_CTR_DEC_,
|
|
QF_PTR_AT_,
|
|
QF_CRIT_E_,
|
|
QF_CRIT_X_,
|
|
Q_ASSERT_CRIT_,
|
|
Q_REQUIRE_CRIT_,
|
|
Q_ERROR_CRIT_,
|
|
QF_SCHED_LOCK_,
|
|
QF_SCHED_UNLOCK_,
|
|
QF_ISR_CONTEXT_,
|
|
QF_PTR_RANGE_,
|
|
QF_MPOOL_EL,
|
|
QTICKER_CAST_)
|
|
|
|
// M3-R11.3(r) cast from pointer to object type
|
|
-emacro(9087,
|
|
QTICKER_CAST_)
|
|
|
|
// suspicious pointer-to-pointer conversion (area too small)
|
|
-emacro(826,
|
|
QTICKER_CAST_)
|
|
|
|
// definition of macro ends in semi-colon
|
|
-esym(823,
|
|
QF_CRIT_STAT_)
|
|
|
|
// M3-R11.8(r) cast drops const qualifier
|
|
-emacro(9005,
|
|
QF_EVT_REF_CTR_INC_,
|
|
QF_EVT_REF_CTR_DEC_,
|
|
QF_EPOOL_PUT_)
|
|
|
|
// M3-D11.5(a) conversion from pointer to void to other pointer type
|
|
-efunc(9079,
|
|
QF_bzero)
|
|
|
|
// M3-R17.8(a) function parameter modified
|
|
-efunc(9044,
|
|
QF_LOG2,
|
|
QMPool_init)
|
|
|
|
// M3-R18.1(r) potential out of bounds pointer access
|
|
-emacro(661,
|
|
QF_EPOOL_EVENT_SIZE_)
|
|
|
|
// M3-R11.5(a) conversion from pointer to void to other pointer type
|
|
-emacro(9079,
|
|
QF_EPOOL_GET_)
|
|
-efunc(9079,
|
|
QF_deleteRef_,
|
|
QMPool_get,
|
|
QMPool_put)
|
|
|
|
// M3-R11.5(a) conversion from pointer to void to other pointer type
|
|
-efunc(9079,
|
|
QMPool_init,
|
|
QF_tickX_,
|
|
QTimeEvt_armX,
|
|
QTimeEvt_rearm)
|
|
|
|
// M3-R18.3(r) relational operator <= applied to pointers
|
|
-emacro(946,
|
|
QF_PTR_RANGE_)
|
|
|
|
// M3-R8.13(a) parameter of function could be pointer to const
|
|
-efunc(818,
|
|
QActive_start_,
|
|
QTicker_postLIFO_)
|
|
|
|
|
|
// definition of macro ends in semi-colon
|
|
-esym(823,
|
|
QF_SCHED_STAT_)
|
|
|
|
// QV ------------------------------------------------------------------------
|
|
|
|
// QK ------------------------------------------------------------------------
|
|
|
|
// M3-D4.9(a) function-like macro
|
|
-esym(9026,
|
|
QK_ISR_CONTEXT_,
|
|
QK_ISR_ENTRY,
|
|
QK_ISR_EXIT)
|
|
|
|
|
|
// QXK -----------------------------------------------------------------------
|
|
// M3-D4.9(a) function-like macro
|
|
-esym(9026,
|
|
QXK_ISR_CONTEXT_,
|
|
QXK_CONTEXT_SWITCH_,
|
|
QXK_PTR_CAST_,
|
|
QXTHREAD_CAST_)
|
|
|
|
// M3-D4.8(a) complete definition of is unnecessary in this translation unit
|
|
// (because this is not used in the library code, but needed in client code)
|
|
-efile(9045,
|
|
-qxthread.h)
|
|
|
|
// M3-R11.3(r) cast to pointer to different object type
|
|
-emacro(9087,
|
|
QXK_PTR_CAST_,
|
|
QXTHREAD_CAST_)
|
|
|
|
// M3-R11.5(a) conversion from pointer to void to other pointer type
|
|
-emacro(9079,
|
|
QXK_PTR_CAST_)
|
|
|
|
// suspicious pointer-to-pointer conversion (area too small)
|
|
-emacro(826,
|
|
QXK_PTR_CAST_,
|
|
QXTHREAD_CAST_)
|
|
|
|
// cast increases required alignment from 2 to 4
|
|
-emacro(2445,
|
|
QXK_PTR_CAST_)
|
|
|
|
// M3-R8.13(a) parameter 'me' of function could be pointer to const
|
|
-efunc(818,
|
|
QXThread_init_,
|
|
QXThread_dispatch_,
|
|
QXThread_postLIFO_)
|
|
|
|
|
|
// QS ------------------------------------------------------------------------
|
|
// the following options are needed only when Q_SPY is defined...
|
|
|
|
// M3-D4.9(a) function-like macro
|
|
-esym(9026,
|
|
QS_INSERT_BYTE_,
|
|
QS_INSERT_ESC_BYTE_)
|
|
|
|
// M3-D4.9(adv) function-like macro
|
|
-esym(9026,
|
|
QS_CRIT_E_,
|
|
QS_CRIT_X_,
|
|
QS_PTR_INC_)
|
|
|
|
// M3-R14.3(r) boolean condition for 'if' always evaluates to 'false'
|
|
-emacro(774,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// the right operand to << always evaluates to 0
|
|
-emacro(845,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// M3-R11.4(a) conversion between object pointer type and integer type
|
|
// excessive shift value (precision 3 shifted right by 3)
|
|
-emacro(572,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// Constant expression evaluates to 0 in 'binary' operation '>>'
|
|
-emacro(778,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
-emacro(9078,
|
|
QS_OBJ_PRE_,
|
|
QS_FUN_PRE_)
|
|
|
|
// M3-R11.6(r) explicit cast from 'void *volatile' to 'uint32_t'
|
|
-emacro(923,
|
|
QS_OBJ_PRE_,
|
|
QS_FUN_PRE_)
|
|
|
|
// M3-R11.1(4) conversion between pointer to function and differing type
|
|
-emacro(9074,
|
|
QS_FUN_PRE_)
|
|
|
|
// definition of macro ends in semi-colon
|
|
-esym(823,
|
|
QS_CRIT_STAT_,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// constant value used in Boolean context (left operand to || operator)
|
|
-emacro(506,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// union initialization
|
|
-efunc(708,
|
|
QS_f64_fmt_)
|
|
|
|
// M3-R19.2(a) union declared
|
|
-efunc(9018,
|
|
QS_f32_fmt_,
|
|
QS_f64_fmt_)
|
|
|