Closed mniestroj closed 2 years ago
Visit the preview URL for this PR (updated for commit 19132c7):
https://golioth-zephyr-sdk-doxygen-dev--pr265-coap-utils-87oefh5v.web.app
(expires Thu, 08 Sep 2022 12:00:12 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
I believe that checkpatch warning is a false-positive:
389a471d9d3d9ca74371d338c1419ba976c4e381:41: CHECK:MACRO_ARG_PRECEDENCE: Macro argument '_name' may be better as '(_name)' to avoid precedence issues
#41: FILE: net/golioth/pathv.h:6:
+#define PATHV(_name, ...) \
+ const uint8_t *_name[] = { \
+ FOR_EACH(IDENTITY, (,), __VA_ARGS__), \
+ NULL, /* sentinel */ \
+ }
@ncmiller Please take another look at the PATHV()
definition. I decided to use "anonymous compound literals" as I have run into such code in Zephyr CTF (common tracing format) implementation. Seems to be a standard starting with C99, so safe to use here. This allows to use PATHV()
directly in function invocation as opposed to declaring temporary variable explicitly in function body.
This private module will be used by updated lightdb and fw components.