mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 12:08:16 +08:00
fix warnings
This commit is contained in:
parent
7dbfc4097e
commit
1deee4c802
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user