[libcxx-commits] [libcxx] 5f29ed1 - [libc++] Fix warnings when compiling libc++ for Windows with clang-cl /W4

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 8 08:51:39 PDT 2023


Author: Colin Finck
Date: 2023-09-08T11:51:20-04:00
New Revision: 5f29ed16548159a575068214ca95cae6f0ad24e7

URL: https://github.com/llvm/llvm-project/commit/5f29ed16548159a575068214ca95cae6f0ad24e7
DIFF: https://github.com/llvm/llvm-project/commit/5f29ed16548159a575068214ca95cae6f0ad24e7.diff

LOG: [libc++] Fix warnings when compiling libc++ for Windows with clang-cl /W4

Differential Revision: https://reviews.llvm.org/D96408

Added: 
    

Modified: 
    libcxx/src/atomic.cpp
    libcxx/src/support/win32/locale_win32.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp
index a55249a15c21702..fc90a1f5b2ba04c 100644
--- a/libcxx/src/atomic.cpp
+++ b/libcxx/src/atomic.cpp
@@ -147,7 +147,7 @@ static void __libcpp_contention_notify(__cxx_atomic_contention_t volatile* __con
         // We only call 'wake' if we consumed a contention bit here.
         __libcpp_platform_wake_by_address(__platform_state, __notify_one);
 }
-static __cxx_contention_t __libcpp_contention_monitor_for_wait(__cxx_atomic_contention_t volatile* __contention_state,
+static __cxx_contention_t __libcpp_contention_monitor_for_wait(__cxx_atomic_contention_t volatile* /*__contention_state*/,
                                                                __cxx_atomic_contention_t const volatile* __platform_state)
 {
     // We will monitor this value.

diff  --git a/libcxx/src/support/win32/locale_win32.cpp b/libcxx/src/support/win32/locale_win32.cpp
index 2543686c907d8c4..c9d1d63b2508afb 100644
--- a/libcxx/src/support/win32/locale_win32.cpp
+++ b/libcxx/src/support/win32/locale_win32.cpp
@@ -17,8 +17,8 @@ int __libcpp_vasprintf(char **sptr, const char *__restrict fmt, va_list ap);
 
 using std::__libcpp_locale_guard;
 
-// FIXME: base currently unused. Needs manual work to construct the new locale
-locale_t newlocale( int mask, const char * locale, locale_t /*base*/ )
+// FIXME: base and mask currently unused. Needs manual work to construct the new locale
+locale_t newlocale(int /*mask*/, const char * locale, locale_t /*base*/)
 {
     return {_create_locale( LC_ALL, locale ), locale};
 }


        


More information about the libcxx-commits mailing list