[libc-commits] [libc] [libc] Added static casts to fix implicit conversion warnings in 32-bit systems (PR #99769)

via libc-commits libc-commits at lists.llvm.org
Sat Jul 20 09:20:36 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 4d8e42ea6a89c73f90941fd1b6e899912e31dd34 b88d6be9ba6a0f31101e8ed96a41c33bd294d43e --extensions cpp,h -- libc/src/__support/HashTable/randomness.h libc/src/__support/threads/thread.h libc/src/stdio/fopencookie.cpp libc/src/sys/auxv/linux/getauxval.cpp libc/src/sys/stat/linux/kernel_statx.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/src/sys/stat/linux/kernel_statx.h b/libc/src/sys/stat/linux/kernel_statx.h
index 634a855ed1..d0e223aec3 100644
--- a/libc/src/sys/stat/linux/kernel_statx.h
+++ b/libc/src/sys/stat/linux/kernel_statx.h
@@ -94,7 +94,8 @@ LIBC_INLINE int statx(int dirfd, const char *__restrict path, int flags,
   statbuf->st_ctim.tv_sec = xbuf.stx_ctime.tv_sec;
   statbuf->st_ctim.tv_nsec = xbuf.stx_ctime.tv_nsec;
   statbuf->st_blksize = xbuf.stx_blksize;
-  statbuf->st_blocks = static_cast<decltype(statbuf->st_blocks)>(xbuf.stx_blocks);
+  statbuf->st_blocks =
+      static_cast<decltype(statbuf->st_blocks)>(xbuf.stx_blocks);
 
   return 0;
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/99769


More information about the libc-commits mailing list