From b8419d48d92e92c96ff4be47499dac60d1377537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Wed, 7 May 2014 06:17:11 +0200 Subject: [PATCH] ccnl: remove type warning --- sys/net/ccn_lite/ccnl-riot-compat.c | 2 +- sys/net/ccn_lite/ccnl-riot-compat.h | 2 +- sys/net/include/ccn_lite/ccnl-riot.h | 19 +++++++------------ 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/sys/net/ccn_lite/ccnl-riot-compat.c b/sys/net/ccn_lite/ccnl-riot-compat.c index 3d0f456cc4..507c44019f 100644 --- a/sys/net/ccn_lite/ccnl-riot-compat.c +++ b/sys/net/ccn_lite/ccnl-riot-compat.c @@ -90,7 +90,7 @@ void riot_send_nack(uint16_t to) msg_send(&m, to, 0); } -char *riot_ccnl_event_to_string(ccnl_riot_event_t event) +char *riot_ccnl_event_to_string(int event) { switch (event) { case PKT_PENDING: diff --git a/sys/net/ccn_lite/ccnl-riot-compat.h b/sys/net/ccn_lite/ccnl-riot-compat.h index ea5ed15e08..97d95f632b 100644 --- a/sys/net/ccn_lite/ccnl-riot-compat.h +++ b/sys/net/ccn_lite/ccnl-riot-compat.h @@ -30,4 +30,4 @@ typedef struct riot_ccnl_msg { int riot_send_transceiver(uint8_t *buf, uint16_t size, uint16_t to); int riot_send_msg(uint8_t *buf, uint16_t size, uint16_t to); void riot_send_nack(uint16_t to); -char *riot_ccnl_event_to_string(ccnl_riot_event_t event); +char *riot_ccnl_event_to_string(int event); diff --git a/sys/net/include/ccn_lite/ccnl-riot.h b/sys/net/include/ccn_lite/ccnl-riot.h index b447262a03..8330d3885e 100644 --- a/sys/net/include/ccn_lite/ccnl-riot.h +++ b/sys/net/include/ccn_lite/ccnl-riot.h @@ -41,16 +41,13 @@ #define TRANSCEIVER TRANSCEIVER_DEFAULT #define CCNL_RIOT_EVENT_NUMBER_OFFSET (1 << 8) -typedef enum ccnl_riot_event { - CCNL_RIOT_MSG = CCNL_RIOT_EVENT_NUMBER_OFFSET + 1, - CCNL_RIOT_HALT, - CCNL_RIOT_POPULATE, - CCNL_RIOT_PRINT_STAT, - CCNL_RIOT_TIMEOUT, - CCNL_RIOT_NACK, - - CCNL_RIOT_RESERVED -} ccnl_riot_event_t; +#define CCNL_RIOT_MSG (CCNL_RIOT_EVENT_NUMBER_OFFSET + 0) +#define CCNL_RIOT_HALT (CCNL_RIOT_EVENT_NUMBER_OFFSET + 1) +#define CCNL_RIOT_POPULATE (CCNL_RIOT_EVENT_NUMBER_OFFSET + 2) +#define CCNL_RIOT_PRINT_STAT (CCNL_RIOT_EVENT_NUMBER_OFFSET + 3) +#define CCNL_RIOT_TIMEOUT (CCNL_RIOT_EVENT_NUMBER_OFFSET + 4) +#define CCNL_RIOT_NACK (CCNL_RIOT_EVENT_NUMBER_OFFSET + 5) +#define CCNL_RIOT_RESERVED (CCNL_RIOT_EVENT_NUMBER_OFFSET + 6) #define CCNL_HEADER_SIZE (40) @@ -65,8 +62,6 @@ typedef enum ccnl_riot_event { # define CCNL_RIOT_CHUNK_SIZE (PAYLOAD_SIZE - CCNL_HEADER_SIZE) #endif - - /** * @brief starts the ccnl relay *