From 19377261ac507791a9ff0ae3d2aaac41a76f749b Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Fri, 18 Jul 2014 21:15:04 +0200 Subject: [PATCH] ccnl: disable debug and fix warnings --- sys/net/ccn_lite/ccn-lite-relay.c | 2 ++ sys/net/ccn_lite/ccnl-core.c | 7 +++++++ sys/net/ccn_lite/ccnl-ext-appserver.c | 1 + sys/net/ccn_lite/ccnl-riot-compat.c | 2 +- sys/net/ccn_lite/ccnl.h | 2 +- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/net/ccn_lite/ccn-lite-relay.c b/sys/net/ccn_lite/ccn-lite-relay.c index 0345a9fc51..28637db845 100644 --- a/sys/net/ccn_lite/ccn-lite-relay.c +++ b/sys/net/ccn_lite/ccn-lite-relay.c @@ -355,12 +355,14 @@ int ccnl_io_loop(struct ccnl_relay_s *ccnl) handle_populate_cache(ccnl); break; #endif +#if ENABLE_DEBUG case (CCNL_RIOT_PRINT_STAT): /* cmd to print face statistics */ for (struct ccnl_face_s *f = ccnl->faces; f; f = f->next) { ccnl_face_print_stat(f); } break; +#endif case (CCNL_RIOT_CONFIG_CACHE): /* cmd to configure the size of the cache at runtime */ ccnl->max_cache_entries = in.content.value; diff --git a/sys/net/ccn_lite/ccnl-core.c b/sys/net/ccn_lite/ccnl-core.c index c6e9f80eae..b8f473fb7d 100644 --- a/sys/net/ccn_lite/ccnl-core.c +++ b/sys/net/ccn_lite/ccnl-core.c @@ -528,7 +528,9 @@ ccnl_face_remove(struct ccnl_relay_s *ccnl, struct ccnl_face_s *f) f->outq = tmp; } +#if ENABLE_DEBUG ccnl_face_print_stat(f); +#endif f2 = f->next; DBL_LINKED_LIST_REMOVE(ccnl->faces, f); @@ -536,6 +538,7 @@ ccnl_face_remove(struct ccnl_relay_s *ccnl, struct ccnl_face_s *f) return f2; } +#if ENABLE_DEBUG void ccnl_face_print_stat(struct ccnl_face_s *f) { DEBUGMSG(1, "ccnl_face_print_stat: faceid=%d ifndx=%d\n", f->faceid, f->ifndx); @@ -551,6 +554,7 @@ void ccnl_face_print_stat(struct ccnl_face_s *f) DEBUGMSG(1, " STAT content received=%d\n", f->stat.received_content); } +#endif void ccnl_interface_cleanup(struct ccnl_if_s *i) { @@ -640,6 +644,9 @@ ccnl_face_dequeue(struct ccnl_relay_s *ccnl, struct ccnl_face_s *f) void ccnl_face_CTS_done(void *ptr, int cnt, int len) { + (void) ptr; + (void) cnt; + (void) len; DEBUGMSG(99, "ccnl_face_CTS_done face=%p cnt=%d len=%d\n", ptr, cnt, len); } diff --git a/sys/net/ccn_lite/ccnl-ext-appserver.c b/sys/net/ccn_lite/ccnl-ext-appserver.c index da4947a102..d33adccb58 100644 --- a/sys/net/ccn_lite/ccnl-ext-appserver.c +++ b/sys/net/ccn_lite/ccnl-ext-appserver.c @@ -160,6 +160,7 @@ static void riot_ccnl_appserver_register(void) return; } int content_len = ccnl_riot_client_publish(relay_pid, prefix, faceid, type, mgnt_pkg); + (void) content_len; DEBUG("received %d bytes.\n", content_len); DEBUG("appserver received: '%s'\n", mgnt_pkg); diff --git a/sys/net/ccn_lite/ccnl-riot-compat.c b/sys/net/ccn_lite/ccnl-riot-compat.c index 448b767653..f5e0759444 100644 --- a/sys/net/ccn_lite/ccnl-riot-compat.c +++ b/sys/net/ccn_lite/ccnl-riot-compat.c @@ -29,7 +29,7 @@ #include "ccnl-pdu.h" #include "ccnl-riot-compat.h" -#if MODULE_AT86RF231 || MODULE_CC2420 || MODULE_MC1322X +#if defined (MODULE_AT86RF231) || defined(MODULE_CC2420) || defined(MODULE_MC1322X) ieee802154_packet_t p; #else radio_packet_t p; diff --git a/sys/net/ccn_lite/ccnl.h b/sys/net/ccn_lite/ccnl.h index d6e7476c4e..2cf677f6c4 100644 --- a/sys/net/ccn_lite/ccnl.h +++ b/sys/net/ccn_lite/ccnl.h @@ -133,7 +133,7 @@ #define CCNL_DTAG_WFRAG_FLAG_FIRST 0x01 #define CCNL_DTAG_WFRAG_FLAG_LAST 0x02 -#define ENABLE_DEBUG (1) +#define ENABLE_DEBUG (0) #include "debug.h" // function alias for RIOTs debug infrastructure