Commit 7ac5eb3b authored by Jaewook Jung's avatar Jaewook Jung Committed by Ashok Babu Channa

Remove build warnings

 - fix implicit declaration of function
 - remove unused codes
 - remove unused parameter warnings

Change-Id: I830f9ada169e334a566bb696dee6cf9b46c87459
Signed-off-by: default avatarJaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20093Reviewed-by: default avatarPhil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: default avatarAshok Babu Channa <ashok.channa@samsung.com>
parent 6a210284
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
#include "iotivity_config.h" #include "iotivity_config.h"
#ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif
#include <stddef.h> #include <stddef.h>
#include <stdbool.h> #include <stdbool.h>
......
...@@ -160,6 +160,7 @@ void CAEDRSocketConnectionStateCallback(int result, bt_socket_connection_state_e ...@@ -160,6 +160,7 @@ void CAEDRSocketConnectionStateCallback(int result, bt_socket_connection_state_e
bt_socket_connection_s *connection, void *userData) bt_socket_connection_s *connection, void *userData)
{ {
OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN"); OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
OC_UNUSED(userData);
EDRDevice *device = NULL; EDRDevice *device = NULL;
...@@ -250,6 +251,7 @@ void CAEDRDeviceDiscoveryCallback(int result, bt_adapter_device_discovery_state_ ...@@ -250,6 +251,7 @@ void CAEDRDeviceDiscoveryCallback(int result, bt_adapter_device_discovery_state_
bt_adapter_device_discovery_info_s *discoveryInfo, void *userData) bt_adapter_device_discovery_info_s *discoveryInfo, void *userData)
{ {
OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN"); OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
OC_UNUSED(userData);
EDRDevice *device = NULL; EDRDevice *device = NULL;
...@@ -372,6 +374,8 @@ void CAEDRServiceSearchedCallback(int32_t result, ...@@ -372,6 +374,8 @@ void CAEDRServiceSearchedCallback(int32_t result,
bt_device_sdp_info_s *sdpInfo,void *userData) bt_device_sdp_info_s *sdpInfo,void *userData)
{ {
OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN"); OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
OC_UNUSED(result);
OC_UNUSED(userData);
if (NULL == sdpInfo) if (NULL == sdpInfo)
{ {
...@@ -935,6 +939,7 @@ CAResult_t CAEDRClientDisconnect(const int32_t clientID) ...@@ -935,6 +939,7 @@ CAResult_t CAEDRClientDisconnect(const int32_t clientID)
void CAEDRDataRecvCallback(bt_socket_received_data_s *data, void *userData) void CAEDRDataRecvCallback(bt_socket_received_data_s *data, void *userData)
{ {
OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN"); OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
OC_UNUSED(userData);
EDRDevice *device = NULL; EDRDevice *device = NULL;
......
...@@ -178,6 +178,8 @@ void CAEDRAdapterStateChangeCallback(int result, bt_adapter_state_e adapterState ...@@ -178,6 +178,8 @@ void CAEDRAdapterStateChangeCallback(int result, bt_adapter_state_e adapterState
void *userData) void *userData)
{ {
OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN"); OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "IN");
OC_UNUSED(result);
OC_UNUSED(userData);
if (BT_ADAPTER_ENABLED == adapterState) if (BT_ADAPTER_ENABLED == adapterState)
{ {
......
...@@ -115,6 +115,7 @@ CAResult_t CAEDRServerStop() ...@@ -115,6 +115,7 @@ CAResult_t CAEDRServerStop()
CAResult_t CAEDRServerInitialize(ca_thread_pool_t handle) CAResult_t CAEDRServerInitialize(ca_thread_pool_t handle)
{ {
OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "CAEDRServerInitialize"); OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "CAEDRServerInitialize");
OC_UNUSED(handle);
return CA_STATUS_OK; return CA_STATUS_OK;
} }
......
...@@ -195,7 +195,11 @@ u_arraylist_t *CAFindInterfaceChange() ...@@ -195,7 +195,11 @@ u_arraylist_t *CAFindInterfaceChange()
.msg_iov = &iov, .msg_iov = &iov,
.msg_iovlen = 1 }; .msg_iovlen = 1 };
// We do nothing with netlink event here.
// Android BroadcastReceiver will work instead.
ssize_t len = recvmsg(caglobals.ip.netlinkFd, &msg, 0); ssize_t len = recvmsg(caglobals.ip.netlinkFd, &msg, 0);
OC_UNUSED(len);
return NULL; return NULL;
} }
......
...@@ -393,6 +393,8 @@ static CAInterface_t *CANewInterfaceItem(int index, char *name, int family, ...@@ -393,6 +393,8 @@ static CAInterface_t *CANewInterfaceItem(int index, char *name, int family,
void CAIPConnectionStateChangedCb(connection_type_e type, void* userData) void CAIPConnectionStateChangedCb(connection_type_e type, void* userData)
{ {
OC_UNUSED(userData);
switch (type) switch (type)
{ {
case CONNECTION_TYPE_DISCONNECTED: case CONNECTION_TYPE_DISCONNECTED:
......
...@@ -609,34 +609,6 @@ static void CAAcceptConnection(CATransportFlags_t flag, CASocket_t *sock) ...@@ -609,34 +609,6 @@ static void CAAcceptConnection(CATransportFlags_t flag, CASocket_t *sock)
} }
} }
#ifdef __WITH_TLS__
static bool CAIsTlsMessage(const unsigned char* data, size_t length)
{
if (NULL == data || 0 == length)
{
OIC_LOG_V(ERROR, TAG, "%s: null input param", __func__);
return false;
}
unsigned char first_byte = data[0];
//TLS Plaintext has four types: change_cipher_spec = [14], alert = [15],
//handshake = [16], application_data = [17] in HEX
const uint8_t tls_head_type[] = {0x14, 0x15, 0x16, 0x17};
size_t i = 0;
for (i = 0; i < sizeof(tls_head_type); i++)
{
if(tls_head_type[i] == first_byte)
{
return true;
}
}
return false;
}
#endif
/** /**
* Clean socket state data * Clean socket state data
* *
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "cacommonutil.h" #include "cacommonutil.h"
#include "camanagerdevice.h" #include "camanagerdevice.h"
#include "caleclient.h" #include "caleclient.h"
#include "caleserver.h"
#include "caleutils.h" #include "caleutils.h"
#define TAG "OIC_CA_MANAGER_LE" #define TAG "OIC_CA_MANAGER_LE"
......
...@@ -248,6 +248,7 @@ static void OCAdapterStateChangedHandler(CATransportAdapter_t adapter, bool enab ...@@ -248,6 +248,7 @@ static void OCAdapterStateChangedHandler(CATransportAdapter_t adapter, bool enab
static void OCConnectionStateChangedHandler(const CAEndpoint_t *info, bool isConnected) static void OCConnectionStateChangedHandler(const CAEndpoint_t *info, bool isConnected)
{ {
OIC_LOG(DEBUG, TAG, "OCConnectionStateChangedHandler"); OIC_LOG(DEBUG, TAG, "OCConnectionStateChangedHandler");
OC_UNUSED(info);
CAConnectUserPref_t connPrefer = CA_USER_PREF_CLOUD; CAConnectUserPref_t connPrefer = CA_USER_PREF_CLOUD;
CAResult_t ret = CAUtilCMGetConnectionUserConfig(&connPrefer); CAResult_t ret = CAUtilCMGetConnectionUserConfig(&connPrefer);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment