bbfdm/libbbfdm-api/legacy
Andreas Gnau df25ff7ce0
libbbfdm-api: proper parenthesis in macros
When using macros, both any occurence of arguments and the macro itself
have to be enclosed in parenthesis to prevent unintended behaviour with
operator precedence.

For now, only fix the one causing a -Wint-conversion warning in GCC 14
when using constructs like these, where two macros are used together and
expand to both two comparisons and two nested ternary expression.

dhcpmngr.c:502:41: error: pointer/integer type mismatch in conditional expression [-Wint-conversion]
 502 |  if (DM_STRCMP(parent_s, section_name(s)) != 0)

Given the very heavy use of macros in this project, there are probably
more instances of this issue in the code and it can cause actual logic
errors. While at it, double evaluation should also be checked for.

Link: http://web.archive.org/web/20140127211232/http://docs.freebsd.org/info/cpp/cpp.info.Macro_Parentheses.html
Link: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/macro-parentheses.html
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-12-15 13:22:46 +01:00
..
include Introduce a new libbbfdm-api library version 2 2025-01-27 15:29:04 +01:00
plugin Redesign dmmap to be portable and structured 2025-08-04 14:04:52 +02:00
CMakeLists.txt cmake: Fix compat with CMake 4 2025-12-15 13:20:50 +01:00
dmapi.c fix bbfdm_resolve_external_reference_via_dmmap 2025-10-24 16:26:10 +05:30
dmapi.h execute sync handler on bbfdm.apply event 2025-09-17 19:52:11 +05:30
dmbbf.c Store object name when parsing multi-instance object without section 2025-12-07 23:26:17 +01:00
dmbbf.h Redesign dmmap to be portable and structured 2025-08-04 14:04:52 +02:00
dmcommon.c dmctx aware bbfdm api 2025-09-05 18:49:59 +05:30
dmcommon.h dmctx aware bbfdm api 2025-09-05 18:49:59 +05:30
dmentry.c dmctx aware bbfdm api 2025-09-05 18:49:59 +05:30
dmentry.h Optimize bbfdmd 2025-02-21 09:55:09 +00:00
dmjson.c Introduce a new libbbfdm-api library version 2 2025-01-27 15:29:04 +01:00
dmjson.h Introduce a new libbbfdm-api library version 2 2025-01-27 15:29:04 +01:00
dmmem.c Introduce a new libbbfdm-api library version 2 2025-01-27 15:29:04 +01:00
dmmem.h Introduce a new libbbfdm-api library version 2 2025-01-27 15:29:04 +01:00
dmplugin.c Optimize bbfdmd 2025-02-21 09:55:09 +00:00
dmplugin.h Optimize bbfdmd 2025-02-21 09:55:09 +00:00
dmubus.c Update ubus call logs 2025-10-30 10:45:49 +05:30
dmubus.h libbbf-api: Add a new ubus API to get the response based on blob_msg input 2025-10-01 17:34:12 +02:00
dmuci.c Handling sections with missing instance in dmmap 2025-11-28 17:18:59 +05:30
dmuci.h libbbfdm-api: proper parenthesis in macros 2025-12-15 13:22:46 +01:00