[all-commits] [llvm/llvm-project] 3e0206: [libc][pthread] fix -Wmissing-field-initializers (...

Nick Desaulniers via All-commits all-commits at lists.llvm.org
Wed Feb 12 14:28:51 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3e02069afe39a3c314476141b9dd90daad5803f2
      https://github.com/llvm/llvm-project/commit/3e02069afe39a3c314476141b9dd90daad5803f2
  Author: Nick Desaulniers <nick.desaulniers at gmail.com>
  Date:   2025-02-12 (Wed, 12 Feb 2025)

  Changed paths:
    M libc/include/llvm-libc-macros/CMakeLists.txt
    M libc/include/llvm-libc-macros/pthread-macros.h
    M libc/test/integration/src/pthread/pthread_mutex_test.cpp

  Log Message:
  -----------
  [libc][pthread] fix -Wmissing-field-initializers (#126314)

Fixes:


llvm-project/libc/test/integration/src/pthread/pthread_rwlock_test.cpp:59:29:
    warning: missing field '__preference' initializer
    [-Wmissing-field-initializers]
       59 |   pthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER;
          |                             ^

Also, add a test that demonstrates the same issue for
PTHREAD_MUTEX_INITIALIZER, and fix that, too.

PTHREAD_ONCE_INIT does not have this issue and does have test coverage.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list