MQTTClient.h: enum returnCode uses ubiquitous names prone for collisions
ottingerg opened this issue · comments
In our setup we are using the ST Hardware abstraction layer on an STM32F4 MCU.
We experience a collision of the enum name "SUCCESS" which is defined in MQTTClient.h:
and also in stm32f4xx.h
typedef enum { ERROR = 0U, SUCCESS = !ERROR } ErrorStatus;
Using Prefixes (on both sides) for the enum would be our preferred way to resolve this issue.
Unfortunatly on the ST HAL side 'SUCCESS' is referred 1000+ times.
For example:
enum returnCode { MQTTCLIENT_BUFFER_OVERFLOW = -2,MQTTCLIENT_FAILURE = -1, MQTTCLIENT_SUCCESS = 0 };
Duplicate #180
Closing as duplicate. But yes we should do it.