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:
wangzhi16
2025-06-16 10:47:12 +08:00
committed by Xiang Xiao
parent d5b254fabb
commit a340cb59d9
+2 -1
View File
@@ -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)