diff options
| author | Shell <[email protected]> | 2024-08-28 21:32:10 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2024-09-01 15:12:34 -0400 |
| commit | 679761983d129653874302e9f0eddeeaa5012841 (patch) | |
| tree | 335de1f9a1ee552bd5372e7a69fad83fbe329603 | |
| parent | dfd8ccf262d53723056490d8858807f792ffa013 (diff) | |
fixup: ptyfs: CI reported snprintf type issues
| -rw-r--r-- | components/dfs/dfs_v2/filesystems/ptyfs/ptyfs.c | 4 | ||||
| -rw-r--r-- | components/lwp/syscall_generic.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/components/dfs/dfs_v2/filesystems/ptyfs/ptyfs.c b/components/dfs/dfs_v2/filesystems/ptyfs/ptyfs.c index c6f4f3d52d..75bffdf510 100644 --- a/components/dfs/dfs_v2/filesystems/ptyfs/ptyfs.c +++ b/components/dfs/dfs_v2/filesystems/ptyfs/ptyfs.c @@ -262,7 +262,7 @@ ptsno_t ptyfs_register_pts(rt_device_t ptmx, rt_device_t pts) pts_file = rt_calloc(1, sizeof(struct ptyfs_file)); if (pts_file) { - snprintf(pts_file->basename, DIRENT_NAME_MAX, "%lu", rc); + snprintf(pts_file->basename, DIRENT_NAME_MAX, "%lu", (unsigned long)rc); ptyfile_init(pts_file, sb, 0, PTYFS_TYPE_FILE_SLAVE, PTS_DEFAULT_FILE_MODE, pts); ptyfile_add_to_root(sb, pts_file); @@ -296,7 +296,7 @@ rt_err_t ptyfs_unregister_pts(rt_device_t ptmx, ptsno_t ptsno) else { /* get path and findout device */ - snprintf(path_buf, sizeof(path_buf), "%lu", ptsno); + snprintf(path_buf, sizeof(path_buf), "%lu", (unsigned long)ptsno); pts_file = ptyfile_lookup(sb, path_buf); if (pts_file) { diff --git a/components/lwp/syscall_generic.h b/components/lwp/syscall_generic.h index a589b6fcdd..5d8287372c 100644 --- a/components/lwp/syscall_generic.h +++ b/components/lwp/syscall_generic.h @@ -16,7 +16,8 @@ #include <errno.h> #include <stdlib.h> -typedef long sysret_t; +/* signed ARCH related types */ +typedef rt_base_t sysret_t; struct rt_syscall_def { |
