Hello, in our code we are using the following macro: #define PROP_VARIABLE_DEFINE(NAME, TYPE, DEFAULT_VALUE) \ static TYPE m##NAME = DEFAULT_VALUE; \ static const TYPE m##NAME##DEF = DEFAULT_VALUE; Cppcheck version 2.12.1 reports a MISRAC violation for the rule 20.7, but enclosing macro parameters inside parenthesis gives a compilation error. Thank you for your support
Ok, understood. Anyway I think this is feasible only if the project uses just few functions from external libray, in my case I have a lot of callings to Zephyr functions, it'll be very hard to create such .cfg file. Is it possibile to configure cppcheck to treat unknown functions as returning functions?
Could you please explain how I should manage this? In general we use a lot of external libraries in our code and we don't want to analyze them. How to avoid to get these kind of false negatives? Thanks
Hello, it seems that cppcheck 2.10.3 is failing in giving the missingReturn error in this simple function: uint32_t test(void) { printk("Debug \n"); //return 10; } where printk is implemented in Zephyr OS.