Skip to content

Commit

Permalink
types: Remove MRAA_ERROR_PLATFORM_ALREADY_INITIALISED
Browse files Browse the repository at this point in the history
Enum was deprecated in 0.10.x and causes issues with strict C89 compliance so
is now removed

Signed-off-by: Brendan Le Foll <[email protected]>
  • Loading branch information
arfoll committed Apr 15, 2016
1 parent 2404b0a commit acf9007
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion api/mraa/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ typedef enum {
MRAA_ERROR_NO_DATA_AVAILABLE = 9, /**< No data available */
MRAA_ERROR_INVALID_PLATFORM = 10, /**< Platform not recognised */
MRAA_ERROR_PLATFORM_NOT_INITIALISED = 11, /**< Board information not initialised */
MRAA_ERROR_PLATFORM_ALREADY_INITIALISED = 0, /**< Board is already initialised, same as MRAA_SUCESS */
MRAA_ERROR_UART_OW_SHORTED = 12, /**< UART OW Short Circuit Detected*/
MRAA_ERROR_UART_OW_NO_DEVICES = 13, /**< UART OW No devices detected */
MRAA_ERROR_UART_OW_DATA_ERROR = 14, /**< UART OW Data/Bus error detected */
Expand Down
1 change: 0 additions & 1 deletion api/mraa/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ typedef enum {
ERROR_NO_DATA_AVAILABLE = 9, /**< No data available */
ERROR_INVALID_PLATFORM = 10, /**< Platform not recognised */
ERROR_PLATFORM_NOT_INITIALISED = 11, /**< Board information not initialised */
ERROR_PLATFORM_ALREADY_INITIALISED = 0, /**< Board is already initialised, same as SUCCESS */
ERROR_UART_OW_SHORTED = 12, /**< UART OW Short Circuit Detected*/
ERROR_UART_OW_NO_DEVICES = 13, /**< UART OW No devices detected */
ERROR_UART_OW_DATA_ERROR = 14, /**< UART OW Data/Bus error detected */
Expand Down
4 changes: 2 additions & 2 deletions src/mraa.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ mraa_result_t
imraa_init()
{
if (plat != NULL) {
return MRAA_ERROR_PLATFORM_ALREADY_INITIALISED;
return MRAA_SUCCESS;
}

uid_t proc_euid = geteuid();
Expand Down Expand Up @@ -187,7 +187,7 @@ mraa_result_t __attribute__((constructor))
mraa_init()
{
if (plat != NULL) {
return MRAA_ERROR_PLATFORM_ALREADY_INITIALISED;
return MRAA_SUCCESS;
} else {
return imraa_init();
}
Expand Down

0 comments on commit acf9007

Please sign in to comment.