coremqtt-agent: Expose mqtt_agent_task.c statics
This commit makes the static functions in mqtt_agent_task.c visible
if the UNIT_TESTING macro is defined.
This is done by:
1. Define the `STATIC` macro in the header.
```
\#ifdef UNIT_TESTING
#define STATIC /* as nothing */
\#else
#define STATIC static
\#endif /* UNIT_TESTING */
```
2. Add prototypes to the header.
```
STATIC int foo(void);
```
3. Remove all other function prototypes in the .c file.
This is justified because:
- These functions need to be tested.
- Functions other than `vStartMqttAgentTask` cannot be refactored to be
non-static, as only `vStartMqttAgentTask` should be called in another
file.
Signed-off-by:
Reuben Cartwright <Reuben.Cartwright@arm.com>
Loading
Please register or sign in to comment