summaryrefslogtreecommitdiff
path: root/libc/src/sys/stat/linux/chmod.cpp
diff options
context:
space:
mode:
authorMichael Jones <michaelrj@google.com>2023-08-02 16:30:26 -0700
committerMichael Jones <michaelrj@google.com>2023-08-07 15:03:01 -0700
commitf0a3954ef1af274cb0b79a6e0bc51a31e0de540b (patch)
tree3036b7d657907c56e78214c50fe9b6b736e70b99 /libc/src/sys/stat/linux/chmod.cpp
parentf6267d3b98c11b50bf24946f21c6646d2d3f6fa8 (diff)
[libc][cleanup] Fix most conversion warnings
This patch is large, but is almost entirely just adding casts to calls to syscall_impl. Much of the work was done programatically, with human checking when the syntax or types got confusing. Reviewed By: mcgrathr Differential Revision: https://reviews.llvm.org/D156950
Diffstat (limited to 'libc/src/sys/stat/linux/chmod.cpp')
-rw-r--r--libc/src/sys/stat/linux/chmod.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/sys/stat/linux/chmod.cpp b/libc/src/sys/stat/linux/chmod.cpp
index 6617f9d2bb7b..9123ea549a8e 100644
--- a/libc/src/sys/stat/linux/chmod.cpp
+++ b/libc/src/sys/stat/linux/chmod.cpp
@@ -20,9 +20,9 @@ namespace __llvm_libc {
LLVM_LIBC_FUNCTION(int, chmod, (const char *path, mode_t mode)) {
#ifdef SYS_chmod
- long ret = __llvm_libc::syscall_impl(SYS_chmod, path, mode);
+ int ret = __llvm_libc::syscall_impl<int>(SYS_chmod, path, mode);
#elif defined(SYS_fchmodat)
- long ret = __llvm_libc::syscall_impl(SYS_fchmodat, AT_FDCWD, path, mode);
+ int ret = __llvm_libc::syscall_impl<int>(SYS_fchmodat, AT_FDCWD, path, mode);
#else
#error "chmod and fchmodat syscalls not available."
#endif