Thss commit cleans up the following build warnings:
- warning incompatible-pointer-types from JniCaInterface.c
- warning missing-field-initializers from JniCaInterface.c
- warning reorder from JniOcPresenceHandle.cpp
- warning unused-variable from JniOcProvisioning.cpp
- warning unused-but-set-variable JniSecureUtils.cpp
Change-Id: I80c0df6effdff4ea089a15b53f16588c14853077
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21433
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit
e25cf3641d3cdff26054a06c95d7f6ad5ab35c54)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21503
if (JNI_OK != res)
{
LOGI("AttachCurrentThread will be called for JNIEnv pointer");
- res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
+ res = (*g_jvm)->AttachCurrentThread(g_jvm, (void**) &env, NULL);
if (JNI_OK != res)
{
if (JNI_OK != res)
{
LOGI("AttachCurrentThread will be called for JNIEnv pointer");
- res = (*g_jvm)->AttachCurrentThread(g_jvm, &env, NULL);
+ res = (*g_jvm)->AttachCurrentThread(g_jvm, (void**) &env, NULL);
if (JNI_OK != res)
{
LOGI("setConfigureImpl");
(void)env;
(void)clazz;
- CAUtilConfig_t configs = {(CATransportBTFlags_t)flag};
+ CAUtilConfig_t configs = {(CATransportBTFlags_t)flag, CA_USER_PREF_CLOUD};
CAUtilSetBTConfigure(configs);
}
using namespace OC::OCPlatform;
JniOcPresenceHandle::JniOcPresenceHandle(JniOnPresenceListener* jniListener, OCPresenceHandle presenceHandle)
- : m_jniListener(jniListener), m_presenceHandle(presenceHandle), m_jniObserveListener(nullptr)
+ : m_jniListener(jniListener), m_jniObserveListener(nullptr), m_presenceHandle(presenceHandle)
{
}
JniOcPresenceHandle::JniOcPresenceHandle(JniOnObserveListener* jniListener, OCPresenceHandle presenceHandle)
- : m_jniObserveListener(jniListener), m_presenceHandle(presenceHandle), m_jniListener(nullptr)
+ : m_jniListener(nullptr), m_jniObserveListener(jniListener), m_presenceHandle(presenceHandle)
{
}
try
{
- OTMCallbackData_t CBData = {0};
if (OIC_JUST_WORKS == (OicSecOxm_t)OxmType)
{
/*NO callback required for JUST_WORKS*/
std::ostringstream deviceId("");
char base64Buff[B64ENCODE_OUT_SAFESIZE(sizeof(((OicUuid_t*)0)->id)) + 1] = {0,};
size_t outLen = 0;
- B64Result b64Ret = B64_OK;
- b64Ret = b64Encode(uuid.id, sizeof(uuid.id), base64Buff,
- sizeof(base64Buff), &outLen);
+ b64Encode(uuid.id, sizeof(uuid.id), base64Buff,
+ sizeof(base64Buff), &outLen);
deviceId << base64Buff;
return deviceId.str();