From: Veeraj Khokale Date: Wed, 14 Sep 2016 09:45:34 +0000 (+0530) Subject: Fix for Jira issues [IOT-1157, IOT-1194] X-Git-Tag: 1.3.0~1057^2~150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=075e7cf10b7f5e3cf1f2afbbc6c5d2d7c4a17005;p=platform%2Fupstream%2Fiotivity.git Fix for Jira issues [IOT-1157, IOT-1194] [IOT-1157]: Added default case for mentioned switch statements. [IOT-1194]: Removed unused structures and made g_GatewayID in routingmanager.c as static. Change-Id: I03ff080867d28e3d32a18bb74fa7a9a26e465774 Signed-off-by: Veeraj Khokale Reviewed-on: https://gerrit.iotivity.org/gerrit/11775 Tested-by: jenkins-iotivity Reviewed-by: Abhishek Sharma Reviewed-by: Ashok Babu Channa --- diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c index 6a674ae..5ff9200 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c +++ b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.c @@ -71,27 +71,6 @@ static ca_mutex g_mutexObjectList = NULL; */ static CAEDRErrorHandleCallback g_edrErrorHandler = NULL; -typedef struct send_data -{ - char* address; - char* data; - uint32_t id; -} data_t; - -/** - @brief Thread context information for unicast, multicast and secured unicast server - */ -typedef struct -{ - bool *stopFlag; - CAAdapterServerType_t type; -} CAAdapterReceiveThreadContext_t; - -typedef struct -{ - bool *stopFlag; -} CAAdapterAcceptThreadContext_t; - /** * implement for BT-EDR adapter common method */ diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrclient.c b/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrclient.c index e24e2ae..55bffcc 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrclient.c +++ b/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrclient.c @@ -237,6 +237,9 @@ void CAEDRSocketConnectionStateCallback(int result, bt_socket_connection_state_e ca_mutex_unlock(g_edrDeviceListMutex); } break; + + default: + OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Unknown Bluetooth Socket connection state"); } OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT"); @@ -357,6 +360,9 @@ void CAEDRDeviceDiscoveryCallback(int result, bt_adapter_device_discovery_state_ } } break; + + default: + OIC_LOG(ERROR, EDR_ADAPTER_TAG, "Unknown Bluetooth Adapter device discovery state"); } OIC_LOG(DEBUG, EDR_ADAPTER_TAG, "OUT"); diff --git a/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c b/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c index 94d4f8a..e7d0b68 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c +++ b/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c @@ -130,8 +130,9 @@ static bool CALECheckConnectionStateValue(jint state) case GATT_REQUEST_NOT_SUPPORTED: case GATT_WRITE_NOT_PERMITTED: return true; + default: + return false; } - return false; } void CALEClientSetScanInterval(int32_t intervalTime, int32_t workingCount) diff --git a/resource/csdk/connectivity/src/cablockwisetransfer.c b/resource/csdk/connectivity/src/cablockwisetransfer.c index 60882e7..ed79118 100644 --- a/resource/csdk/connectivity/src/cablockwisetransfer.c +++ b/resource/csdk/connectivity/src/cablockwisetransfer.c @@ -693,6 +693,8 @@ CAResult_t CASendErrorMessage(const coap_pdu_t *pdu, uint8_t status, case CA_MSG_ACKNOWLEDGE: sentMsgType = CA_MSG_CONFIRM; break; + default: + sentMsgType = CA_MSG_NONCONFIRM; } CAData_t *cloneData = NULL; diff --git a/resource/csdk/routing/src/routingmanager.c b/resource/csdk/routing/src/routingmanager.c index 2292fda..eb465e1 100644 --- a/resource/csdk/routing/src/routingmanager.c +++ b/resource/csdk/routing/src/routingmanager.c @@ -46,7 +46,7 @@ /** * Unique gateway ID generated before hosting a gateway resource. */ -uint32_t g_GatewayID = 0; +static uint32_t g_GatewayID = 0; /** * Used for assigning unique ID.to endpoint's connected to this gateway diff --git a/resource/csdk/security/provisioning/ck_manager/include/ckm_info.h b/resource/csdk/security/provisioning/ck_manager/include/ckm_info.h index c5b1f80..d45be77 100644 --- a/resource/csdk/security/provisioning/ck_manager/include/ckm_info.h +++ b/resource/csdk/security/provisioning/ck_manager/include/ckm_info.h @@ -64,12 +64,6 @@ typedef struct /*CA private key, CA certificate, other CA-related info*/ long numberOfRevoked; } CKMInfo_t; -typedef struct /*CA private key, CA certificate, certificate revocation/white list*/ -{ - uint32_t CRLsize; - uint8_t *certificateRevocationList;//should be allocated dynamically -} CRLInfo_t; - //General functions /** diff --git a/resource/csdk/stack/include/internal/ocstackinternal.h b/resource/csdk/stack/include/internal/ocstackinternal.h index a8de15f..c093284 100644 --- a/resource/csdk/stack/include/internal/ocstackinternal.h +++ b/resource/csdk/stack/include/internal/ocstackinternal.h @@ -136,33 +136,6 @@ typedef struct } OCServerProtocolRequest; /** - * This structure will be created in occoap and passed up the stack on the client side. - */ -typedef struct -{ - /** handle is retrieved by comparing the token-handle pair in the PDU.*/ - ClientCB * cbNode; - - /** This is how long this response is valid for (in seconds).*/ - uint32_t maxAge; - - /** This is the Uri of the resource. (ex. "coap://192.168.1.1/a/led").*/ - char * fullUri; - - /** This is the relative Uri of the resource. (ex. "/a/led").*/ - char * rcvdUri; - - /** This is the received payload.*/ - char * bufRes; - - /** This is the token received OTA.*/ - CAToken_t rcvdToken; - - /** this structure will be passed to client.*/ - OCClientResponse * clientResponse; -} OCResponse; - -/** * This typedef is to represent our Server Instance identification. */ typedef uint8_t ServerID[16];