[libc-commits] [libc] [libc] [Task] Prepare to enable disabled warnings (PR #122835)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Fri Jan 17 10:32:44 PST 2025
================
@@ -25,34 +25,55 @@ function(_get_common_test_compile_options output_var c_test flags)
list(APPEND compile_options "-ffixed-point")
endif()
- # list(APPEND compile_options "-Wall")
- # list(APPEND compile_options "-Wextra")
+ list(APPEND compile_options "-Wall")
+ list(APPEND compile_options "-Wextra")
# -DLIBC_WNO_ERROR=ON if you can't build cleanly with -Werror.
if(NOT LIBC_WNO_ERROR)
- # list(APPEND compile_options "-Werror")
+ list(APPEND compile_options "-Werror")
+
+ # Needed because all/most arguments become "unused" when compiling
+ # "libc/test/src/__support/fake_heap.s"
+ list(APPEND compile_options "-Wno-unused-command-line-argument")
+
+ # Needed because of:
+ # https://github.com/llvm/llvm-project/blob/0d7c8c0e294d23fcfc9a396dafebe1465c471035/libc/include/llvm-libc-macros/pthread-macros.h#L29
----------------
nickdesaulniers wrote:
Instead, please file a bug and link to it here.
> Warning text for `-Wmissing-field-initializers`
Yeah, `PTHREAD_RWLOCK_INITIALIZER` in libc/llvm-libc-macros/pthread-macros.h, needs to be updated to properly initialize all members of `pthread_rwlock_t` in libc/llvm-libc-types/pthread_rwlock_t.h (using aggregated initializations for C90 compat).
https://github.com/llvm/llvm-project/pull/122835
More information about the libc-commits
mailing list