mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 01:26:56 +08:00
drivers/note: fix compile error.
note/note_driver.c:2440:45: error: implicit declaration of function 'note_find_taskname'; did you mean 'note_get_taskname'? [-Werror=implicit-function-declaration]
2440 | FAR struct note_taskname_info_s *ti = note_find_taskname(pid);
| ^~~~~~~~~~~~~~~~~~
| note_get_taskname
note/note_driver.c:2440:45: error: initialization of 'struct note_taskname_info_s *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
note/note_driver.c:2444:26: error: invalid use of undefined type 'struct note_taskname_info_s'
2444 | strlcpy(buf, ti->name, len);
| ^~
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
This commit is contained in:
@@ -2112,7 +2112,8 @@ void note_get_taskname(pid_t pid, FAR char *buf, size_t len)
|
||||
}
|
||||
else
|
||||
{
|
||||
# ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
|
||||
# if defined(CONFIG_SCHED_INSTRUMENTATION_SWITCH) && \
|
||||
(CONFIG_DRIVERS_NOTE_TASKNAME_BUFSIZE > 0)
|
||||
FAR struct note_taskname_info_s *ti = note_find_taskname(pid);
|
||||
|
||||
if (ti != NULL)
|
||||
|
||||
Reference in New Issue
Block a user