Add _unused macro to publish and subscribe tests

This commit is contained in:
Johannes Schriewer 2018-08-03 18:43:48 +02:00
parent 1981e1a104
commit 6d86f81894
2 changed files with 8 additions and 0 deletions

View file

@ -8,6 +8,10 @@ int leave = 0;
#define LOG(fmt, ...) fprintf(stdout, fmt "\n", ## __VA_ARGS__) #define LOG(fmt, ...) fprintf(stdout, fmt "\n", ## __VA_ARGS__)
#ifndef _unused
#define _unused __attribute__((unused))
#endif
bool err_handler(_unused MQTTHandle *handle, _unused MQTTConfig *config, MQTTErrorCode error) { bool err_handler(_unused MQTTHandle *handle, _unused MQTTConfig *config, MQTTErrorCode error) {
LOG("Error received: %d", error); LOG("Error received: %d", error);
exit(1); exit(1);

View file

@ -8,6 +8,10 @@ bool leave = false;
#define LOG(fmt, ...) fprintf(stdout, fmt "\n", ## __VA_ARGS__) #define LOG(fmt, ...) fprintf(stdout, fmt "\n", ## __VA_ARGS__)
#ifndef _unused
#define _unused __attribute__((unused))
#endif
bool err_handler(_unused MQTTHandle *handle, _unused MQTTConfig *config, MQTTErrorCode error) { bool err_handler(_unused MQTTHandle *handle, _unused MQTTConfig *config, MQTTErrorCode error) {
LOG("Error received: %d", error); LOG("Error received: %d", error);