Skip to content

feat(SCA): Add CodeChecker pipeline - #253

Open
Ruben-Lohberg wants to merge 2 commits into
mainfrom
code_checker
Open

feat(SCA): Add CodeChecker pipeline#253
Ruben-Lohberg wants to merge 2 commits into
mainfrom
code_checker

Conversation

@Ruben-Lohberg

@Ruben-Lohberg Ruben-Lohberg commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Adds advisory static code analysis using CodeChecker, Clang Static Analyzer, and Cppcheck. Results are reported in PRs and uploaded as artifacts, with optional local execution documented in CONTRIBUTING.md.

@Ruben-Lohberg Ruben-Lohberg linked an issue Jul 20, 2026 that may be closed by this pull request
@github-actions

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.elf.zip
openearable_v2_fota.zip

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

CodeChecker static analysis (advisory)

Note

This report is informational. It does not block merging and does not change code.

At a glance

Scope Result
Findings on lines changed by this PR 0
Findings in the complete codebase 83
Analyzer invocations completed 144
Analyzer invocations failed 8

Findings on changed lines

No non-style findings were reported on lines changed by this PR.

Analyzer coverage

Analyzer Completed Failed
clangsa 68 8
cppcheck 76 0
8 failed analyzer invocation(s)

These files received reduced analysis coverage. The first compiler diagnostic from each invocation is shown below.
The reason is that the clang frontend was not able to link them because of issues like implicit declaration. Target gcc build may still succeed.

Analyzer Source First diagnostic
clangsa src/drivers/ADAU1860.cpp:578 use of undeclared identifier 'strtoul'
clangsa src/SensorManager/Baro.cpp:54 non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing]
clangsa src/Battery/PowerManager.cpp:407 use of undeclared identifier 'abs'; did you mean 'fabs'?
clangsa src/audio/audio_datapath.c:657 call to undeclared function 'config_sensor'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
clangsa src/bluetooth/bt_management/bt_mgmt.c:166 void function 'connected_cb' should not return a value [-Wreturn-type]
clangsa src/bluetooth/gatt_services/device_info.c:20 call to undeclared library function 'snprintf' with type 'int (char *, unsigned int, const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
clangsa src/audio/streamctrl.c:539 call to undeclared function 'uicr_sirk_set'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
clangsa src/bluetooth/bt_stream/unicast/unicast_server.c:610 call to undeclared function 'channel_assignment_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Complete-codebase summary

Severity: 6 high, 77 low
Reported by analyzer: clangsa: 83

Complete-codebase findings

Each finding includes source context. The > line and carets identify the expression reported by the analyzer.

Show detailed findings with source context (83 of 83)
HIGHsrc/SensorManager/BMP388/bmp3.c:1034 — The left operand of '+' is a garbage value
  1033 |         {
> 1034 |             fifo_len = fifo_len + 4;
       |                        ^^^^^^^^
  1035 |         }
HIGHsrc/SensorManager/BMP388/bmp3.c:1038 — Assigned value is garbage or undefined
  1037 |         /* Update the fifo length in the fifo structure */
> 1038 |         dev->fifo->data.byte_count = fifo_len;
       |                                      ^^^^^^^^
  1039 | 
