diff --git a/binfmt/binfmt_execmodule.c b/binfmt/binfmt_execmodule.c index 9b169114c90..6ea8d6beaa6 100644 --- a/binfmt/binfmt_execmodule.c +++ b/binfmt/binfmt_execmodule.c @@ -294,7 +294,7 @@ int exec_module(FAR struct binary_s *binp, } #endif - return (int)pid; + return pid; errout_with_tcbinit: #ifndef CONFIG_BUILD_KERNEL diff --git a/fs/procfs/fs_procfs.c b/fs/procfs/fs_procfs.c index be5bd260783..11505e0e04b 100644 --- a/fs/procfs/fs_procfs.c +++ b/fs/procfs/fs_procfs.c @@ -847,14 +847,14 @@ static int procfs_readdir(FAR struct inode *mountpt, FAR struct tcb_s *tcb = nxsched_get_tcb(pid); if (!tcb) { - ferr("ERROR: PID %d is no longer valid\n", (int)pid); + ferr("ERROR: PID %d is no longer valid\n", pid); return -ENOENT; } /* Save the filename=pid and file type=directory */ entry->d_type = DTYPE_DIRECTORY; - procfs_snprintf(entry->d_name, NAME_MAX + 1, "%d", (int)pid); + procfs_snprintf(entry->d_name, NAME_MAX + 1, "%d", pid); /* Set up the next directory entry offset. NOTE that we could use * the standard f_pos instead of our own private index. diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c index 8d574c10d9a..81decce25b2 100644 --- a/fs/procfs/fs_procfsproc.c +++ b/fs/procfs/fs_procfsproc.c @@ -1474,7 +1474,7 @@ static int proc_open(FAR struct file *filep, FAR const char *relpath, tcb = nxsched_get_tcb(pid); if (tcb == NULL) { - ferr("ERROR: PID %d is no longer valid\n", (int)pid); + ferr("ERROR: PID %d is no longer valid\n", pid); return -ENOENT; } @@ -1561,7 +1561,7 @@ static ssize_t proc_read(FAR struct file *filep, FAR char *buffer, tcb = nxsched_get_tcb(procfile->pid); if (tcb == NULL) { - ferr("ERROR: PID %d is not valid\n", (int)procfile->pid); + ferr("ERROR: PID %d is not valid\n", procfile->pid); return -ENODEV; } @@ -1651,7 +1651,7 @@ static ssize_t proc_write(FAR struct file *filep, FAR const char *buffer, tcb = nxsched_get_tcb(procfile->pid); if (tcb == NULL) { - ferr("ERROR: PID %d is not valid\n", (int)procfile->pid); + ferr("ERROR: PID %d is not valid\n", procfile->pid); return -ENODEV; } @@ -1780,7 +1780,7 @@ static int proc_opendir(FAR const char *relpath, tcb = nxsched_get_tcb(pid); if (tcb == NULL) { - ferr("ERROR: PID %d is not valid\n", (int)pid); + ferr("ERROR: PID %d is not valid\n", pid); return -ENOENT; } @@ -1900,7 +1900,7 @@ static int proc_readdir(FAR struct fs_dirent_s *dir, tcb = nxsched_get_tcb(pid); if (tcb == NULL) { - ferr("ERROR: PID %d is no longer valid\n", (int)pid); + ferr("ERROR: PID %d is no longer valid\n", pid); return -ENOENT; } @@ -2018,7 +2018,7 @@ static int proc_stat(const char *relpath, struct stat *buf) tcb = nxsched_get_tcb(pid); if (tcb == NULL) { - ferr("ERROR: PID %d is no longer valid\n", (int)pid); + ferr("ERROR: PID %d is no longer valid\n", pid); return -ENOENT; } diff --git a/mm/mempool/mempool.c b/mm/mempool/mempool.c index 2bdeb645451..061dbd5b388 100644 --- a/mm/mempool/mempool.c +++ b/mm/mempool/mempool.c @@ -506,7 +506,7 @@ void mempool_memdump(FAR struct mempool_s *pool, # endif syslog(LOG_INFO, "%6d%12zu%12lu%*p%s\n", - (int)buf->pid, blocksize, buf->seqno, + buf->pid, blocksize, buf->seqno, MM_PTR_FMT_WIDTH, ((FAR char *)buf - blocksize), tmp); } } diff --git a/mm/mm_heap/mm_memdump.c b/mm/mm_heap/mm_memdump.c index fdac302c464..3caa77fd0a7 100644 --- a/mm/mm_heap/mm_memdump.c +++ b/mm/mm_heap/mm_memdump.c @@ -85,7 +85,7 @@ static void memdump_handler(FAR struct mm_allocnode_s *node, FAR void *arg) # endif syslog(LOG_INFO, "%6d%12zu%12lu%*p%s\n", - (int)node->pid, nodesize, node->seqno, + node->pid, nodesize, node->seqno, MM_PTR_FMT_WIDTH, ((FAR char *)node + SIZEOF_MM_ALLOCNODE), buf); #endif diff --git a/mm/tlsf/mm_tlsf.c b/mm/tlsf/mm_tlsf.c index b4bb8ad9479..bfe2e6cb94f 100644 --- a/mm/tlsf/mm_tlsf.c +++ b/mm/tlsf/mm_tlsf.c @@ -430,7 +430,7 @@ static void memdump_handler(FAR void *ptr, size_t size, int used, # endif syslog(LOG_INFO, "%6d%12zu%12lu%*p%s\n", - (int)buf->pid, size, buf->seqno, MM_PTR_FMT_WIDTH, + buf->pid, size, buf->seqno, MM_PTR_FMT_WIDTH, ptr, tmp); #endif } diff --git a/sched/task/task_create.c b/sched/task/task_create.c index 0118abe6c25..0cb209ae051 100644 --- a/sched/task/task_create.c +++ b/sched/task/task_create.c @@ -110,7 +110,7 @@ int nxthread_create(FAR const char *name, uint8_t ttype, int priority, nxtask_activate(&tcb->cmn); - return (int)pid; + return pid; } /**************************************************************************** diff --git a/sched/task/task_spawn.c b/sched/task/task_spawn.c index bb011a38538..7c261286a00 100644 --- a/sched/task/task_spawn.c +++ b/sched/task/task_spawn.c @@ -129,7 +129,7 @@ static int nxtask_spawn_create(FAR const char *name, int priority, nxtask_activate(&tcb->cmn); - return (int)pid; + return pid; } /**************************************************************************** @@ -341,7 +341,7 @@ int task_spawn(FAR const char *name, main_t entry, file_actions != NULL ? *file_actions : NULL, attr, argv, envp); - return ret >= 0 ? (int)pid : ret; + return ret >= 0 ? pid : ret; } #endif /* CONFIG_BUILD_KERNEL */