From 76af416afc02c53ce636057661d88e54dbfd2465 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Mon, 2 May 2016 20:08:16 +0000 Subject: [PATCH] Cleanup warnings and remove use of __builtin_va_list in depr.c.headers llvm-svn: 268294 --- libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp | 2 +- .../std/depr/depr.c.headers/inttypes_h.pass.cpp | 2 +- .../test/std/depr/depr.c.headers/stdio_h.pass.cpp | 2 +- libcxx/test/std/depr/depr.c.headers/time_h.pass.cpp | 2 +- .../test/std/depr/depr.c.headers/wchar_h.pass.cpp | 21 +++++---------------- 5 files changed, 9 insertions(+), 20 deletions(-) diff --git a/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp index f2fcf49..0da4c9d 100644 --- a/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/fenv_h.pass.cpp @@ -60,7 +60,7 @@ int main() { - fenv_t fenv = {0}; + fenv_t fenv = {}; fexcept_t fex = 0; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); diff --git a/libcxx/test/std/depr/depr.c.headers/inttypes_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/inttypes_h.pass.cpp index 637cf72..ff045a9 100644 --- a/libcxx/test/std/depr/depr.c.headers/inttypes_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/inttypes_h.pass.cpp @@ -917,7 +917,7 @@ int main() uintmax_t i4 = 0; } { - imaxdiv_t i1 = {0}; + imaxdiv_t i1 = {}; } intmax_t i = 0; static_assert((std::is_same::value), ""); diff --git a/libcxx/test/std/depr/depr.c.headers/stdio_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdio_h.pass.cpp index 9071f80..85f9d29 100644 --- a/libcxx/test/std/depr/depr.c.headers/stdio_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/stdio_h.pass.cpp @@ -107,7 +107,7 @@ int main() { FILE* fp = 0; - fpos_t fpos = {0}; + fpos_t fpos = {}; size_t s = 0; char* cp = 0; char arr[] = {'a', 'b'}; diff --git a/libcxx/test/std/depr/depr.c.headers/time_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/time_h.pass.cpp index 0d229af..a263938 100644 --- a/libcxx/test/std/depr/depr.c.headers/time_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/time_h.pass.cpp @@ -25,7 +25,7 @@ int main() clock_t c = 0; ((void)c); size_t s = 0; time_t t = 0; - tm tmv = {0}; + tm tmv = {}; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); diff --git a/libcxx/test/std/depr/depr.c.headers/wchar_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/wchar_h.pass.cpp index 6bd2b2d..d7d9bfc 100644 --- a/libcxx/test/std/depr/depr.c.headers/wchar_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/wchar_h.pass.cpp @@ -10,6 +10,7 @@ // #include +#include #include #ifndef NULL @@ -31,27 +32,15 @@ int main() { // mbstate_t comes from the underlying C library; it is defined (in C99) as: -// a complete object type other than an array type that can hold the conversion -// state information necessary to convert between sequences of multibyte +// a complete object type other than an array type that can hold the conversion +// state information necessary to convert between sequences of multibyte // characters and wide characters -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wmissing-braces" -#endif - mbstate_t mb = {0}; -#if defined(__clang__) -#pragma clang diagnostic pop -#endif - + mbstate_t mb = {}; size_t s = 0; tm *tm = 0; wint_t w = 0; ::FILE* fp = 0; -#ifdef __APPLE__ - __darwin_va_list va; -#else - __builtin_va_list va; -#endif + ::va_list va; char* ns = 0; wchar_t* ws = 0; static_assert((std::is_same::value), ""); -- 2.7.4