[CONPRO-1473] Fix for build error [-Werror=implicit-function-declaration] 16/212716/1
authorSenthil Kumar G S <senthil.gs@samsung.com>
Tue, 13 Aug 2019 09:56:19 +0000 (15:26 +0530)
committerSudipto <sudipto.bal@samsung.com>
Tue, 13 Aug 2019 09:56:19 +0000 (15:26 +0530)
Cherry-picked code changes from
https://github.sec.samsung.net/SES/SmartThingsThing/commit/cb59d751fc93d9715a514d85c33ee41969f43886

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/6473747735b2339c92ce01ff58d7c0b9dcad343e
(cherry-picked from 6473747735b2339c92ce01ff58d7c0b9dcad343e)

Change-Id: Idb186e07ece03a6a13f44830be125bd7ce16a51a
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c
resource/csdk/connectivity/src/tcp_adapter/catcpserver.c
resource/csdk/connectivity/util/src/cautilinterface.c
resource/csdk/security/provisioning/src/oxmpreconfpin.c
resource/csdk/security/src/oxmpincommon.c
resource/csdk/stack/include/payload_logging.h
resource/csdk/stack/src/ocstack.c

index 10fdffd..003cc92 100644 (file)
@@ -35,6 +35,7 @@
 #include "caqueueingthread.h"
 #endif
 #if defined(__TIZEN__) || defined(__ANDROID__)
 #include "caqueueingthread.h"
 #endif
 #if defined(__TIZEN__) || defined(__ANDROID__)
+#include "pthread.h"
 #include "caleserver.h"
 #include "caleclient.h"
 #endif
 #include "caleserver.h"
 #include "caleclient.h"
 #endif
@@ -584,7 +585,7 @@ static CAResult_t CAInitLEServerQueues()
     if (CA_STATUS_OK != result)
     {
         OIC_LOG(ERROR, CALEADAPTER_TAG, "CAInitBleServerSenderQueue failed");
     if (CA_STATUS_OK != result)
     {
         OIC_LOG(ERROR, CALEADAPTER_TAG, "CAInitBleServerSenderQueue failed");
-        
         return CA_STATUS_FAILED;
     }
 
         return CA_STATUS_FAILED;
     }
 
@@ -2207,7 +2208,7 @@ static CAResult_t CAInitLEAdapterMutex()
         }
     }
 
         }
     }
 
-    
+
 
     if (NULL == g_bleServerReceiveDataMutex)
     {
 
     if (NULL == g_bleServerReceiveDataMutex)
     {
@@ -2249,7 +2250,7 @@ static void CATerminateLEAdapterMutex()
     oc_mutex_free(g_bleIsServerMutex);
     g_bleIsServerMutex = NULL;
 
     oc_mutex_free(g_bleIsServerMutex);
     g_bleIsServerMutex = NULL;
 
-    
+
     oc_mutex_free(g_bleLocalAddressMutex);
     g_bleLocalAddressMutex = NULL;
 
     oc_mutex_free(g_bleLocalAddressMutex);
     g_bleLocalAddressMutex = NULL;
 
@@ -2563,7 +2564,7 @@ static CAResult_t CALEAdapterGattClientStop()
     CAStopLEGattClient();
 
     CAResult_t result = CAQueueingThreadStop(g_bleClientSendQueueHandle);
     CAStopLEGattClient();
 
     CAResult_t result = CAQueueingThreadStop(g_bleClientSendQueueHandle);
-    
     return result;
 #else
     CAStopLEGattClient();
     return result;
 #else
     CAStopLEGattClient();
@@ -3404,7 +3405,7 @@ static CAResult_t CALEAdapterClientSendData(const CAEndpoint_t *remoteEndpoint,
     VERIFY_NON_NULL_RET(g_bleClientSendQueueHandle, CALEADAPTER_TAG,
                         "g_bleClientSendQueueHandle is  NULL",
                         CA_STATUS_FAILED);
     VERIFY_NON_NULL_RET(g_bleClientSendQueueHandle, CALEADAPTER_TAG,
                         "g_bleClientSendQueueHandle is  NULL",
                         CA_STATUS_FAILED);
-    
+
     OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Data Sending to LE layer [%u]", dataLen);
 
     CALEData_t *bleData = CACreateLEData(remoteEndpoint, data, dataLen, NULL);
     OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Data Sending to LE layer [%u]", dataLen);
 
     CALEData_t *bleData = CACreateLEData(remoteEndpoint, data, dataLen, NULL);
@@ -3414,7 +3415,7 @@ static CAResult_t CALEAdapterClientSendData(const CAEndpoint_t *remoteEndpoint,
         return CA_MEMORY_ALLOC_FAILED;
     }
     // Add message to send queue
         return CA_MEMORY_ALLOC_FAILED;
     }
     // Add message to send queue
-    
+
     CAResult_t res = CAQueueingThreadAddData(g_bleClientSendQueueHandle, bleData,
                                              sizeof(CALEData_t));
     if (CA_STATUS_OK != res)
     CAResult_t res = CAQueueingThreadAddData(g_bleClientSendQueueHandle, bleData,
                                              sizeof(CALEData_t));
     if (CA_STATUS_OK != res)
@@ -3463,7 +3464,7 @@ static CAResult_t CALEAdapterServerSendData(const CAEndpoint_t *remoteEndpoint,
     }
 
     // Add message to send queue
     }
 
     // Add message to send queue
-    
+
     CAResult_t res = CAQueueingThreadAddData(g_bleServerSendQueueHandle,
                                            bleData,
                                            sizeof(CALEData_t));
     CAResult_t res = CAQueueingThreadAddData(g_bleServerSendQueueHandle,
                                            bleData,
                                            sizeof(CALEData_t));
@@ -3604,7 +3605,7 @@ static CAResult_t CALEAdapterClientReceivedData(const char *remoteAddress,
 static void CASetLEAdapterThreadPoolHandle(ca_thread_pool_t handle)
 {
     g_bleAdapterThreadPool = handle;
 static void CASetLEAdapterThreadPoolHandle(ca_thread_pool_t handle)
 {
     g_bleAdapterThreadPool = handle;
-    
+
 }
 
 static void CASetLEReqRespAdapterCallback(CANetworkPacketReceivedCallback callback)
 }
 
 static void CASetLEReqRespAdapterCallback(CANetworkPacketReceivedCallback callback)
@@ -3668,10 +3669,10 @@ static void CALERemoveSendQueueData(CAQueueingThread_t *queueHandle, const char*
                                                       address);
     if (CA_STATUS_OK != res)
     {
                                                       address);
     if (CA_STATUS_OK != res)
     {
-        
+
         OIC_LOG(ERROR, CALEADAPTER_TAG, "Could not clear the send queue");
     }
         OIC_LOG(ERROR, CALEADAPTER_TAG, "Could not clear the send queue");
     }
-    
+
 }
 
 static void CALERemoveReceiveQueueData(u_arraylist_t *dataInfoList, const char* address)
 }
 
 static void CALERemoveReceiveQueueData(u_arraylist_t *dataInfoList, const char* address)
