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

lib: os: cbprintf: Fixes for c++ and coverity #34951

Merged
merged 6 commits into from
May 7, 2021

Conversation

nordic-krch
Copy link
Contributor

@nordic-krch nordic-krch commented May 7, 2021

Fixes for C++ includes:
- avoid calling static inline template function in static
assert on certain platforms which consider it non const expression
- Add 0 to variable before calling C++ argument storing function
to promote a variable.

Fix for coverity:
- avoid using sizeof(n + 0) by using local variable (gcc extension)

Additionally removed intergration platform from tests/lib/cbprintf_package since it is platform specific test.

Fixes #34925.
Fixes #34838.

It also suppose to fix 14K coverity issues.

@github-actions github-actions bot added area: API Changes to public APIs area: Tests Issues related to a particular existing or missing test labels May 7, 2021
@nordic-krch nordic-krch requested a review from npitre May 7, 2021 06:58
Fixes for C++ includes:
- avoid calling static inline template function in static
assert on certain platforms which consider it non const expression
- Add 0 to variable before calling C++ argument storing function
to promote a variable.

Fix for coverity:
- avoid using sizeof(n + 0) by using local variable (gcc extension)

Signed-off-by: Krzysztof Chruscinski <[email protected]>
Test was failing because of uninitialized variable and wrong
pointer being used (pointer to char).

Signed-off-by: Krzysztof Chruscinski <[email protected]>
Adding static to local functions. Using void * for %p argument
which often triggered compilation warning.

Signed-off-by: Krzysztof Chruscinski <[email protected]>
Extended test to cover CBPRINTF_MUST_RUNTIME_PACKAGE macro.

Signed-off-by: Krzysztof Chruscinski <[email protected]>
Enable option to use snprintfcb in the test.

Signed-off-by: Krzysztof Chruscinski <[email protected]>
Puts all filter in common section and fix filters. Platforms in
integration_platforms must also be allowed first, otherwise the tests
will never run.

Signed-off-by: Anas Nashif <[email protected]>
@galak galak merged commit 5343aed into zephyrproject-rtos:master May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: Tests Issues related to a particular existing or missing test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests/lib/cbprintf_package fails to build tests/subsys/logging/log_msg2 failes on qemu_cortex_a53
4 participants