fix warnings

This commit is contained in:
lixianjing 2021-01-10 22:57:11 +08:00
parent 7dbfc4097e
commit 1deee4c802
2 changed files with 6 additions and 6 deletions

View File

@ -197,7 +197,7 @@ ret_t date_time_set_day(date_time_t* dt, uint32_t day) {
ret_t date_time_set_hour(date_time_t* dt, uint32_t hour) {
return_value_if_fail(dt != NULL, RET_BAD_PARAMS);
return_value_if_fail(hour >=0 && hour < 24, RET_BAD_PARAMS);
return_value_if_fail(hour < 24, RET_BAD_PARAMS);
dt->hour = hour;
@ -206,7 +206,7 @@ ret_t date_time_set_hour(date_time_t* dt, uint32_t hour) {
ret_t date_time_set_minute(date_time_t* dt, uint32_t minute) {
return_value_if_fail(dt != NULL, RET_BAD_PARAMS);
return_value_if_fail(minute >=0 && minute < 60, RET_BAD_PARAMS);
return_value_if_fail(minute < 60, RET_BAD_PARAMS);
dt->minute = minute;
@ -215,7 +215,7 @@ ret_t date_time_set_minute(date_time_t* dt, uint32_t minute) {
ret_t date_time_set_second(date_time_t* dt, uint32_t second) {
return_value_if_fail(dt != NULL, RET_BAD_PARAMS);
return_value_if_fail(second >=0 && second < 60, RET_BAD_PARAMS);
return_value_if_fail(second < 60, RET_BAD_PARAMS);
dt->second = second;

View File

@ -1,4 +1,4 @@
/**
/**
* File: object_array.c
* Author: AWTK Develop Team
* Brief: object array
@ -146,7 +146,7 @@ ret_t object_array_remove(object_t* obj, uint32_t index) {
ret_t ret = RET_NOT_FOUND;
object_array_t* o = OBJECT_ARRAY(obj);
return_value_if_fail(o != NULL, RET_BAD_PARAMS);
if (index >= 0 && index < o->size) {
if (index < o->size) {
value_t* iter = o->props + index;
value_reset(iter);
ret = object_array_clean_invalid_props(obj);
@ -182,7 +182,7 @@ ret_t object_array_set(object_t* obj, uint32_t index, const value_t* v) {
value_t* iter = o->props + index;
value_reset(iter);
ret = value_deep_copy(iter, v);
} else if (index == -1) {
} else if (index == 0xffffffff) {
ret = object_array_push(obj, v);
} else {
ret = RET_BAD_PARAMS;