[IOT-1921] Remove compiler warning
authorDan Mihai <Daniel.Mihai@microsoft.com>
Wed, 15 Mar 2017 23:10:46 +0000 (16:10 -0700)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Mon, 27 Mar 2017 19:44:42 +0000 (19:44 +0000)
Some of the compilers complain about static functions that are unused.

Change-Id: I8850112903e8e8e6d55d2465f96fedd4e792a69b
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17949
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
resource/c_common/octhread/src/posix/octhread.c
resource/c_common/octhread/src/windows/octhread.c

index cd0282c..4440820 100644 (file)
@@ -110,12 +110,14 @@ typedef struct _tagThreadInfo_t
     pthread_attr_t  threadattr;
 } oc_thread_internal;
 
+#ifndef NDEBUG
 static pthread_t oc_get_current_thread_id()
 {
     pthread_t id = pthread_self();
     assert(OC_INVALID_THREAD_ID != id);
     return id;
 }
+#endif
 
 OCThreadResult_t oc_thread_new(oc_thread *t, void *(*start_routine)(void *), void *arg)
 {
index c98e51d..bc580ea 100644 (file)
@@ -51,12 +51,14 @@ typedef struct _tagMutexInfo_t
 #endif
 } oc_mutex_internal;
 
+#ifndef NDEBUG
 static DWORD oc_get_current_thread_id()
 {
     DWORD id = GetCurrentThreadId();
     assert(OC_INVALID_THREAD_ID != id);
     return id;
 }
+#endif
 
 typedef struct _tagEventInfo_t
 {