From 2ab2f722a18025be55f12f482975b66548ce307b Mon Sep 17 00:00:00 2001
From: Christian Manal <moenoel@informatik.uni-bremen.de>
Date: Tue, 9 Jan 2018 10:27:14 +0100
Subject: [PATCH] fixed warnings in example objects

---
 examples/client/object_access_control.c |  2 +-
 examples/client/object_security.c       | 16 ----------------
 examples/client/object_server.c         | 22 ++++++----------------
 3 files changed, 7 insertions(+), 33 deletions(-)

diff --git a/examples/client/object_access_control.c b/examples/client/object_access_control.c
index 053546d..4a02438 100644
--- a/examples/client/object_access_control.c
+++ b/examples/client/object_access_control.c
@@ -261,7 +261,7 @@ static uint8_t prv_write_resources(uint16_t instanceId, int numData,
                 acc_ctrl_ri_t* acValListSave = accCtrlOiP->accCtrlValList;
                 accCtrlOiP->accCtrlValList = NULL;
 
-                int ri;
+                unsigned int ri;
                 lwm2m_data_t* subTlvArray = tlvArray[i].value.asChildren.array;
 
                 if (tlvArray[i].value.asChildren.count == 0)
diff --git a/examples/client/object_security.c b/examples/client/object_security.c
index 901f92e..bfb5f85 100644
--- a/examples/client/object_security.c
+++ b/examples/client/object_security.c
@@ -479,22 +479,6 @@ void copy_security_object(lwm2m_object_t * objectDest, lwm2m_object_t * objectSr
     }
 }
 
-void display_security_object(lwm2m_object_t * object)
-{
-#ifdef WITH_LOGS
-    fprintf(stdout, "  /%u: Security object, instances:\r\n", object->objID);
-    security_instance_t * instance = (security_instance_t *)object->instanceList;
-    while (instance != NULL)
-    {
-        fprintf(stdout, "    /%u/%u: instanceId: %u, uri: %s, isBootstrap: %s, shortId: %u, clientHoldOffTime: %u\r\n",
-                object->objID, instance->instanceId,
-                instance->instanceId, instance->uri, instance->isBootstrap ? "true" : "false",
-                instance->shortID, instance->clientHoldOffTime);
-        instance = (security_instance_t *)instance->next;
-    }
-#endif
-}
-
 void clean_security_object(lwm2m_object_t * objectP)
 {
     while (objectP->instanceList != NULL)
diff --git a/examples/client/object_server.c b/examples/client/object_server.c
index 2f0531e..d762c9b 100644
--- a/examples/client/object_server.c
+++ b/examples/client/object_server.c
@@ -150,6 +150,9 @@ static uint8_t prv_server_discover(uint16_t instanceId,
     uint8_t result;
     int i;
 
+    (void)instanceId;
+    (void)objectP;
+
     result = COAP_205_CONTENT;
 
     // is the server asking for the full object ?
@@ -339,6 +342,9 @@ static uint8_t prv_server_execute(uint16_t instanceId,
 {
     server_instance_t * targetP;
 
+    (void)buffer;
+    (void)length;
+
     targetP = (server_instance_t *)lwm2m_list_find(objectP->instanceList, instanceId);
     if (NULL == targetP) return COAP_404_NOT_FOUND;
 
@@ -428,22 +434,6 @@ void copy_server_object(lwm2m_object_t * objectDest, lwm2m_object_t * objectSrc)
     }
 }
 
-void display_server_object(lwm2m_object_t * object)
-{
-#ifdef WITH_LOGS
-    fprintf(stdout, "  /%u: Server object, instances:\r\n", object->objID);
-    server_instance_t * serverInstance = (server_instance_t *)object->instanceList;
-    while (serverInstance != NULL)
-    {
-        fprintf(stdout, "    /%u/%u: instanceId: %u, shortServerId: %u, lifetime: %u, storing: %s, binding: %s\r\n",
-                object->objID, serverInstance->instanceId,
-                serverInstance->instanceId, serverInstance->shortServerId, serverInstance->lifetime,
-                serverInstance->storing ? "true" : "false", serverInstance->binding);
-        serverInstance = (server_instance_t *)serverInstance->next;
-    }
-#endif
-}
-
 lwm2m_object_t * get_server_object(int serverId,
                                    const char* binding,
                                    int lifetime,
-- 
2.1.4