Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix static analysis #393

Merged
merged 9 commits into from
Mar 3, 2025
Merged

fix static analysis #393

merged 9 commits into from
Mar 3, 2025

Conversation

finger563
Copy link
Contributor

Description

Fix static analysis issues in the repo

Motivation and Context

After updating esp-cpp/StaticAnalysis to latest, more issues were found in SA in recent PRs, so this PR aims to fix those issues.

How has this been tested?

Building the examples.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

@finger563 finger563 self-assigned this Mar 3, 2025
@finger563 finger563 added bug Something isn't working static analysis chore labels Mar 3, 2025
Copy link

github-actions bot commented Mar 3, 2025

⚡ Static analysis result ⚡

🔴 cppcheck found 52 issues! Click here to see details.

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/ftp/include/ftp_client.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/cli/include/line_input.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/cli/include/cli.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/file_system/src/file_system.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/binary-log/example/main/binary_log_example.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/ble_gatt_server/include/ble_gatt_server_menu.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/ble_gatt_server/example/main/ble_gatt_server_example.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/event_manager/src/event_manager.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/hid_service/example/main/hid_service_example.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/color/src/color.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/input_drivers/include/touchpad_input.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/input_drivers/include/keypad_input.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/gt911/include/gt911.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/nvs/example/main/nvs_example.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/matouch-rotary-display/example/main/matouch_rotary_display_example.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/rtsp/include/jpeg_header.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/rtsp/include/rtsp_client.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/rtsp/include/rtsp_server.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/rtsp/include/jpeg_frame.hpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/monitor/example/main/monitor_example.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

State_2::ChildState COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE_OBJ;
DeepHistoryState COMPLEX_OBJ__STATE_2_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;
State_2::ChildState2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ;
State_2::ChildState3::Grand COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ;
State_2::ChildState3::Grand2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ;
State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ;

!Line: 656 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations. [initializerList]

!Line: 240 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.
!Line: 656 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.

DeepHistoryState COMPLEX_OBJ__STATE_2_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;
State_2::ChildState2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ;
State_2::ChildState3::Grand COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ;
State_2::ChildState3::Grand2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ;
State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ;
ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;

!Line: 657 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations. [initializerList]

!Line: 241 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.
!Line: 657 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.

State_2::ChildState2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ;
State_2::ChildState3::Grand COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ;
State_2::ChildState3::Grand2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ;
State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ;
ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
State_2 COMPLEX_OBJ__STATE_2_OBJ;

!Line: 658 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations. [initializerList]

!Line: 242 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.
!Line: 658 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.

State_2::ChildState3::Grand COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ;
State_2::ChildState3::Grand2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ;
State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ;
ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
State_2 COMPLEX_OBJ__STATE_2_OBJ;
State3::ChildState2 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ;

!Line: 659 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 243 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations.
!Line: 659 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations.

State_2::ChildState3::Grand2 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ;
State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ;
ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
State_2 COMPLEX_OBJ__STATE_2_OBJ;
State3::ChildState2 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ;
ShallowHistoryState COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;

!Line: 660 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 245 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations.
!Line: 660 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ__GRAND2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' due to the order of declarations.

State_2::ChildState3 COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ;
ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
State_2 COMPLEX_OBJ__STATE_2_OBJ;
State3::ChildState2 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ;
ShallowHistoryState COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
DeepHistoryState COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;

!Line: 661 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations. [initializerList]

!Line: 247 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.
!Line: 661 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.

ShallowHistoryState COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
State_2 COMPLEX_OBJ__STATE_2_OBJ;
State3::ChildState2 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ;
ShallowHistoryState COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
DeepHistoryState COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;
State3::ChildState COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ;

!Line: 662 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations. [initializerList]

!Line: 248 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.
!Line: 662 - note: Member variable 'Root::COMPLEX_OBJ__STATE_2_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE_2_OBJ' due to the order of declarations.

State3::ChildState2 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ;
ShallowHistoryState COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
DeepHistoryState COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;
State3::ChildState COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ;
State3::ChildState3 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ;
State3 COMPLEX_OBJ__STATE3_OBJ;

!Line: 664 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 250 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.
!Line: 664 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE2_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.

ShallowHistoryState COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ;
DeepHistoryState COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;
State3::ChildState COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ;
State3::ChildState3 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ;
State3 COMPLEX_OBJ__STATE3_OBJ;
// END state object

!Line: 665 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 251 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.
!Line: 665 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__SHALLOW_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.

DeepHistoryState COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ;
State3::ChildState COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ;
State3::ChildState3 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ;
State3 COMPLEX_OBJ__STATE3_OBJ;
// END state object
End_State COMPLEX_OBJ__END_STATE_OBJ;

!Line: 666 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 252 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.
!Line: 666 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__DEEP_HISTORY_PSEUDOSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.

State3::ChildState COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ;
State3::ChildState3 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ;
State3 COMPLEX_OBJ__STATE3_OBJ;
// END state object
End_State COMPLEX_OBJ__END_STATE_OBJ;
// Keep a _root for easier templating, it will point to us

!Line: 667 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 253 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.
!Line: 667 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.

State3::ChildState3 COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ;
State3 COMPLEX_OBJ__STATE3_OBJ;
// END state object
End_State COMPLEX_OBJ__END_STATE_OBJ;
// Keep a _root for easier templating, it will point to us
Root *_root;

!Line: 668 - style: inconclusive: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations. [initializerList]

!Line: 254 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.
!Line: 668 - note: Member variable 'Root::COMPLEX_OBJ__STATE3_OBJ__CHILDSTATE3_OBJ' uses an uninitialized argument 'COMPLEX_OBJ__STATE3_OBJ' due to the order of declarations.

