mb2hal: Fix module info placement and cppcheck problem - #4483
Conversation
|
Good catch... |
|
Well, there is still a problem. Just installed a Ubuntu 26.04 in a VM and it still complains. Need to look deeper what is happening. |
aaacba8 to
455ef16
Compare
|
The real issue here is that the |
|
The issue looks to be how cppcheck handles You see that here, it sees If there are missing includes, this generates more errors, due to cppckeck does not find KERNEL_VERSION and just assumes KERNEL_VERSION=1 for example which of course also fails. As soon as rtapi.h is found, problem solved. See: |
The new cppcheck in Ubuntu 26.04 (for future CI, see #4477) would trip on a define test of
MODULE_VERBOSE. The placement was wrong in the header and the usage should be replaced withMODULE_INFOas used everywhere else.This PR addresses the issue. It also removes the
RTAPIdependent inclusion check ofrtapi_app.h(probably copy-pasted from a compiled component). This is a user-space program that does not needrtapi_app_main()and uses plainmain().