Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is there a bug-tracker for the Nordic SDK? (Found a likely bug in nrf_log)

Is there a public bug-tracker available (even better: publicly hosted repository)? I'm currently trying to wrap the SDK in way suitable for our internal processes (CMake, C++ development), and came along multiple minor issues and inconsistencies. I would like to contribute my observations back, but opening a support ticket and describing the issues in words every time is too much of an effort.

Anyway, here is the one bug that I would like to report today:

In `nrf_log.h`, `nrf_log_push` is declared as `char const *nrf_log_push(char * const p_str)`.

Note the placement of the `const`. (At least in C++,) this marks the pointer constant, but not it's contents!

This prevents the use of the function without a const_cast, which is typically frowned upon. In this case it is acceptable, because the function doesn't modify the contents of the string. But then, the function should just be declares as taking a `const char *`. The fact that the pointer itself is const only matters for the implementation, but not for the API user (it is copied anyway).

Related