Skip to content

Fix CodeQL findings: 8-0-1, 0-1-2, 18-4-1, 6-8-4#550

Open
castler wants to merge 4 commits into
eclipse-score:mainfrom
castler:js_first_codeql_fixes
Open

Fix CodeQL findings: 8-0-1, 0-1-2, 18-4-1, 6-8-4#550
castler wants to merge 4 commits into
eclipse-score:mainfrom
castler:js_first_codeql_fixes

Conversation

@castler

@castler castler commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

castler and others added 4 commits June 15, 2026 18:44
Add parentheses to make operator precedence explicit in expressions
where higher-precedence operators (+, -, *, ==, !=, >) are used as
sub-expressions of lower-precedence operators (&&, ||, ?, <=, <, >).

This resolves all 32 CodeQL RULE-8-0-1 findings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…0-1-2)

Wrap all unused non-void function return values with std::ignore to
satisfy MISRA RULE-0-1-2. Affected calls include close(), pipe(),
read(), write(), memset(), memcpy(), emplace_back(), emplace(),
erase(), for_each(), and project-specific functions.

This resolves all 34 CodeQL RULE-0-1-2 findings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mark defaulted move constructors and move assignment operators as
noexcept in configuration headers, instance_identifier.h,
proxy_method_base.h, and tracing_runtime.h.

This resolves all 13 CodeQL RULE-18-4-1 findings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…6-8-4)

Add lvalue ref-qualifiers (&) to member functions that return
references or pointers to their object or subobjects, preventing
calls on temporaries that would produce dangling references.

Updated declarations, definitions, base classes, overrides, and
mocks consistently across the codebase.

This resolves all 50 CodeQL RULE-6-8-4 findings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
{
auto& method = method_key_value_pair.second.get();
method.InitializeInArgsAndReturnValues();
std::ignore = method.InitializeInArgsAndReturnValues();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is weired, and should most certainly be handled

++current_timestamp_;
event_data_control_composite_->EventReady(slot, current_timestamp_);
NotifyConsumersIfHandlersRegistered();
std::ignore = NotifyConsumersIfHandlersRegistered();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe missing error handling

const bool is_read_write{true};

method_resources_.CleanUpOldRegions(proxy_instance_identifier, proxy_pid); // Per Proxy
std::ignore = method_resources_.CleanUpOldRegions(proxy_instance_identifier, proxy_pid); // Per Proxy

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check

return binding_service_type_deployment.events_;
}
else if constexpr (service_element_type == ServiceElementType::FIELD)
if constexpr (service_element_type == ServiceElementType::EVENT)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does not make sense most certainly

return lola_service_instance_deployment.events_;
}
else if constexpr (service_element_type == ServiceElementType::FIELD)
if constexpr (service_element_type == ServiceElementType::EVENT)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most certainly revert

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.

1 participant