Skip to content

fix(mw/com): remove noexcept from functions that can propagate except… - #807

Draft
castler wants to merge 1 commit into
mainfrom
fix/misra-noexcept-propagate
Draft

fix(mw/com): remove noexcept from functions that can propagate except…#807
castler wants to merge 1 commit into
mainfrom
fix/misra-noexcept-propagate

Conversation

@castler

@castler castler commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

…ions

Resolves all 122 open CodeQL/MISRA findings for rule cpp/misra/noexcept-function-should-not-propagate-to-the-caller on main.

The flagged functions were declared noexcept(true) but the analyzer can prove they may propagate std::bad_variant_access, std::bad_optional_access or std::system_error (from std::visit / std::optional access / inotify). None of them are swap or move operations, so the fix is to drop the noexcept specifier. Declarations and definitions are kept in sync, and for flagged virtual functions the noexcept was also removed from the interface base declaration and sibling overrides (subscription state machine, IServiceDiscovery(Client), ITracingRuntime, IBindingTracingRuntime, IRuntime, proxy/skeleton bindings, binding factories) plus their mocks.

Destructors (~ServerConnection, ~TypeErasedCallQueue) are implicitly noexcept(true); they are marked noexcept(false) so the finding clears.

…ions

Resolves all 122 open CodeQL/MISRA findings for rule
cpp/misra/noexcept-function-should-not-propagate-to-the-caller on main.

The flagged functions were declared noexcept(true) but the analyzer can
prove they may propagate std::bad_variant_access, std::bad_optional_access
or std::system_error (from std::visit / std::optional access / inotify).
None of them are swap or move operations, so the fix is to drop the
noexcept specifier. Declarations and definitions are kept in sync, and for
flagged virtual functions the noexcept was also removed from the interface
base declaration and sibling overrides (subscription state machine,
IServiceDiscovery(Client), ITracingRuntime, IBindingTracingRuntime,
IRuntime, proxy/skeleton bindings, binding factories) plus their mocks.

Destructors (~ServerConnection, ~TypeErasedCallQueue) are implicitly
noexcept(true); they are marked noexcept(false) so the finding clears.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant