You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The name of the parameter 'resource' is different from the name of the corresponding parameter 'storage' in the 'doDeallocate' virtual function in the 'MemoryResource' base class
zserio_runtime/zserio/pmr/NewDeleteResource.h
26
Please check possibility of fixing the same.
Steps to reproduce the behavior:
SCA run using MISRA 2023 configuration.
Expected behavior
No SCA warnings for MISRA 2023 ruleset
mikir
changed the title
Fix MISRA C++ 2023 rule MISRACPP2023-13_3_3-b The name of the parameter 'resource' is different from the name of the corresponding parameter 'storage' in the 'doDeallocate' virtual function in the 'MemoryResource' base class
Fix MISRA C++ 2023 rule 13.3.3 "The parameters in all declarations or overrides of a function shall either be unnamed or have identical names"
Jun 18, 2024
By renaming the variable name from resource to storage we can resolve this warning.
From void doDeallocate(void* resource, size_t, size_t) override { ::operator delete(resource); }
to
void doDeallocate(void* storage, size_t, size_t) override { ::operator delete(storage); }
Zserio version and language
Zserio: latest from master
Commit date: 6 days ago (6/4/2024 7:12:28 PM)
Commit hash: b8cc6c0
Describe the bug
1 Misra warning getting reported
Please check possibility of fixing the same.
Steps to reproduce the behavior:
SCA run using MISRA 2023 configuration.
Expected behavior
No SCA warnings for MISRA 2023 ruleset
Additional context
N.A
@Roland-Homeier @mikir FYI.
The text was updated successfully, but these errors were encountered: