This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit b4d4c19f0c8465f4e8fc21ff6db598216e5f1a2a
Author: pangzhen1 <[email protected]>
AuthorDate: Tue Sep 30 09:39:06 2025 +0800

    sched/tls: avoid converting uintptr_t to void * directly
    
    Fix Coverity: avoid directly converting variables from type uintptr_t
    to pointers of type void * when initializing the stdio stream cookie.
    
    Signed-off-by: pangzhen1 <[email protected]>
---
 sched/tls/task_initinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sched/tls/task_initinfo.c b/sched/tls/task_initinfo.c
index 992964c2b94..56d3ee3d52f 100644
--- a/sched/tls/task_initinfo.c
+++ b/sched/tls/task_initinfo.c
@@ -83,7 +83,7 @@ static void task_init_stream(FAR struct streamlist *list)
        * file descriptor locks this stream.
        */
 
-      stream[i].fs_cookie   = (FAR void *)(intptr_t)i;
+      stream[i].fs_cookie   = (FAR char *)(intptr_t)i;
       stream[i].fs_oflags   = i ? O_WRONLY : O_RDONLY;
     }
 }

Reply via email to