mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-22 07:51:39 +08:00
Cleanup warnings and remove use of __builtin_va_list in depr.c.headers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268294 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
fenv_t fenv = {0};
|
fenv_t fenv = {};
|
||||||
fexcept_t fex = 0;
|
fexcept_t fex = 0;
|
||||||
static_assert((std::is_same<decltype(feclearexcept(0)), int>::value), "");
|
static_assert((std::is_same<decltype(feclearexcept(0)), int>::value), "");
|
||||||
static_assert((std::is_same<decltype(fegetexceptflag(&fex, 0)), int>::value), "");
|
static_assert((std::is_same<decltype(fegetexceptflag(&fex, 0)), int>::value), "");
|
||||||
|
@@ -917,7 +917,7 @@ int main()
|
|||||||
uintmax_t i4 = 0;
|
uintmax_t i4 = 0;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
imaxdiv_t i1 = {0};
|
imaxdiv_t i1 = {};
|
||||||
}
|
}
|
||||||
intmax_t i = 0;
|
intmax_t i = 0;
|
||||||
static_assert((std::is_same<decltype(imaxabs(i)), intmax_t>::value), "");
|
static_assert((std::is_same<decltype(imaxabs(i)), intmax_t>::value), "");
|
||||||
|
@@ -107,7 +107,7 @@
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
FILE* fp = 0;
|
FILE* fp = 0;
|
||||||
fpos_t fpos = {0};
|
fpos_t fpos = {};
|
||||||
size_t s = 0;
|
size_t s = 0;
|
||||||
char* cp = 0;
|
char* cp = 0;
|
||||||
char arr[] = {'a', 'b'};
|
char arr[] = {'a', 'b'};
|
||||||
|
@@ -25,7 +25,7 @@ int main()
|
|||||||
clock_t c = 0; ((void)c);
|
clock_t c = 0; ((void)c);
|
||||||
size_t s = 0;
|
size_t s = 0;
|
||||||
time_t t = 0;
|
time_t t = 0;
|
||||||
tm tmv = {0};
|
tm tmv = {};
|
||||||
static_assert((std::is_same<decltype(clock()), clock_t>::value), "");
|
static_assert((std::is_same<decltype(clock()), clock_t>::value), "");
|
||||||
static_assert((std::is_same<decltype(difftime(t,t)), double>::value), "");
|
static_assert((std::is_same<decltype(difftime(t,t)), double>::value), "");
|
||||||
static_assert((std::is_same<decltype(mktime(&tmv)), time_t>::value), "");
|
static_assert((std::is_same<decltype(mktime(&tmv)), time_t>::value), "");
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
// <wchar.h>
|
// <wchar.h>
|
||||||
|
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
@@ -34,24 +35,12 @@ int main()
|
|||||||
// a complete object type other than an array type that can hold the conversion
|
// a complete object type other than an array type that can hold the conversion
|
||||||
// state information necessary to convert between sequences of multibyte
|
// state information necessary to convert between sequences of multibyte
|
||||||
// characters and wide characters
|
// characters and wide characters
|
||||||
#if defined(__clang__)
|
mbstate_t mb = {};
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wmissing-braces"
|
|
||||||
#endif
|
|
||||||
mbstate_t mb = {0};
|
|
||||||
#if defined(__clang__)
|
|
||||||
#pragma clang diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
size_t s = 0;
|
size_t s = 0;
|
||||||
tm *tm = 0;
|
tm *tm = 0;
|
||||||
wint_t w = 0;
|
wint_t w = 0;
|
||||||
::FILE* fp = 0;
|
::FILE* fp = 0;
|
||||||
#ifdef __APPLE__
|
::va_list va;
|
||||||
__darwin_va_list va;
|
|
||||||
#else
|
|
||||||
__builtin_va_list va;
|
|
||||||
#endif
|
|
||||||
char* ns = 0;
|
char* ns = 0;
|
||||||
wchar_t* ws = 0;
|
wchar_t* ws = 0;
|
||||||
static_assert((std::is_same<decltype(fwprintf(fp, L"")), int>::value), "");
|
static_assert((std::is_same<decltype(fwprintf(fp, L"")), int>::value), "");
|
||||||
|
Reference in New Issue
Block a user