Commit d3c02168 authored by Jon A. Cruz's avatar Jon A. Cruz Committed by Erich Keane

Cleaning up more warnings.

These fixes clear a bit over 200 more of the basic warnings
seen. A few signed/unsigned issues that might require thought
were left for later.

Change-Id: Ie04411927cef8a73f17f16e329f6546229c2c3d1
Signed-off-by: default avatarJon A. Cruz <jonc@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2109Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarSachin Agrawal <sachin.agrawal@intel.com>
Reviewed-by: default avatarOssama Othman <ossama.othman@intel.com>
Reviewed-by: default avatarErich Keane <erich.keane@intel.com>
parent cb13e078
......@@ -75,6 +75,11 @@ static void CALEDumpDBusSignalParameters(char const * sender_name,
char const * signal_name,
GVariant * parameters)
{
(void)sender_name;
(void)object_path;
(void)interface_name;
(void)signal_name;
(void)parameters;
#ifdef TB_LOG
gchar * const param_dump =
g_variant_print(parameters, TRUE);
......@@ -106,6 +111,9 @@ static void CALEOnInterfaceProxyPropertiesChanged(
gchar const * const * invalidated_properties,
gpointer user_data)
{
(void)manager;
(void)object_proxy;
(void)invalidated_properties;
OIC_LOG_V(DEBUG,
TAG,
"Properties Changed on %s:\n",
......@@ -242,6 +250,8 @@ static void CALEOnInterfacesAdded(GDBusConnection * connection,
GVariant * parameters,
gpointer user_data)
{
(void)connection;
(void)user_data;
CALEDumpDBusSignalParameters(sender_name,
object_path,
interface_name,
......@@ -270,6 +280,8 @@ static void CALEOnInterfacesRemoved(GDBusConnection * connection,
GVariant * parameters,
gpointer user_data)
{
(void)connection;
(void)user_data;
CALEDumpDBusSignalParameters(sender_name,
object_path,
interface_name,
......@@ -360,6 +372,8 @@ static void CALEOnPropertiesChanged(GDBusConnection * connection,
GVariant * parameters,
gpointer user_data)
{
(void)connection;
(void)user_data;
CALEDumpDBusSignalParameters(sender_name,
object_path,
interface_name,
......@@ -375,6 +389,8 @@ static void CALEOnPropertyChanged(GDBusConnection * connection,
GVariant * parameters,
gpointer user_data)
{
(void)connection;
(void)user_data;
CALEDumpDBusSignalParameters(sender_name,
object_path,
interface_name,
......@@ -1125,6 +1141,9 @@ CAResult_t CAUpdateCharacteristicsToGattClient(char const * address,
char const * charValue,
uint32_t charValueLen)
{
(void)address;
(void)charValue;
(void)charValueLen;
/**
* @todo To be implemented shortly as part of the effort to
* address a critical code review that stated this BLE
......@@ -1137,6 +1156,8 @@ CAResult_t CAUpdateCharacteristicsToGattClient(char const * address,
CAResult_t CAUpdateCharacteristicsToAllGattClients(char const * charValue,
uint32_t charValueLen)
{
(void)charValue;
(void)charValueLen;
/**
* @todo To be implemented shortly as part of the effort to
* address a critical code review that stated this BLE
......@@ -1178,6 +1199,11 @@ CAResult_t CAUpdateCharacteristicsToGattServer(
CALETransferType_t type,
int32_t position)
{
(void)remoteAddress;
(void)data;
(void)dataLen;
(void)type;
(void)position;
/**
* @todo To be implemented shortly as part of the effort to
* address a critical code review that stated this BLE
......
......@@ -123,6 +123,7 @@ bool CAGattClientsInitialize(CALEContext * context)
bool CAGattClientsDestroy(CALEContext * context)
{
(void)context;
/* g_hash_table_destroy(...); */ // FIXME
return false;
}
......@@ -252,6 +253,11 @@ void CAGattReceiveResponse(GDBusConnection * connection,
GVariant * parameters,
gpointer user_data)
{
(void)connection;
(void)sender_name;
(void)object_path;
(void)interface_name;
(void)signal_name;
/*
This handler is only trigged in a GATT client when receiving
data sent by a GATT server through a notification, e.g. such as
......
......@@ -54,6 +54,7 @@ static gboolean CAGattDescriptorReadValue(
GDBusMethodInvocation * invocation,
gpointer user_data)
{
(void)user_data;
/**
* @todo The @c GattDescriptor1 object still owns the returned
* variant when using the below call. Should be we use
......@@ -97,6 +98,7 @@ static bool CAGattDescriptorInitialize(CAGattCharacteristic * c,
char const * descriptor_path,
char const * value)
{
(void)s;
CAGattDescriptor * const d = &c->descriptor;
// Path of the form /org/iotivity/gatt/hci0/service0/char0/desc0.
......
/******************************************************************
/* ****************************************************************
*
* Copyright 2015 Intel Corporation All Rights Reserved.
*
......@@ -403,6 +403,9 @@ static void CAPeripheralOnNameAcquired(GDBusConnection * connection,
gchar const * name,
gpointer user_data)
{
(void)connection;
(void)name; // needed when logging is a noop
(void)user_data;
OIC_LOG_V(DEBUG,
TAG,
"Name \"%s\" acquired on D-Bus.", name);
......@@ -421,6 +424,9 @@ static void CAPeripheralOnNameLost(GDBusConnection * connection,
gchar const * name,
gpointer user_data)
{
(void)connection;
(void)name; // needed when logging is a noop
(void)user_data;
/*
This can happen if the appropriate D-Bus policy is not
installed, for example.
......
......@@ -41,12 +41,14 @@ void error_handler(const CAEndpoint_t *object, const CAErrorInfo_t* errorInfo);
CAResult_t checkGetNetworkInfo();
CAResult_t checkSelectNetwork();
void request_handler(const CAEndpoint_t *object, const CARequestInfo_t *requestInfo)
void request_handler(const CAEndpoint_t * /*object*/,
const CARequestInfo_t * /*requestInfo*/)
{
}
void response_handler(const CAEndpoint_t *object, const CAResponseInfo_t *responseInfo)
void response_handler(const CAEndpoint_t * /*object*/,
const CAResponseInfo_t * /*responseInfo*/)
{
}
......
......@@ -144,7 +144,7 @@ TEST(MutexTests, TC_03_THREAD_LOCKING)
EXPECT_EQ(CA_STATUS_OK, ca_thread_pool_init(3, &mythreadpool));
_func1_struct pData = {};
_func1_struct pData = {0, false, false};
pData.mutex = ca_mutex_new();
......
......@@ -152,7 +152,7 @@ static void osalGetTime(int *min,int *sec, int *ms)
if (min && sec && ms)
{
#if defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0
struct timespec when = {};
struct timespec when = {0};
clockid_t clk = CLOCK_REALTIME;
#ifdef CLOCK_REALTIME_COARSE
clk = CLOCK_REALTIME_COARSE;
......
......@@ -44,15 +44,14 @@ void DeleteACLList(OicSecAcl_t* acl)
{
if (acl)
{
OicSecAcl_t *aclTmp1 = NULL, *aclTmp2 = NULL;
OicSecAcl_t *aclTmp1 = NULL;
OicSecAcl_t *aclTmp2 = NULL;
LL_FOREACH_SAFE(acl, aclTmp1, aclTmp2)
{
int i = 0;
LL_DELETE(acl, aclTmp1);
// Clean Resources
for (i = 0; i < aclTmp1->resourcesLen; i++)
for (size_t i = 0; i < aclTmp1->resourcesLen; i++)
{
OICFree(aclTmp1->resources[i]);
}
......@@ -115,7 +114,7 @@ char * BinToAclJSON(const OicSecAcl_t * acl)
cJSON *jsonRsrcArray = NULL;
cJSON_AddItemToObject (jsonAcl, OIC_JSON_RESOURCES_NAME, jsonRsrcArray = cJSON_CreateArray());
VERIFY_NON_NULL(TAG, jsonRsrcArray, ERROR);
for (int i = 0; i < acl->resourcesLen; i++)
for (size_t i = 0; i < acl->resourcesLen; i++)
{
cJSON_AddItemToArray (jsonRsrcArray, cJSON_CreateString(acl->resources[i]));
}
......@@ -127,7 +126,7 @@ char * BinToAclJSON(const OicSecAcl_t * acl)
cJSON *jsonOwnrArray = NULL;
cJSON_AddItemToObject (jsonAcl, OIC_JSON_OWNERS_NAME, jsonOwnrArray = cJSON_CreateArray());
VERIFY_NON_NULL(TAG, jsonOwnrArray, ERROR);
for (int i = 0; i < acl->ownersLen; i++)
for (size_t i = 0; i < acl->ownersLen; i++)
{
outLen = 0;
......@@ -220,7 +219,7 @@ OicSecAcl_t * JSONToAclBin(const char * jsonStr)
acl->resources = (char**)OICCalloc(acl->resourcesLen, sizeof(char*));
VERIFY_NON_NULL(TAG, (acl->resources), ERROR);
int idxx = 0;
size_t idxx = 0;
do
{
cJSON *jsonRsrc = cJSON_GetArrayItem(jsonObj, idxx);
......@@ -343,6 +342,7 @@ OCEntityHandlerResult ACLEntityHandler (OCEntityHandlerFlag flag,
OCEntityHandlerRequest * ehRequest,
void* callbackParameter)
{
(void)callbackParameter;
OCEntityHandlerResult ehRet = OC_EH_ERROR;
if (!ehRequest)
......@@ -406,7 +406,7 @@ OCStackResult GetDefaultACL(OicSecAcl_t** defaultAcl)
{
OCStackResult ret = OC_STACK_ERROR;
OicUuid_t ownerId = {};
OicUuid_t ownerId = {.id = {0}};
/*
* TODO In future, when new virtual resources will be added in OIC
......@@ -445,7 +445,7 @@ OCStackResult GetDefaultACL(OicSecAcl_t** defaultAcl)
acl->resources = (char**)OICCalloc(acl->resourcesLen, sizeof(char*));
VERIFY_NON_NULL(TAG, (acl->resources), ERROR);
for (int i = 0; i < acl->resourcesLen; i++)
for (size_t i = 0; i < acl->resourcesLen; i++)
{
size_t len = strlen(rsrcs[i]) + 1;
acl->resources[i] = (char*)OICMalloc(len * sizeof(char));
......
......@@ -343,6 +343,7 @@ OicSecCred_t * GenerateCredential(const OicUuid_t * subject, OicSecCredType_t cr
const char * publicData, const char * privateData,
size_t ownersLen, const OicUuid_t * owners)
{
(void)publicData;
OCStackResult ret = OC_STACK_ERROR;
OicSecCred_t *cred = (OicSecCred_t*)OICCalloc(1, sizeof(OicSecCred_t));
......@@ -528,6 +529,7 @@ OCEntityHandlerResult CredEntityHandler (OCEntityHandlerFlag flag,
OCEntityHandlerRequest * ehRequest,
void* callbackParameter)
{
(void)callbackParameter;
OCEntityHandlerResult ret = OC_EH_ERROR;
if(!ehRequest)
......
......@@ -55,8 +55,8 @@ static OicSecDoxm_t gDefaultDoxm =
1, /* size_t oxmLen */
OIC_JUST_WORKS, /* uint16_t oxmSel */
false, /* bool owned */
{}, /* OicUuid_t deviceID */
{}, /* OicUuid_t owner */
{.id = {0}}, /* OicUuid_t deviceID */
{.id = {0}}, /* OicUuid_t owner */
};
void DeleteDoxmBinData(OicSecDoxm_t* doxm)
......@@ -64,7 +64,7 @@ void DeleteDoxmBinData(OicSecDoxm_t* doxm)
if (doxm)
{
//Clean oxmType
for(int i = 0; i < doxm->oxmTypeLen; i++)
for (size_t i = 0; i < doxm->oxmTypeLen; i++)
{
OICFree(doxm->oxmType[i]);
}
......@@ -195,7 +195,7 @@ OicSecDoxm_t * JSONToDoxmBin(const char * jsonStr)
doxm->oxmType = (OicUrn_t *)OICCalloc(doxm->oxmTypeLen, sizeof(char *));
VERIFY_NON_NULL(TAG, (doxm->oxmType), ERROR);
for(int i = 0; i < doxm->oxmTypeLen ; i++)
for (size_t i = 0; i < doxm->oxmTypeLen ; i++)
{
cJSON *jsonOxmTy = cJSON_GetArrayItem(jsonObj, i);
VERIFY_NON_NULL(TAG, jsonOxmTy, ERROR);
......@@ -217,7 +217,7 @@ OicSecDoxm_t * JSONToDoxmBin(const char * jsonStr)
doxm->oxm = (OicSecOxm_t*)OICCalloc(doxm->oxmLen, sizeof(OicSecOxm_t));
VERIFY_NON_NULL(TAG, doxm->oxm, ERROR);
for(int i = 0; i < doxm->oxmLen ; i++)
for (size_t i = 0; i < doxm->oxmLen ; i++)
{
cJSON *jsonOxm = cJSON_GetArrayItem(jsonObj, i);
VERIFY_NON_NULL(TAG, jsonOxm, ERROR);
......@@ -348,7 +348,7 @@ static bool ValidateQuery(unsigned char * query)
return false;
}
OicParseQueryIter_t parseIter = {};
OicParseQueryIter_t parseIter = {0};
ParseQueryIterInit(query, &parseIter);
......@@ -413,7 +413,7 @@ static OCEntityHandlerResult HandleDoxmPutRequest (const OCEntityHandlerRequest
{
OC_LOG (INFO, TAG, PCF("Doxm EntityHandle processing PUT request"));
OCEntityHandlerResult ehRet = OC_EH_ERROR;
OicUuid_t emptyOwner = {};
OicUuid_t emptyOwner = {.id = {0}};
/*
* Convert JSON Doxm data into binary. This will also validate
......@@ -536,6 +536,7 @@ OCEntityHandlerResult DoxmEntityHandler (OCEntityHandlerFlag flag,
OCEntityHandlerRequest * ehRequest,
void* callbackParam)
{
(void)callbackParam;
OCEntityHandlerResult ehRet = OC_EH_ERROR;
if(NULL == ehRequest)
......
......@@ -42,7 +42,7 @@ static OicSecPstat_t gDefaultPstat =
PROVISION_CREDENTIALS | PROVISION_ACLS), // OicSecDpm_t cm
(OicSecDpm_t)(TAKE_OWNER | BOOTSTRAP_SERVICE | SECURITY_MANAGEMENT_SERVICES |
PROVISION_CREDENTIALS | PROVISION_ACLS), // OicSecDpm_t tm
{}, // OicUuid_t deviceID
{.id = {0}}, // OicUuid_t deviceID
SINGLE_SERVICE_CLIENT_DRIVEN, // OicSecDpom_t om */
1, // the number of elts in Sms
&gSm, // OicSecDpom_t *sm
......@@ -95,7 +95,7 @@ char * BinToPstatJSON(const OicSecPstat_t * pstat)
cJSON_AddItemToObject(jsonPstat, OIC_JSON_SM_NAME, jsonSmArray = cJSON_CreateArray());
VERIFY_NON_NULL(TAG, jsonSmArray, INFO);
for (int i = 0; i < pstat->smLen; i++)
for (size_t i = 0; i < pstat->smLen; i++)
{
cJSON_AddItemToArray(jsonSmArray, cJSON_CreateNumber((int )pstat->sm[i]));
}
......@@ -166,7 +166,7 @@ OicSecPstat_t * JSONToPstatBin(const char * jsonStr)
if (cJSON_Array == jsonObj->type)
{
pstat->smLen = cJSON_GetArraySize(jsonObj);
int idxx = 0;
size_t idxx = 0;
VERIFY_SUCCESS(TAG, pstat->smLen != 0, ERROR);
pstat->sm = (OicSecDpom_t*)OICCalloc(pstat->smLen, sizeof(OicSecDpom_t));
VERIFY_NON_NULL(TAG, pstat->sm, ERROR);
......@@ -290,6 +290,7 @@ OCEntityHandlerResult PstatEntityHandler(OCEntityHandlerFlag flag,
OCEntityHandlerRequest * ehRequest,
void *callbackParam)
{
(void)callbackParam;
OCEntityHandlerResult ehRet = OC_EH_ERROR;
// This method will handle REST request (GET/POST) for /oic/sec/pstat
if (flag & OC_REQUEST_FLAG)
......
......@@ -45,10 +45,10 @@ OCStackResult SendSRMResponse(const OCEntityHandlerRequest *ehRequest,
OCEntityHandlerResult ehRet, const char *rspPayload)
{
OC_LOG (INFO, TAG, PCF("SRM sending SRM response"));
OCEntityHandlerResponse response = {};
OCEntityHandlerResponse response = {0};
if (ehRequest)
{
OCSecurityPayload ocPayload = {};
OCSecurityPayload ocPayload = {.base = {.type = PAYLOAD_TYPE_INVALID}};
response.requestHandle = ehRequest->requestHandle;
response.resourceHandle = ehRequest->resource;
......
......@@ -72,7 +72,7 @@ void SRMRequestHandler(const CAEndpoint_t *endPoint, const CARequestInfo_t *requ
}
// Copy the subjectID
OicUuid_t subjectId = {};
OicUuid_t subjectId = {.id = {0}};
memcpy(subjectId.id, endPoint->identity.id, sizeof(subjectId.id));
//Check the URI has the query and skip it before checking the permission
......@@ -110,7 +110,7 @@ void SRMRequestHandler(const CAEndpoint_t *endPoint, const CARequestInfo_t *requ
}
// Form a 'access deny' or 'Error' response and send to peer
CAResponseInfo_t responseInfo = {};
CAResponseInfo_t responseInfo = {.result = CA_EMPTY};
memcpy(&responseInfo.info, &(requestInfo->info), sizeof(responseInfo.info));
responseInfo.info.payload = NULL;
if (!gRequestHandler)
......
......@@ -225,7 +225,7 @@ TEST(CredGenerateCredentialTest, GenerateCredentialValidInput)
OicUuid_t owners[1];
OICStrcpy((char *)owners[0].id, sizeof(owners[0].id), "ownersId21");
OicUuid_t subject = {};
OicUuid_t subject = {0};
OICStrcpy((char *)subject.id, sizeof(subject.id), "subject11");
char privateKey[] = "My private Key11";
......@@ -244,7 +244,7 @@ TEST(GenerateAndAddCredentialTest, GenerateAndAddCredentialValidInput)
OicUuid_t owners[1];
OICStrcpy((char *)owners[0].id, sizeof(owners[0].id), "ownersId11");
OicUuid_t subject = {};
OicUuid_t subject = {0};
OICStrcpy((char *)subject.id, sizeof(subject.id), "subject11");
char privateKey[] = "My private Key11";
......
......@@ -127,7 +127,7 @@ TEST(DoxmEntityHandlerTest, DoxmEntityHandlerValidRequest)
{
EXPECT_EQ(OC_STACK_INVALID_PARAM, InitDoxmResource());
char query[] = "oxm=0&owned=false&owner=owner1";
OCEntityHandlerRequest req = {};
OCEntityHandlerRequest req = {0};
req.method = OC_REST_GET;
req.query = OICStrdup(query);
EXPECT_EQ(OC_EH_ERROR, DoxmEntityHandler(OCEntityHandlerFlag::OC_REQUEST_FLAG, &req));
......
......@@ -29,17 +29,20 @@
using namespace std;
// Helper Methods
void UTRequestHandler(const CAEndpoint_t *endPoint, const CARequestInfo_t *requestInfo)
void UTRequestHandler(const CAEndpoint_t * /*endPoint*/,
const CARequestInfo_t * /*requestInfo*/)
{
EXPECT_TRUE(true) << "UTRequestHandler\n";
}
void UTResponseHandler(const CAEndpoint_t *endPoint, const CAResponseInfo_t *responseInfo)
void UTResponseHandler(const CAEndpoint_t * /*endPoint*/,
const CAResponseInfo_t * /*responseInfo*/)
{
EXPECT_TRUE(true) << "UTResponseHandler\n";
}
void UTErrorHandler(const CAEndpoint_t *endPoint, const CAErrorInfo_t *errorInfo)
void UTErrorHandler(const CAEndpoint_t * /*endPoint*/,
const CAErrorInfo_t * /*errorInfo*/)
{
EXPECT_TRUE(true) << "UTErrorHandler\n";
}
......
......@@ -26,7 +26,7 @@
TEST(ParseRestQueryTest, ParseRestQueryEmpty)
{
unsigned char query[] = "";
OicParseQueryIter_t parseIter = {};
OicParseQueryIter_t parseIter = {0};
ParseQueryIterInit(query, &parseIter);
EXPECT_EQ(NULL, GetNextQuery(&parseIter));
}
......@@ -36,7 +36,7 @@ TEST(ParseRestQueryTest, ParseSingleRestQuery)
char attr[10], val[10];
unsigned char query[] = "owned=false";
OicParseQueryIter_t parseIter = {};
OicParseQueryIter_t parseIter = {0};
ParseQueryIterInit(query, &parseIter);
EXPECT_NE((OicParseQueryIter_t *)NULL, GetNextQuery(&parseIter));
......@@ -51,7 +51,7 @@ TEST(ParseRestQueryTest, ParseRestMultipleQuery)
char attr[10], val[10];
unsigned char query[] = "oxm=0&owned=true&owner=owner1";
OicParseQueryIter_t parseIter = {};
OicParseQueryIter_t parseIter = {0};
ParseQueryIterInit(query, &parseIter);
printf("\n");
while(GetNextQuery(&parseIter))
......@@ -65,4 +65,3 @@ TEST(ParseRestQueryTest, ParseRestMultipleQuery)
}
printf("\n");
}
......@@ -169,7 +169,8 @@ OCStackResult InvokeOCDoResource(std::ostringstream &query,
return ret;
}
OCStackApplicationResult putReqCB(void* ctx, OCDoHandle handle, OCClientResponse * clientResponse)
OCStackApplicationResult putReqCB(void* ctx, OCDoHandle /*handle*/,
OCClientResponse * clientResponse)
{
if(ctx == (void*)DEFAULT_CONTEXT_VALUE)
{
......@@ -189,7 +190,8 @@ OCStackApplicationResult putReqCB(void* ctx, OCDoHandle handle, OCClientResponse
return OC_STACK_DELETE_TRANSACTION;
}
OCStackApplicationResult postReqCB(void *ctx, OCDoHandle handle, OCClientResponse *clientResponse)
OCStackApplicationResult postReqCB(void *ctx, OCDoHandle /*handle*/,
OCClientResponse *clientResponse)
{
if(ctx == (void*)DEFAULT_CONTEXT_VALUE)
{
......@@ -210,7 +212,8 @@ OCStackApplicationResult postReqCB(void *ctx, OCDoHandle handle, OCClientRespons
}
OCStackApplicationResult deleteReqCB(void *ctx,
OCDoHandle handle, OCClientResponse *clientResponse)
OCDoHandle /*handle*/,
OCClientResponse *clientResponse)
{
if(ctx == (void*)DEFAULT_CONTEXT_VALUE)
{
......@@ -230,7 +233,8 @@ OCStackApplicationResult deleteReqCB(void *ctx,
return OC_STACK_DELETE_TRANSACTION;
}
OCStackApplicationResult getReqCB(void* ctx, OCDoHandle handle, OCClientResponse * clientResponse)
OCStackApplicationResult getReqCB(void* ctx, OCDoHandle /*handle*/,
OCClientResponse * clientResponse)
{
if(clientResponse == NULL)
{
......@@ -268,7 +272,8 @@ OCStackApplicationResult getReqCB(void* ctx, OCDoHandle handle, OCClientResponse
return OC_STACK_DELETE_TRANSACTION;
}
OCStackApplicationResult obsReqCB(void* ctx, OCDoHandle handle, OCClientResponse * clientResponse)
OCStackApplicationResult obsReqCB(void* ctx, OCDoHandle /*handle*/,
OCClientResponse * clientResponse)
{
if(ctx == (void*)DEFAULT_CONTEXT_VALUE)
{
......@@ -324,7 +329,8 @@ OCStackApplicationResult obsReqCB(void* ctx, OCDoHandle handle, OCClientResponse
return OC_STACK_KEEP_TRANSACTION;
}
#ifdef WITH_PRESENCE
OCStackApplicationResult presenceCB(void* ctx, OCDoHandle handle, OCClientResponse * clientResponse)
OCStackApplicationResult presenceCB(void* ctx, OCDoHandle /*handle*/,
OCClientResponse * clientResponse)
{
if (ctx == (void*) DEFAULT_CONTEXT_VALUE)
{
......@@ -358,7 +364,7 @@ OCStackApplicationResult presenceCB(void* ctx, OCDoHandle handle, OCClientRespon
#endif
// This is a function called back when a device is discovered
OCStackApplicationResult discoveryReqCB(void* ctx, OCDoHandle handle,
OCStackApplicationResult discoveryReqCB(void* ctx, OCDoHandle /*handle*/,
OCClientResponse * clientResponse)
{
if (ctx == (void*) DEFAULT_CONTEXT_VALUE)
......@@ -446,7 +452,8 @@ OCStackApplicationResult discoveryReqCB(void* ctx, OCDoHandle handle,
return OC_STACK_KEEP_TRANSACTION;
}
OCStackApplicationResult PlatformDiscoveryReqCB (void* ctx, OCDoHandle handle,
OCStackApplicationResult PlatformDiscoveryReqCB (void* ctx,
OCDoHandle /*handle*/,
OCClientResponse * clientResponse)
{
if (ctx == (void*) DEFAULT_CONTEXT_VALUE)
......@@ -467,7 +474,7 @@ OCStackApplicationResult PlatformDiscoveryReqCB (void* ctx, OCDoHandle handle,
return (UNICAST_DISCOVERY) ? OC_STACK_DELETE_TRANSACTION : OC_STACK_KEEP_TRANSACTION;
}
OCStackApplicationResult DeviceDiscoveryReqCB (void* ctx, OCDoHandle handle,
OCStackApplicationResult DeviceDiscoveryReqCB (void* ctx, OCDoHandle /*handle*/,
OCClientResponse * clientResponse)
{
if (ctx == (void*) DEFAULT_CONTEXT_VALUE)
......@@ -967,7 +974,7 @@ std::string getConnectivityType (OCConnectivityType connType)
}
}
std::string getQueryStrForGetPut(OCClientResponse * clientResponse)
std::string getQueryStrForGetPut(OCClientResponse * /*clientResponse*/)
{
return "/a/light";
......@@ -979,4 +986,3 @@ void parseClientResponse(OCClientResponse * clientResponse)
coapServerPort = getPortTBServer(clientResponse);
coapServerResource = getQueryStrForGetPut(clientResponse);
}
......@@ -123,7 +123,7 @@ OCStackResult InvokeOCDoResource(std::ostringstream &query, OCMethod method,
return ret;
}
OCStackApplicationResult putReqCB(void* ctx, OCDoHandle handle,
OCStackApplicationResult putReqCB(void* ctx, OCDoHandle /*handle*/,
OCClientResponse * clientResponse)
{
if(ctx == (void*)DEFAULT_CONTEXT_VALUE)
......@@ -147,7 +147,7 @@ OCStackApplicationResult putReqCB(void* ctx, OCDoHandle handle,
return OC_STACK_DELETE_TRANSACTION;
}
OCStackApplicationResult postReqCB(void *ctx, OCDoHandle handle,
OCStackApplicationResult postReqCB(void *ctx, OCDoHandle /*handle*/,
OCClientResponse *clientResponse)
{
if(ctx == (void*)DEFAULT_CONTEXT_VALUE)
......@@ -172,7 +172,7 @@ OCStackApplicationResult postReqCB(void *ctx, OCDoHandle handle,
return OC_STACK_DELETE_TRANSACTION;
}
OCStackApplicationResult getReqCB(void* ctx, OCDoHandle handle,
OCStackApplicationResult getReqCB(void* ctx, OCDoHandle /*handle*/,
OCClientResponse * clientResponse)
{
if (ctx == (void*) DEFAULT_CONTEXT_VALUE)
......@@ -219,7 +219,7 @@ OCStackApplicationResult getReqCB(void* ctx, OCDoHandle handle,
/*
* This is a function called back when a device is discovered
*/
OCStackApplicationResult discoveryReqCB(void* ctx, OCDoHandle handle,
OCStackApplicationResult discoveryReqCB(void* ctx, OCDoHandle /*handle*/,
OCClientResponse * clientResponse)
{
if (ctx == (void*)DEFAULT_CONTEXT_VALUE)
......