[all-commits] [llvm/llvm-project] f0a395: [libc][cleanup] Fix most conversion warnings

michaelrj-google via All-commits all-commits at lists.llvm.org
Mon Aug 7 15:03:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f0a3954ef1af274cb0b79a6e0bc51a31e0de540b
      https://github.com/llvm/llvm-project/commit/f0a3954ef1af274cb0b79a6e0bc51a31e0de540b
  Author: Michael Jones <michaelrj at google.com>
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
    M libc/src/__support/CPP/bit.h
    M libc/src/__support/File/linux/dir.cpp
    M libc/src/__support/File/linux/file.cpp
    M libc/src/__support/OSUtil/darwin/quick_exit.h
    M libc/src/__support/OSUtil/darwin/syscall.h
    M libc/src/__support/OSUtil/linux/io.h
    M libc/src/__support/OSUtil/linux/quick_exit.h
    M libc/src/__support/OSUtil/linux/syscall.h
    M libc/src/__support/threads/linux/callonce.cpp
    M libc/src/__support/threads/linux/mutex.h
    M libc/src/__support/threads/linux/thread.cpp
    M libc/src/__support/threads/thread.cpp
    M libc/src/fcntl/linux/creat.cpp
    M libc/src/fcntl/linux/open.cpp
    M libc/src/fcntl/linux/openat.cpp
    M libc/src/sched/linux/sched_get_priority_max.cpp
    M libc/src/sched/linux/sched_get_priority_min.cpp
    M libc/src/sched/linux/sched_getaffinity.cpp
    M libc/src/sched/linux/sched_getparam.cpp
    M libc/src/sched/linux/sched_getscheduler.cpp
    M libc/src/sched/linux/sched_rr_get_interval.cpp
    M libc/src/sched/linux/sched_setaffinity.cpp
    M libc/src/sched/linux/sched_setparam.cpp
    M libc/src/sched/linux/sched_setscheduler.cpp
    M libc/src/sched/linux/sched_yield.cpp
    M libc/src/signal/linux/__restore.cpp
    M libc/src/signal/linux/kill.cpp
    M libc/src/signal/linux/raise.cpp
    M libc/src/signal/linux/sigaction.cpp
    M libc/src/signal/linux/sigaltstack.cpp
    M libc/src/signal/linux/signal_utils.h
    M libc/src/signal/linux/sigprocmask.cpp
    M libc/src/spawn/linux/posix_spawn.cpp
    M libc/src/stdio/linux/remove.cpp
    M libc/src/stdio/printf_core/vfprintf_internal.h
    M libc/src/sys/mman/linux/madvise.cpp
    M libc/src/sys/mman/linux/mmap.cpp
    M libc/src/sys/mman/linux/mprotect.cpp
    M libc/src/sys/mman/linux/munmap.cpp
    M libc/src/sys/mman/linux/posix_madvise.cpp
    M libc/src/sys/random/linux/getrandom.cpp
    M libc/src/sys/resource/linux/getrlimit.cpp
    M libc/src/sys/resource/linux/setrlimit.cpp
    M libc/src/sys/select/linux/select.cpp
    M libc/src/sys/sendfile/linux/sendfile.cpp
    M libc/src/sys/socket/linux/socket.cpp
    M libc/src/sys/stat/linux/chmod.cpp
    M libc/src/sys/stat/linux/fchmod.cpp
    M libc/src/sys/stat/linux/fchmodat.cpp
    M libc/src/sys/stat/linux/kernel_statx.h
    M libc/src/sys/stat/linux/mkdir.cpp
    M libc/src/sys/stat/linux/mkdirat.cpp
    M libc/src/sys/utsname/linux/uname.cpp
    M libc/src/sys/wait/wait4Impl.h
    M libc/src/termios/linux/tcdrain.cpp
    M libc/src/termios/linux/tcflow.cpp
    M libc/src/termios/linux/tcflush.cpp
    M libc/src/termios/linux/tcgetattr.cpp
    M libc/src/termios/linux/tcgetsid.cpp
    M libc/src/termios/linux/tcsendbreak.cpp
    M libc/src/termios/linux/tcsetattr.cpp
    M libc/src/threads/linux/CndVar.h
    M libc/src/time/clock_gettime.cpp
    M libc/src/time/gettimeofday.cpp
    M libc/src/time/linux/clock.cpp
    M libc/src/time/linux/time.cpp
    M libc/src/time/nanosleep.cpp
    M libc/src/time/time_utils.cpp
    M libc/src/unistd/linux/access.cpp
    M libc/src/unistd/linux/chdir.cpp
    M libc/src/unistd/linux/close.cpp
    M libc/src/unistd/linux/dup.cpp
    M libc/src/unistd/linux/dup2.cpp
    M libc/src/unistd/linux/dup3.cpp
    M libc/src/unistd/linux/execv.cpp
    M libc/src/unistd/linux/execve.cpp
    M libc/src/unistd/linux/fchdir.cpp
    M libc/src/unistd/linux/fork.cpp
    M libc/src/unistd/linux/fsync.cpp
    M libc/src/unistd/linux/ftruncate.cpp
    M libc/src/unistd/linux/getcwd.cpp
    M libc/src/unistd/linux/geteuid.cpp
    M libc/src/unistd/linux/getpid.cpp
    M libc/src/unistd/linux/getppid.cpp
    M libc/src/unistd/linux/getuid.cpp
    M libc/src/unistd/linux/isatty.cpp
    M libc/src/unistd/linux/link.cpp
    M libc/src/unistd/linux/linkat.cpp
    M libc/src/unistd/linux/lseek.cpp
    M libc/src/unistd/linux/pread.cpp
    M libc/src/unistd/linux/pwrite.cpp
    M libc/src/unistd/linux/read.cpp
    M libc/src/unistd/linux/readlink.cpp
    M libc/src/unistd/linux/readlinkat.cpp
    M libc/src/unistd/linux/rmdir.cpp
    M libc/src/unistd/linux/symlink.cpp
    M libc/src/unistd/linux/symlinkat.cpp
    M libc/src/unistd/linux/syscall.cpp
    M libc/src/unistd/linux/truncate.cpp
    M libc/src/unistd/linux/unlink.cpp
    M libc/src/unistd/linux/unlinkat.cpp
    M libc/src/unistd/linux/write.cpp
    M libc/startup/linux/aarch64/start.cpp
    M libc/startup/linux/riscv64/start.cpp
    M libc/startup/linux/x86_64/start.cpp
    M libc/test/src/__support/OSUtil/linux/x86_64/syscall_test.cpp
    M libc/test/src/sched/affinity_test.cpp
    M libc/test/src/sched/cpu_count_test.cpp
    M libc/test/src/signal/kill_test.cpp
    M utils/bazel/llvm-project-overlay/libc/BUILD.bazel

  Log Message:
  -----------
  [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




More information about the All-commits mailing list