virtual ~Event() {}
T get_data() const { return data; }
}; // Class Event
// free the memory associated with the event
static void consume_event(GeneratedEventBase *e) { delete e; }

!Line: 60 - style: The destructor '~Event' overrides a destructor in a base class but is not marked with a 'override' specifier. [missingOverride]

!Line: 43 - note: Virtual destructor in base class
!Line: 60 - note: Destructor in derived class

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/t-deck/example/main/t_deck_example.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/codec/es7210/es7210.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

adc_iface |= BIT(6);
dac_iface |= BIT(6);
if (mode == ES_MODULE_LINE) {
ESP_LOGE(TAG, "The codec es8311 doesn't support ES_MODULE_LINE mode");
return ESP_FAIL;

!Line: 547 - error: syntax error [syntaxError]

https://github.com/esp-cpp/espp/blob/975ade7b7a74c42c4253fe0ef9b482e48c412668/components/task/example/main/task_example.cpp#L0-L5

!Line: 0 - information: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. [normalCheckLevelMaxBranches]

if (swap_color_order_) {
madctl |= LCD_CMD_BGR_BIT;
}
if (mirror_x_) {
madctl |= LCD_CMD_MX_BIT;
}

!Line: 118 - style: Condition 'swap_color_order_' is always false [knownConditionTrueFalse]

if (mirror_x_) {
madctl |= LCD_CMD_MX_BIT;
}
if (mirror_y_) {
madctl |= LCD_CMD_MY_BIT;
}

!Line: 121 - style: Condition 'mirror_x_' is always false [knownConditionTrueFalse]

if (mirror_y_) {
madctl |= LCD_CMD_MY_BIT;
}
if (swap_xy_) {
madctl |= LCD_CMD_MV_BIT;
}

!Line: 124 - style: Condition 'mirror_y_' is always false [knownConditionTrueFalse]

if (swap_xy_) {
madctl |= LCD_CMD_MV_BIT;
}
auto init_cmds = std::to_array<display_drivers::DisplayInitCmd<Command>>({
{Command::slpout, {}, 120}, // sleep out

!Line: 127 - style: Condition 'swap_xy_' is always false [knownConditionTrueFalse]

if (swap_color_order_) {
data |= LCD_CMD_BGR_BIT;
}
if (mirror_x_) {
data |= LCD_CMD_MX_BIT;
}

!Line: 156 - style: Condition 'swap_color_order_' is always false [knownConditionTrueFalse]

if (mirror_x_) {
data |= LCD_CMD_MX_BIT;
}
if (mirror_y_) {
data |= LCD_CMD_MY_BIT;
}

!Line: 159 - style: Condition 'mirror_x_' is always false [knownConditionTrueFalse]

if (mirror_y_) {
data |= LCD_CMD_MY_BIT;
}
if (swap_xy_) {
data |= LCD_CMD_MV_BIT;
}

!Line: 162 - style: Condition 'mirror_y_' is always false [knownConditionTrueFalse]

if (swap_xy_) {
data |= LCD_CMD_MV_BIT;
}
switch (rotation) {
case DisplayRotation::LANDSCAPE:

!Line: 165 - style: Condition 'swap_xy_' is always false [knownConditionTrueFalse]

if (mirror_portrait_) {
data ^= (LCD_CMD_MX_BIT | LCD_CMD_MV_BIT);
} else {
data ^= (LCD_CMD_MY_BIT | LCD_CMD_MV_BIT);
}
break;

!Line: 174 - style: Condition 'mirror_portrait_' is always false [knownConditionTrueFalse]

if (mirror_portrait_) {
data ^= (LCD_CMD_MY_BIT | LCD_CMD_MV_BIT);
} else {
data ^= (LCD_CMD_MX_BIT | LCD_CMD_MV_BIT);
}
break;

!Line: 186 - style: Condition 'mirror_portrait_' is always false [knownConditionTrueFalse]

uint8_t madctl = 0;
if (swap_color_order_) {
madctl |= LCD_CMD_BGR_BIT;
}
if (mirror_x_) {
madctl |= LCD_CMD_MX_BIT;

!Line: 117 - style: Variable 'madctl' is assigned a value that is never used. [unreadVariable]

madctl |= LCD_CMD_BGR_BIT;
}
if (mirror_x_) {
madctl |= LCD_CMD_MX_BIT;
}
if (mirror_y_) {

!Line: 119 - style: Variable 'madctl' is assigned a value that is never used. [unreadVariable]

madctl |= LCD_CMD_MX_BIT;
}
if (mirror_y_) {
madctl |= LCD_CMD_MY_BIT;
}
if (swap_xy_) {

!Line: 122 - style: Variable 'madctl' is assigned a value that is never used. [unreadVariable]

madctl |= LCD_CMD_MY_BIT;
}
if (swap_xy_) {
madctl |= LCD_CMD_MV_BIT;
}

!Line: 125 - style: Variable 'madctl' is assigned a value that is never used. [unreadVariable]

madctl |= LCD_CMD_MV_BIT;
}
auto init_cmds = std::to_array<display_drivers::DisplayInitCmd<Command>>({
{Command::slpout, {}, 120}, // sleep out
{Command::noron}, // normal mode

!Line: 128 - style: Variable 'madctl' is assigned a value that is never used. [unreadVariable]


@finger563 finger563 merged commit 7281900 into main Mar 3, 2025
72 of 73 checks passed
@finger563 finger563 deleted the fix/sa branch March 3, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore static analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant