Attention is currently required from: Frank Filz.
Lior Suliman would like Frank Filz to review this change.
log: enforce full coverage of log components at compile time
Remove explicit sizing from the LogComponents and
default_conditional_log_levels arrays, allowing the compiler to
determine their size from the initializer lists.
To maintain safety, this patch introduces a CT_ASSERT macro and
adds compile-time checks to verify that both arrays contain exactly
COMPONENT_COUNT elements. This ensures that any future additions to
the log components will require corresponding updates to these arrays,
preventing silent omissions.
Change-Id: I1a36fa7641f18fa859e011cc81396f64b8c17168
Signed-off-by: Lior Suliman <liorsu@gmail.com>
---
M src/include/log.h
M src/log/log_functions.c
2 files changed, 17 insertions(+), 2 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/18/1236018/1
To view, visit change 1236018. To unsubscribe, or for help writing mail filters, visit settings.