!7505 fix: code style problem

Merge pull request !7505 from gouwenbo/master
This commit is contained in:
openharmony_ci 2024-08-30 02:18:52 +00:00 committed by Gitee
commit ae4453a5f5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 5 additions and 5 deletions

View File

@ -857,7 +857,7 @@ static void OnP2pVerifyMsgReceived(int32_t channelId, const char *data, uint32_t
len - sizeof(int64_t) - sizeof(int64_t));
TRANS_CHECK_AND_RETURN_LOGW((json != NULL), TRANS_CTRL, "parse json failed");
int64_t msgType = SoftBusLtoHll((uint64_t)*(int64_t*)data);
int64_t msgType = (int64_t)SoftBusLtoHll((uint64_t)*(int64_t*)data);
AuthHandle authHandle = { .authId = channelId, .type = AUTH_LINK_TYPE_BLE };
if (msgType == P2P_VERIFY_REQUEST) {
OnVerifyP2pRequest(authHandle, SoftBusLtoHll((uint64_t)*(int64_t*)(data + sizeof(int64_t))), json, false);

View File

@ -153,7 +153,7 @@ static bool SessionIdIsAvailable(int32_t sessionId)
return true;
}
static void ShowAllSessionInfo()
static void ShowAllSessionInfo(void)
{
TRANS_LOGI(TRANS_SDK, "g_sessionIdNum=%{public}d, g_closingIdNum=%{public}d", g_sessionIdNum, g_closingIdNum);
ClientSessionServer *serverNode = NULL;

View File

@ -455,9 +455,9 @@ static void ClientTransProxySendSessionAck(int32_t channelId, int32_t seq)
return;
}
if (info.osType == OH_TYPE) {
tmpSeq = SoftBusHtoLl((uint32_t)seq);
tmpSeq = (int32_t)SoftBusHtoLl((uint32_t)seq);
} else {
tmpSeq = SoftBusHtoNl((uint32_t)seq); // convet host order to net order
tmpSeq = (int32_t)SoftBusHtoNl((uint32_t)seq); // convet host order to net order
}
if (memcpy_s(ack, PROXY_ACK_SIZE, &tmpSeq, sizeof(int32_t)) != EOK) {
TRANS_LOGE(TRANS_SDK, "memcpy seq err");
@ -582,7 +582,7 @@ static int32_t ClientTransProxyNoSubPacketProc(int32_t channelId, const char *da
return SOFTBUS_TRANS_INVALID_DATA_LENGTH;
}
TRANS_LOGD(TRANS_SDK, "NoSubPacketProc dataLen=%{public}d, inputLen=%{public}d", head.dataLen, len);
if (len <= sizeof(PacketHead) || (head.dataLen != len - sizeof(PacketHead))) {
if (len <= sizeof(PacketHead) || (head.dataLen != (int32_t)(len - sizeof(PacketHead)))) {
TRANS_LOGE(TRANS_SDK, "dataLen error, channelId=%{public}d, len=%{public}d, dataLen=%{public}d",
channelId, len, head.dataLen);
return SOFTBUS_TRANS_INVALID_DATA_LENGTH;