From acf90073a8972d5e81cbba738f75fb8edc0d8c24 Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Fri, 15 Apr 2016 14:01:23 +0100 Subject: [PATCH] types: Remove MRAA_ERROR_PLATFORM_ALREADY_INITIALISED Enum was deprecated in 0.10.x and causes issues with strict C89 compliance so is now removed Signed-off-by: Brendan Le Foll --- api/mraa/types.h | 1 - api/mraa/types.hpp | 1 - src/mraa.c | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/mraa/types.h b/api/mraa/types.h index 6d954ce..d588119 100644 --- a/api/mraa/types.h +++ b/api/mraa/types.h @@ -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 */ diff --git a/api/mraa/types.hpp b/api/mraa/types.hpp index 19feb11..a1c936f 100644 --- a/api/mraa/types.hpp +++ b/api/mraa/types.hpp @@ -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 */ diff --git a/src/mraa.c b/src/mraa.c index 0bfbe11..fc04016 100644 --- a/src/mraa.c +++ b/src/mraa.c @@ -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(); @@ -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(); }