clock/settime: minor fix compile warning
clock/clock_settime.c: In function ‘clock_settime’:
clock/clock_settime.c:120:45: warning: passing argument 1 of ‘clock_timekeeping_set_wall_time’
discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
120 | ret = clock_timekeeping_set_wall_time(tp);
| ^~
In file included from clock/clock_settime.c:37:
sched/clock/clock_timekeeping.h:40:58: note: expected ‘struct timespec *’
but argument is of type ‘const struct timespec *’
40 | int clock_timekeeping_set_wall_time(FAR struct timespec *ts);
|
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
b3e11b605a
commit
e5b3d52486
2 changed files with 2 additions and 2 deletions
|
|
@ -115,7 +115,7 @@ int clock_timekeeping_get_wall_time(FAR struct timespec *ts)
|
|||
* Name: clock_timekeeping_set_wall_time
|
||||
****************************************************************************/
|
||||
|
||||
int clock_timekeeping_set_wall_time(FAR struct timespec *ts)
|
||||
int clock_timekeeping_set_wall_time(FAR const struct timespec *ts)
|
||||
{
|
||||
irqstate_t flags;
|
||||
uint64_t counter;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
int clock_timekeeping_get_wall_time(FAR struct timespec *ts);
|
||||
int clock_timekeeping_set_wall_time(FAR struct timespec *ts);
|
||||
int clock_timekeeping_set_wall_time(FAR const struct timespec *ts);
|
||||
|
||||
void clock_update_wall_time(void);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue