[libcxx-commits] [libcxx] [libcxx] Add cast to avoid pointer casting warning on Windows (PR #92738)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 20 04:03:51 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 ba8a2ade84f4c1bfc531fe3673470377c038f31d 42981a2a42f65c62e64522a980d65271e9847c72 -- libcxx/src/chrono.cpp
``````````

</details>

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

``````````diff
diff --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp
index 009c210993..83e8a64504 100644
--- a/libcxx/src/chrono.cpp
+++ b/libcxx/src/chrono.cpp
@@ -77,7 +77,7 @@ typedef void(WINAPI* GetSystemTimeAsFileTimePtr)(LPFILETIME);
 class GetSystemTimeInit {
 public:
   GetSystemTimeInit() {
-    fp = (GetSystemTimeAsFileTimePtr)(void *)GetProcAddress(
+    fp = (GetSystemTimeAsFileTimePtr)(void*)GetProcAddress(
         GetModuleHandleW(L"kernel32.dll"), "GetSystemTimePreciseAsFileTime");
     if (fp == nullptr)
       fp = GetSystemTimeAsFileTime;

``````````

</details>


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


More information about the libcxx-commits mailing list