!3235 init无符号和有符号数混用

Merge pull request !3235 from duxianzhi/1010
This commit is contained in:
openharmony_ci 2024-10-11 08:16:19 +00:00 committed by Gitee
commit 0952893b34
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 7 additions and 7 deletions

View File

@ -180,7 +180,7 @@ static void ShowParam(BShellHandle shell, const char *name, const char *value)
user->pw_name,
GetPermissionString(auditData.dacData.mode, 0, permissionStr[0], MASK_LENGTH_MAX),
group->gr_name,
GetPermissionString(auditData.dacData.mode,DAC_GROUP_START, permissionStr[1], MASK_LENGTH_MAX),
GetPermissionString(auditData.dacData.mode, DAC_GROUP_START, permissionStr[1], MASK_LENGTH_MAX),
// 2 other
GetPermissionString(auditData.dacData.mode, DAC_OTHER_START, permissionStr[2], MASK_LENGTH_MAX));
}

View File

@ -908,7 +908,7 @@ static int GetServicePeriod(const cJSON *curArrItem, Service *curServ, const cha
INIT_ERROR_CHECK(cJSON_IsNumber(arrItem), return SERVICE_FAILURE,
"Service error %s is null or is not a number", curServ->name);
curServ->attribute |= SERVICE_ATTR_PERIOD;
int value = (int)cJSON_GetNumberValue(arrItem);
uint64_t value = (uint64_t)cJSON_GetNumberValue(arrItem);
curServ->period = value * BASE_MS_UNIT;
return SERVICE_SUCCESS;
}

View File

@ -111,7 +111,7 @@ static LE_STATUS RunLoop_(const EventLoop *loop)
} else if (GetCurrentTimespec(0) >= minTimePeriod) {
timeout = 0;
} else {
timeout = minTimePeriod - GetCurrentTimespec(0);
timeout = (int)(minTimePeriod - GetCurrentTimespec(0));
}
int number = epoll_wait(epoll->epollFd, epoll->waitEvents, loop->maxevents, timeout);

View File

@ -169,8 +169,8 @@ uint8_t *LE_GetBufferInfo(const BufferHandle handle, uint32_t *dataSize, uint32_
LE_STATUS LE_Send(const LoopHandle loopHandle,
const TaskHandle taskHandle, const BufferHandle buffHandle, uint32_t buffLen)
{
LE_CHECK(loopHandle != NULL, return LE_INVALID_PARAM, "Loop is NULL");
LE_CHECK(taskHandle != NULL && buffHandle != NULL, return LE_INVALID_TASK, "Invalid parameters");
LE_CHECK(loopHandle != NULL && buffHandle != NULL, return LE_INVALID_PARAM, "Invalid parameters");
LE_CHECK(taskHandle != NULL, return LE_INVALID_TASK, "Invalid task");
EventLoop *loop = (EventLoop *)loopHandle;
if (((BaseTask *)taskHandle)->flags & TASK_FLAGS_INVALID) {
LE_FreeBuffer(loopHandle, taskHandle, buffHandle);

View File

@ -32,7 +32,7 @@ uint64_t GetCurrentTimespec(uint64_t timeout)
struct timespec start;
clock_gettime(CLOCK_MONOTONIC, &start);
uint64_t ms = timeout;
ms += (uint64_t)start.tv_sec * LE_SEC_TO_MSEC + start.tv_nsec / LE_MSEC_TO_NSEC;
ms += (uint64_t)start.tv_sec * LE_SEC_TO_MSEC + (uint64_t)start.tv_nsec / LE_MSEC_TO_NSEC;
return ms;
}

View File

@ -127,7 +127,7 @@ static int FreeLocalSecurityLabel(ParamSecurityLabel *srcLabel)
static int DacGetGroupMember(gid_t gid, uid_t *member, uint32_t *memberSize)
{
uint32_t inputLen = *memberSize;
int32_t inputLen = (int32_t)*memberSize;
*memberSize = 0;
struct group *data = getgrgid(gid);
if (data == NULL || data->gr_mem == NULL) {