Skip to content

cppcheck: Upgrade cppcheck to V2.8

Wei-Chia Su requested to merge cppcheck into main

cppcheck: Update guide, wrapper and suppression list

This patch updates document/script to cppcheck V2.8 and bypass error ids with unknown macro before switching to V2.8 which is also compatible with V1.90.


cmn700: Refines conditional check flow in is_hnf_inside_rect()

Fixes the cppcheck V2.8 warning with id knownConditionTrueFalse. There is no need to check the condition within the inner if-else statement since condition 'hnf_node_pos.port_num<=region_hnf_pos_end.port_num' is alongside with boundary check and is always true.


mod_sensor: Refine sensor_enable/disable and fix potential defects

For sensor_enable/disable, this patch removes duplicate statmentt to get sensor_dev_ctx by element index. In additions, this patch applies const to function parameter in preparation for switching to cppcheck V2.8.


module: Resolve defect with cppcheck V2.8

Fixes the error with id:

  • arrayIndexOutOfBoundsCond
  • constParameter
  • constStatement
  • constVariable
  • knownConditionTrueFalse
  • missingReturn
  • nullPointer
  • unreadVariable

product/rcar: Resolve defect with cppcheck V2.8

Fixes the error with id:

  • constVariable
  • constParameter

product/n1sdp: Resolve defect with cppcheck V2.8

Fixes the error with id:

  • constParameter
  • unassignedVariable

product/synquacer: Resolve defect with cppcheck V2.8

Fixes the error with id:

  • arrayIndexOutOfBoundsCond
  • constStatement

product/morello: Resolve defect with cppcheck V2.8

Fixes the error with id:

  • constParameter

product/juno: Resolve defect with cppcheck V2.8

Fixes the error with id:

  • constParameter

fwk: Resovle defect with cppcheck V2.8

Fixes the error with id:

  • arrayIndexOutOfBoundsCond
  • constParameter

Signed-off-by: Wei-Chia Su Wei-Chia.Su@arm.com

Merge request reports