[libcxx-commits] [libcxx] 9a2561a - [libc++] Silences an invalid compiler diagnostic.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 26 09:17:41 PDT 2023


Author: Mark de Wever
Date: 2023-06-26T18:15:58+02:00
New Revision: 9a2561a7be4c485d3956509e9620953831032175

URL: https://github.com/llvm/llvm-project/commit/9a2561a7be4c485d3956509e9620953831032175
DIFF: https://github.com/llvm/llvm-project/commit/9a2561a7be4c485d3956509e9620953831032175.diff

LOG: [libc++] Silences an invalid compiler diagnostic.

When the value is not initialized it's never used. However silencing the
warning is trivial, as suggested by BlamKiwi.

Fixes https://llvm.org/PR63421

Added: 
    

Modified: 
    libcxx/include/__format/format_arg_store.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__format/format_arg_store.h b/libcxx/include/__format/format_arg_store.h
index 669b7477acd70..afba6c32fccdb 100644
--- a/libcxx/include/__format/format_arg_store.h
+++ b/libcxx/include/__format/format_arg_store.h
@@ -229,7 +229,7 @@ _LIBCPP_HIDE_FROM_ABI void __store_basic_format_arg(basic_format_arg<_Context>*
 template <class _Context, size_t N>
 struct __packed_format_arg_store {
   __basic_format_arg_value<_Context> __values_[N];
-  uint64_t __types_;
+  uint64_t __types_ = 0;
 };
 
 template <class _Context, size_t N>


        


More information about the libcxx-commits mailing list