index b90405a..8ba7189 100644 (file)
@@ -48,6 +48,7 @@
 #include "caadapterutils.h"
 #include "octhread.h"
 #include "oic_malloc.h"
 #include "caadapterutils.h"
 #include "octhread.h"
 #include "oic_malloc.h"
+#include "oic_string.h"
 
 #ifdef __WITH_TLS__
 #include "ca_adapter_net_ssl.h"
 
 #ifdef __WITH_TLS__
 #include "ca_adapter_net_ssl.h"
index d009987..74b8b45 100644 (file)
@@ -25,7 +25,9 @@
 #include "cacommon.h"
 #include "logger.h"
 #include "caremotehandler.h"
 #include "cacommon.h"
 #include "logger.h"
 #include "caremotehandler.h"
-
+#ifdef TCP_ADAPTER
+#include "catcpadapter.h"
+#endif
 #define TAG "OIC_CA_COMMON_UTILS"
 
 CAResult_t CARegisterNetworkMonitorHandler(CAAdapterStateChangedCB adapterStateCB, CAConnectionStateChangedCB connStateCB)
 #define TAG "OIC_CA_COMMON_UTILS"
 
 CAResult_t CARegisterNetworkMonitorHandler(CAAdapterStateChangedCB adapterStateCB, CAConnectionStateChangedCB connStateCB)
index 83f1687..4e05209 100644 (file)
@@ -28,6 +28,7 @@
 #include "cainterface.h"
 #include "ocrandom.h"
 #include "oic_malloc.h"
 #include "cainterface.h"
 #include "ocrandom.h"
 #include "oic_malloc.h"
+#include "oic_string.h"
 #include "logger.h"
 #include "pbkdf2.h"
 #include "base64.h"
 #include "logger.h"
 #include "pbkdf2.h"
 #include "base64.h"
index 189f07c..4908451 100644 (file)
@@ -34,6 +34,7 @@
 #include "credresource.h"
 #include "cainterface.h"
 #include "oic_string.h"
 #include "credresource.h"
 #include "cainterface.h"
 #include "oic_string.h"
+#include "oic_malloc.h"
 
 #define TAG "OIC_PIN_OXM_COMMON"
 
 
 #define TAG "OIC_PIN_OXM_COMMON"
 
index 3faf0ad..2ad7f56 100644 (file)
@@ -33,6 +33,7 @@
 #define __STDC_LIMIT_MACROS
 #endif
 
 #define __STDC_LIMIT_MACROS
 #endif
 
+#include <string.h>
 #include <inttypes.h>
 #include "oic_malloc.h"
 #include "ocpayload.h"
 #include <inttypes.h>
 #include "oic_malloc.h"
 #include "ocpayload.h"
index dce6116..a8198ce 100644 (file)
@@ -63,6 +63,7 @@
 #include "cautilinterface.h"
 #include "camessagehandler.h"
 #include "oicgroup.h"
 #include "cautilinterface.h"
 #include "camessagehandler.h"
 #include "oicgroup.h"
+#include "pstatresource.h"
 
 #if defined (ROUTING_GATEWAY) || defined (ROUTING_EP)
 #include "routingutility.h"
 
 #if defined (ROUTING_GATEWAY) || defined (ROUTING_EP)
 #include "routingutility.h"