HIGHsrc/SensorManager/BMP388/bmp3.c:2343 — Assigned value is garbage or undefined
  2342 | {
> 2343 |     uint32_t uncomp_temp = uncomp_data->temperature;
       |                            ^^^^^^^^^^^^^^^^^^^^^^^^
  2344 |     double partial_data1;
HIGHsrc/audio/sw_codec_select.c:180 — 2nd function call argument is an uninitialized value
  179 | 
> 180 |             ret = sw_codec_lc3_enc_run(pcm_data_mono_ptrs[AUDIO_CH_L],
      |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 181 |                            pcm_block_size_mono, LC3_USE_BITRATE_FROM_INIT,
  182 |                            AUDIO_CH_L, sizeof(m_encoded_data),
HIGHsrc/audio/sw_codec_select.c:324 — 1st function call argument is an uninitialized value
  323 | 
> 324 |             ret = pscm_combine(pcm_in_data_ptrs[AUDIO_CH_L],
      |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  325 |                        pcm_in_data_ptrs[AUDIO_CH_R], pcm_size_mono,
HIGHsrc/buttons/Button.cpp:33 — 1st function call argument is an uninitialized value
  32 | 
> 33 |     button->_temp_buttonState = static_cast<button_action>(gpio_pin_get_dt(&(button->button)));
     |                                                                            ^^^^^^^^^^^^^^^^^
  34 | 
LOWsrc/Battery/BQ25120a.cpp:156 — Value stored to 'ret' during its initialization is never read
  155 |         uint8_t status = 0;
> 156 |         bool ret = readReg(registers::CTRL, (uint8_t *) &status, sizeof(status));
      |              ^^^
  157 | 
LOWsrc/Battery/BQ25120a.cpp:163 — Value stored to 'ret' during its initialization is never read
  162 |         uint8_t status = 0;
> 163 |         bool ret = readReg(registers::FAULT, (uint8_t *) &status, sizeof(status));
      |              ^^^
  164 | 
LOWsrc/Battery/BQ25120a.cpp:170 — Value stored to 'ret' during its initialization is never read
  169 |         uint8_t status = 0;
> 170 |         bool ret = readReg(registers::TS_FAULT, (uint8_t *) &status, sizeof(status));
      |              ^^^
  171 | 
LOWsrc/Battery/BQ25120a.cpp:177 — Value stored to 'ret' during its initialization is never read
  176 |         uint8_t status = 0;
> 177 |         bool ret = readReg(registers::CHARGE_CTRL, (uint8_t *) &status, sizeof(status));
      |              ^^^
  178 | 
LOWsrc/Battery/BQ25120a.cpp:203 — Value stored to 'ret' during its initialization is never read
  202 |         uint8_t status = 0;
> 203 |         bool ret = readReg(registers::CHARGE_CTRL, &status, sizeof(status));
      |              ^^^
  204 | 
LOWsrc/Battery/BQ25120a.cpp:258 — Value stored to 'ret' during its initialization is never read
  257 |         uint8_t status = 0;
> 258 |         bool ret = readReg(registers::LS_LDO_CTRL, (uint8_t *) &status, sizeof(status));
      |              ^^^
  259 | 
LOWsrc/Battery/BQ25120a.cpp:267 — Value stored to 'ret' during its initialization is never read
  266 |         uint8_t status = 0;
> 267 |         bool ret = readReg(registers::BAT_VOL_CTRL, (uint8_t *) &status, sizeof(status));
      |              ^^^
  268 | 
LOWsrc/Battery/BQ25120a.cpp:291 — Value stored to 'ret' during its initialization is never read
  290 |         uint8_t status = 0;
> 291 |         bool ret = readReg(registers::TERM_CTRL, (uint8_t *) &status, sizeof(status));
      |              ^^^
  292 | 
LOWsrc/Battery/BQ25120a.cpp:344 — Value stored to 'ret' during its initialization is never read
  343 | 
> 344 |         bool ret = readReg(registers::ILIM_UVLO, (uint8_t *) &status, sizeof(status));
      |              ^^^
  345 | 
LOWsrc/Battery/BQ25120a.cpp:411 — Value stored to 'ret' during its initialization is never read
  410 |         uint8_t status = 0;
> 411 |         bool ret = readReg(registers::BTN_CTRL, (uint8_t *) &status, sizeof(status));
      |              ^^^
  412 | 
LOWsrc/Battery/BQ27220.cpp:99 — Value stored to 'ret' during its initialization is never read
   98 |         uint16_t val = 0;
>  99 |         bool ret = readReg(registers::FLAGS, (uint8_t *) &val, sizeof(val));
      |              ^^^
  100 | 
LOWsrc/Battery/BQ27220.cpp:138 — Value stored to 'ret' during its initialization is never read
  137 |         uint16_t temp_K = 0;
> 138 |         bool ret = readReg(registers::TEMP, (uint8_t *) &temp_K, sizeof(temp_K));
      |              ^^^
  139 | 
LOWsrc/Battery/BQ27220.cpp:146 — Value stored to 'ret' during its initialization is never read
  145 |         uint16_t mV = 0;
> 146 |         bool ret = readReg(registers::VOLT, (uint8_t *) &mV, sizeof(mV));
      |              ^^^
  147 | 
LOWsrc/Battery/BQ27220.cpp:154 — Value stored to 'ret' during its initialization is never read
  153 |         uint16_t mAh = 0;
> 154 |         bool ret = readReg(registers::FCC, (uint8_t *) &mAh, sizeof(mAh));
      |              ^^^
  155 |         return mAh;
LOWsrc/Battery/BQ27220.cpp:160 — Value stored to 'ret' during its initialization is never read
  159 |         uint16_t minutes = 0;
> 160 |         bool ret = readReg(registers::TTF, (uint8_t *) &minutes, sizeof(minutes));
      |              ^^^
  161 |         return minutes;
LOWsrc/Battery/BQ27220.cpp:167 — Value stored to 'ret' during its initialization is never read
  166 |         uint16_t minutes = 0;
> 167 |         bool ret = readReg(registers::TTE, (uint8_t *) &minutes, sizeof(minutes));
      |              ^^^
  168 |         return minutes;
LOWsrc/Battery/BQ27220.cpp:173 — Value stored to 'ret' during its initialization is never read
  172 |         uint16_t soc = 0;
> 173 |         bool ret = readReg(registers::SOC, (uint8_t *) &soc, sizeof(soc));
      |              ^^^
  174 |         return soc;
LOWsrc/Battery/BQ27220.cpp:179 — Value stored to 'ret' during its initialization is never read
  178 |         uint16_t soc = 0;
> 179 |         bool ret = readReg(registers::SOH, (uint8_t *) &soc, sizeof(soc));
      |              ^^^
  180 |         return soc;
LOWsrc/Battery/BQ27220.cpp:185 — Value stored to 'ret' during its initialization is never read
  184 |         int16_t mA = 0;
> 185 |         bool ret = readReg(registers::NAC, (uint8_t *) &mA, sizeof(mA));
      |              ^^^
  186 |         return mA;
LOWsrc/Battery/BQ27220.cpp:191 — Value stored to 'ret' during its initialization is never read
  190 |         int16_t mA = 0;
> 191 |         bool ret = readReg(registers::AI, (uint8_t *) &mA, sizeof(mA));
      |              ^^^
  192 |         return mA;
LOWsrc/Battery/BQ27220.cpp:197 — Value stored to 'ret' during its initialization is never read
  196 |         uint16_t mAh = 0;
> 197 |         bool ret = readReg(registers::DCAP, (uint8_t *) &mAh, sizeof(mAh));
      |              ^^^
  198 |         return mAh;
LOWsrc/Battery/BQ27220.cpp:203 — Value stored to 'ret' during its initialization is never read
  202 |         uint16_t mAh = 0;
> 203 |         bool ret = readReg(registers::RM, (uint8_t *) &mAh, sizeof(mAh));
      |              ^^^
  204 |         return mAh;
LOWsrc/Battery/BQ27220.cpp:209 — Value stored to 'ret' during its initialization is never read
  208 |         int16_t mA = 0;
> 209 |         bool ret = readReg(registers::CC, (uint8_t *) &mA, sizeof(mA));
      |              ^^^
  210 |         return mA;
LOWsrc/Battery/BQ27220.cpp:215 — Value stored to 'ret' during its initialization is never read
  214 |         uint16_t n_cycles = 0;
> 215 |         bool ret = readReg(registers::CYCT, (uint8_t *) &n_cycles, sizeof(n_cycles));
      |              ^^^
  216 |         return n_cycles;
LOWsrc/Battery/BQ27220.cpp:221 — Value stored to 'ret' during its initialization is never read
  220 |         int16_t mA = 0;
> 221 |         bool ret = readReg(registers::SI, (uint8_t *) &mA, sizeof(mA));
      |              ^^^
  222 | 
LOWsrc/Battery/BQ27220.cpp:229 — Value stored to 'ret' during its initialization is never read
  228 |         uint16_t status = 0;
> 229 |         bool ret = readReg(registers::OP_STAT, (uint8_t *) &status, sizeof(status));
      |              ^^^
  230 |         
LOWsrc/Battery/BQ27220.cpp:309 — Value stored to 'ret' is never read
  308 |         k_usleep(BQ27220_RAM_TIMEOUT_US);
> 309 |         ret = readReg(0x40, data, len);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^
  310 | }
LOWsrc/Battery/BQ27220.cpp:323 — Value stored to 'ret' is never read
  322 | 
> 323 |         ret = readReg(0x61, (uint8_t *) &data_len, sizeof(data_len));
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  324 |         ret = readReg(0x40, buf, len);
LOWsrc/Battery/BQ27220.cpp:324 — Value stored to 'ret' is never read
  323 |         ret = readReg(0x61, (uint8_t *) &data_len, sizeof(data_len));
> 324 |         ret = readReg(0x40, buf, len);
      |               ^^^^^^^^^^^^^^^^^^^^^^^
  325 |         ret = readReg(0x60, (uint8_t *) &check_sum, sizeof(check_sum));
LOWsrc/Battery/BQ27220.cpp:325 — Value stored to 'ret' is never read
  324 |         ret = readReg(0x40, buf, len);
> 325 |         ret = readReg(0x60, (uint8_t *) &check_sum, sizeof(check_sum));
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  326 | 
LOWsrc/Battery/BQ27220.cpp:388 — Value stored to 'ret' is never read
  387 |         // design and full charge capacity
> 388 |         ret = write_RAM(0x929F, _battery_settings.capacity);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  389 |         ret = write_RAM(0x929D, _battery_settings.capacity); //130
LOWsrc/Battery/BQ27220.cpp:389 — Value stored to 'ret' is never read
  388 |         ret = write_RAM(0x929F, _battery_settings.capacity);
> 389 |         ret = write_RAM(0x929D, _battery_settings.capacity); //130
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  390 |         // near full
LOWsrc/Battery/BQ27220.cpp:391 — Value stored to 'ret' is never read
  390 |         // near full
> 391 |         ret = write_RAM(0x926B, 5);
      |               ^^^^^^^^^^^^^^^^^^^^
  392 | 
LOWsrc/Battery/BQ27220.cpp:393 — Value stored to 'ret' is never read
  392 | 
> 393 |         ret = write_RAM(0x91F5, _battery_settings.temp_min * 10);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  394 |         ret = write_RAM(0x91F7, _battery_settings.temp_max * 10);
LOWsrc/Battery/BQ27220.cpp:394 — Value stored to 'ret' is never read
  393 |         ret = write_RAM(0x91F5, _battery_settings.temp_min * 10);
> 394 |         ret = write_RAM(0x91F7, _battery_settings.temp_max * 10);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  395 | 
LOWsrc/Battery/BQ27220.cpp:397 — Value stored to 'ret' is never read
  396 |         // charge current
> 397 |         ret = write_RAM(0x91FB, _battery_settings.i_charge);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  398 | 
LOWsrc/Battery/BQ27220.cpp:400 — Value stored to 'ret' is never read
  399 |         // charge voltage
> 400 |         ret = write_RAM(0x91FD, _battery_settings.u_term * 1000);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  401 | 
LOWsrc/Battery/BQ27220.cpp:403 — Value stored to 'ret' is never read
  402 |         // taper current
> 403 |         ret = write_RAM(0x9201, _battery_settings.i_term);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  404 | 
LOWsrc/Battery/BQ27220.cpp:406 — Value stored to 'ret' is never read
  405 |         // experimental: min taper capacity
> 406 |         ret = write_RAM(0x9203, 4); // standard: 25
      |               ^^^^^^^^^^^^^^^^^^^^
  407 | 
LOWsrc/Battery/BQ27220.cpp:410 — Value stored to 'ret' is never read
  409 |         uint8_t val = 1;
> 410 |         ret = write_RAM(0x91DE, &val, sizeof(uint8_t));
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  411 |         
LOWsrc/Battery/BQ27220.cpp:418 — Value stored to 'ret' is never read
  417 |         // sleep current
> 418 |         ret = write_RAM(0x9217, 1);
      |               ^^^^^^^^^^^^^^^^^^^^
  419 | 
LOWsrc/Battery/BQ27220.cpp:421 — Value stored to 'ret' is never read
  420 |         // dischage current trd
> 421 |         ret = write_RAM(0x9228, 2);
      |               ^^^^^^^^^^^^^^^^^^^^
  422 |         // charge current trd
LOWsrc/Battery/BQ27220.cpp:423 — Value stored to 'ret' is never read
  422 |         // charge current trd
> 423 |         ret = write_RAM(0x922A, 2);
      |               ^^^^^^^^^^^^^^^^^^^^
  424 |         // quit current
LOWsrc/Battery/BQ27220.cpp:425 — Value stored to 'ret' is never read
  424 |         // quit current
> 425 |         ret = write_RAM(0x922C, 1);
      |               ^^^^^^^^^^^^^^^^^^^^
  426 | 
LOWsrc/Battery/BQ27220.cpp:447 — Value stored to 'ret' is never read
  446 |         // sysDown set Voltage
> 447 |         ret = write_RAM(0x9240, _battery_settings.u_vlo * 1000 + CONFIG_BATTERY_SYSDOWN_SET_OFFSET);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  448 | 
LOWsrc/Battery/BQ27220.cpp:450 — Value stored to 'ret' is never read
  449 |         // sysDown clear Voltage
> 450 |         ret = write_RAM(0x9243, _battery_settings.u_vlo * 1000 + CONFIG_BATTERY_SYSDOWN_SET_OFFSET + CONFIG_BATTERY_SYSDOWN_HYSTERESIS);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  451 | 
LOWsrc/Battery/BQ27220.cpp:453 — Value stored to 'ret' is never read
  452 |         // FD set
> 453 |         ret = write_RAM(0x9282, _battery_settings.u_vlo * 1000 + CONFIG_BATTERY_FD_SET_OFFSET);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  454 | 
LOWsrc/Battery/BQ27220.cpp:456 — Value stored to 'ret' is never read
  455 |         // FD clear
> 456 |         ret = write_RAM(0x9284, _battery_settings.u_vlo * 1000 + CONFIG_BATTERY_FD_SET_OFFSET + CONFIG_BATTERY_FD_HYSTERESIS); 
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  457 | 
LOWsrc/Battery/BQ27220.cpp:459 — Value stored to 'ret' is never read
  458 |         // FC Voltage
> 459 |         ret = write_RAM(0x9288, _battery_settings.u_term * 1000 - CONFIG_BATTERY_FC_VOLTAGE_OFFSET);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  460 | 
LOWsrc/Battery/BQ27220.cpp:462 — Value stored to 'ret' is never read
  461 |         // Electonic Load in 3µA steps
> 462 |         ret = write_RAM(0x9269, 6); // 18 µA
      |               ^^^^^^^^^^^^^^^^^^^^
  463 | 
LOWsrc/Battery/BQ27220.cpp:467 — Value stored to 'ret' is never read
  466 |         //C0
> 467 |         ret = write_RAM(0x92A9, 480); //bat1:250
      |               ^^^^^^^^^^^^^^^^^^^^^^
  468 |         //R0
LOWsrc/Battery/BQ27220.cpp:469 — Value stored to 'ret' is never read
  468 |         //R0
> 469 |         ret = write_RAM(0x92AB, 19941); //bat1: 19941 //22542 //new bat:  17340
      |               ^^^^^^^^^^^^^^^^^^^^^^^^
  470 |         //R1
LOWsrc/Battery/BQ27220.cpp:481 — Value stored to 'ret' is never read
  480 |         uint8_t flags_b = 0x8C;
> 481 |         ret = write_RAM(0x9281, &flags_b, sizeof(flags_b));
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  482 | 
LOWsrc/Battery/BQ27220.cpp:484 — Value stored to 'ret' is never read
  483 |         // Overload current
> 484 |         ret = write_RAM(0x9264, _battery_settings.i_max);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  485 | 
LOWsrc/Battery/BQ27220.cpp:488 — Value stored to 'ret' is never read
  487 |         uint8_t cedv_conf = 0x0D; //Default: 0x08, Enable SMEXT, SMEN 0x0D
> 488 |         ret = write_RAM(0x9271, &cedv_conf, sizeof(cedv_conf));
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  489 | 
LOWsrc/Battery/BQ27220.cpp:490 — Value stored to 'ret' is never read
  489 | 
> 490 |         ret = write_RAM(0x9272, 3700);
      |               ^^^^^^^^^^^^^^^^^^^^^^^
  491 | 
LOWsrc/SD_Card/SD_Card_Manager/SD_Card_Manager.cpp:45 — Value stored to 'ret' is never read
  44 |     if (!_inserted) {
> 45 |         ret = sdcard_manager.unmount();
     |               ^^^^^^^^^^^^^^^^^^^^^^^^
  46 |         LOG_INF("SD card unmounted due to card removal.");
LOWsrc/SD_Card/SD_Card_Manager/SD_Card_Manager.cpp:115 — Value stored to 'ret' is never read
  114 | 
> 115 |     ret = pm_device_runtime_put(ls_1_8);
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  116 |     ret = pm_device_runtime_put(ls_3_3);
LOWsrc/SD_Card/SD_Card_Manager/SD_Card_Manager.cpp:116 — Value stored to 'ret' is never read
  115 |     ret = pm_device_runtime_put(ls_1_8);
> 116 |     ret = pm_device_runtime_put(ls_3_3);
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  117 |     ret = pm_device_runtime_put(ls_sd);
LOWsrc/SD_Card/SD_Card_Manager/SD_Card_Manager.cpp:117 — Value stored to 'ret' is never read
  116 |     ret = pm_device_runtime_put(ls_3_3);
> 117 |     ret = pm_device_runtime_put(ls_sd);
      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  118 | 
LOWsrc/SD_Card/SD_Card_Manager/SD_Card_Manager.cpp:128 — Value stored to 'ret' is never read
  127 |     if (!device_is_ready(sd_state_pin.port)) {
> 128 |         ret = aquire_ls();
      |               ^^^^^^^^^^^
  129 |         LOG_ERR("SD state GPIO device not ready\n");
LOWsrc/SD_Card/SD_Card_Manager/SD_Card_Manager.cpp:178 — Value stored to 'ret' is never read
  177 | 
> 178 |     ret = aquire_ls();
      |           ^^^^^^^^^^^
  179 | 
LOWsrc/SensorManager/BMP388/Adafruit_BMP3XX.cpp:115 — Value stored to 'rslt' is never read
  114 | 
> 115 |   rslt = bmp3_init(&the_sensor);
      |          ^^^^^^^^^^^^^^^^^^^^^^
  116 | #ifdef BMP3XX_DEBUG
LOWsrc/SensorManager/BMX160/DFRobot_BMX160.cpp:97 — Value stored to 'rslt' is never read
  96 |   if (Obmx160 == NULL){
> 97 |     rslt = BMX160_E_NULL_PTR;
     |            ^^^^^^^^^^^^^^^^^
  98 |   }  
LOWsrc/SensorManager/MAXM86161/MAXM86161.cpp:149 — Value stored to 'status' is never read
  148 |         
> 149 |         status = _read_block(REG_FIFO_DATA, number_of_bytes, (uint8_t *) databuffer);
      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  150 | 
LOWsrc/SensorManager/MAXM86161/MAXM86161.cpp:439 — Value stored to 'status' is never read
  438 |     int status;
> 439 |     status = _read_from_reg(REG_IRQ_STATUS2, value);
      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  440 |     status = _read_from_reg(REG_IRQ_STATUS1, value);
LOWsrc/SensorManager/MLX90632/MLX90632.cpp:247 — Value stored to 'sensorTemp' during its initialization is never read
  246 | 
> 247 |     double sensorTemp = P_O + (AMB - P_R) / P_G + P_T * pow((AMB - P_R), 2);
      |            ^^^^^^^^^^
  248 | 
LOWsrc/SensorManager/SensorManager.cpp:77 — Value stored to 'ret' is never read
  76 |     while (1) {
> 77 |         ret = k_poll(&sensor_manager_evt, 1, K_FOREVER);
     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  78 | 
LOWsrc/audio/audio_system.c:137 — Value stored to 'ret' is never read
  136 |         /* Don't start encoding until the stream needing it has started */
> 137 |         ret = k_poll(&encoder_evt, 1, K_FOREVER);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  138 | 
LOWsrc/bluetooth/bt_management/scanning/bt_mgmt_scan.c:58 — Value stored to 'scan_param' during its initialization is never read
  57 | 
> 58 |     struct bt_le_scan_param *scan_param =
     |                              ^^^^^^^^^^
  59 |         BT_LE_SCAN_PARAM(NRF5340_AUDIO_GATEWAY_SCAN_TYPE, BT_LE_SCAN_OPT_FILTER_DUPLICATE,
LOWsrc/bluetooth/bt_stream/bt_le_audio_tx/bt_le_audio_tx.c:101 — Value stored to 'iso_chan' is never read
  100 | 
> 101 |             iso_chan = bt_bap_stream_iso_chan_get(&cap_stream->bap_stream);
      |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  102 | 
LOWsrc/drivers/LED_Controller/KTD2026.cpp:100 — Value stored to 'ret' is never read
   99 |         
> 100 |         ret = pm_device_runtime_get(ls_1_8);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  101 |         ret = pm_device_runtime_get(ls_3_3);
LOWsrc/drivers/LED_Controller/KTD2026.cpp:101 — Value stored to 'ret' is never read
  100 |         ret = pm_device_runtime_get(ls_1_8);
> 101 |         ret = pm_device_runtime_get(ls_3_3);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  102 | 
LOWsrc/drivers/LED_Controller/KTD2026.cpp:123 — Value stored to 'ret' during its initialization is never read
  122 | 
> 123 |         int ret = pm_device_runtime_put(ls_1_8);
      |             ^^^
  124 |         ret = pm_device_runtime_put(ls_3_3);
LOWsrc/drivers/LED_Controller/KTD2026.cpp:124 — Value stored to 'ret' is never read
  123 |         int ret = pm_device_runtime_put(ls_1_8);
> 124 |         ret = pm_device_runtime_put(ls_3_3);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  125 | 
LOWsrc/modules/hw_codec_adau1860.cpp:63 — Value stored to 'ret' is never read
  62 | 
> 63 |     ret = dac.fdsp_bank_select((uint8_t) mode);
     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  64 |     // TODO: make writing to bank work
LOWsrc/modules/hw_codec_adau1860.cpp:66 — Value stored to 'ret' is never read
  65 |     k_msleep(200);
> 66 |     ret = hw_codec_volume_adjust(0);
     |           ^^^^^^^^^^^^^^^^^^^^^^^^^
  67 |     ret = dac.mute(muted);

Open the workflow run and download the complete CodeChecker report for a detailed view. Check out codechecker.html/index.html.

@Ruben-Lohberg Ruben-Lohberg linked an issue Jul 20, 2026 that may be closed by this pull request
@github-actions

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.elf.zip
openearable_v2_fota.zip

@github-actions

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.elf.zip
openearable_v2_fota.zip

@github-actions

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.elf.zip
openearable_v2_fota.zip

@github-actions

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.elf.zip
openearable_v2_fota.zip

@github-actions

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.elf.zip
openearable_v2_fota.zip

@github-actions

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.elf.zip
openearable_v2_fota.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FW: Add a linter

1 participant