net/oic; fix build when using sys/stats/stub.

Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/5d40716c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/5d40716c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/5d40716c

Branch: refs/heads/develop
Commit: 5d40716cb510e5d80ad1783ae933d8628b8e68c1
Parents: d3b1c4b
Author: Marko Kiiskila <[email protected]>
Authored: Tue Jan 17 14:39:21 2017 -0800
Committer: Marko Kiiskila <[email protected]>
Committed: Tue Jan 17 14:39:21 2017 -0800

----------------------------------------------------------------------
 net/oic/src/messaging/coap/coap.c     | 2 +-
 net/oic/src/port/mynewt/ble_adaptor.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5d40716c/net/oic/src/messaging/coap/coap.c
----------------------------------------------------------------------
diff --git a/net/oic/src/messaging/coap/coap.c 
b/net/oic/src/messaging/coap/coap.c
index 49421de..17df8f8 100644
--- a/net/oic/src/messaging/coap/coap.c
+++ b/net/oic/src/messaging/coap/coap.c
@@ -308,7 +308,7 @@ coap_init_connection(void)
     /* initialize transaction ID */
     current_mid = oc_random_rand();
 
-    stats_init_and_reg(STATS_HDR(coap_stats),
+    (void)stats_init_and_reg(STATS_HDR(coap_stats),
       STATS_SIZE_INIT_PARMS(coap_stats, STATS_SIZE_32),
       STATS_NAME_INIT_PARMS(coap_stats), "coap");
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5d40716c/net/oic/src/port/mynewt/ble_adaptor.c
----------------------------------------------------------------------
diff --git a/net/oic/src/port/mynewt/ble_adaptor.c 
b/net/oic/src/port/mynewt/ble_adaptor.c
index b3ff59e..1da423d 100644
--- a/net/oic/src/port/mynewt/ble_adaptor.c
+++ b/net/oic/src/port/mynewt/ble_adaptor.c
@@ -67,7 +67,7 @@ STATS_SECT_START(oc_ble_stats)
     STATS_SECT_ENTRY(obytes)
     STATS_SECT_ENTRY(oerr)
 STATS_SECT_END
-static STATS_SECT_DECL(oc_ble_stats) oc_ble_stats;
+STATS_SECT_DECL(oc_ble_stats) oc_ble_stats;
 STATS_NAME_START(oc_ble_stats)
     STATS_NAME(oc_ble_stats, iframe)
     STATS_NAME(oc_ble_stats, iseg)
@@ -233,7 +233,7 @@ oc_ble_coap_gatt_srv_init(void)
         return rc;
     }
 #endif
-    stats_init_and_reg(STATS_HDR(oc_ble_stats),
+    (void)stats_init_and_reg(STATS_HDR(oc_ble_stats),
       STATS_SIZE_INIT_PARMS(oc_ble_stats, STATS_SIZE_32),
       STATS_NAME_INIT_PARMS(oc_ble_stats), "oc_ble");
     return 0;

Reply via email to