Change initialization of mbstate_t objects in tests from '= {0}' to '= {}', which does the same thing, w/o having clang and gcc warn with -Wall.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@247695 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af9a44f256
commit
c2d317f1a2
@ -34,7 +34,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
mbstate_t mb = {0};
|
||||
mbstate_t mb = {};
|
||||
size_t s = 0;
|
||||
tm *tm = 0;
|
||||
wint_t w = 0;
|
||||
|
@ -28,7 +28,7 @@ int main()
|
||||
const char from[] = "some text";
|
||||
F::intern_type to[9];
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const char* from_next = 0;
|
||||
F::intern_type* to_next = 0;
|
||||
assert(f.in(mbs, from, from + 9, from_next,
|
||||
|
@ -22,7 +22,7 @@ int main()
|
||||
{
|
||||
std::locale l = std::locale::classic();
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const char from[] = "some text";
|
||||
assert(f.length(mbs, from, from+10, 0) == 0);
|
||||
assert(f.length(mbs, from, from+10, 8) == 8);
|
||||
|
@ -31,7 +31,7 @@ int main()
|
||||
{
|
||||
F::intern_type from[9] = {'s', 'o', 'm', 'e', ' ', 't', 'e', 'x', 't'};
|
||||
char to[9] = {0};
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const F::intern_type* from_next = 0;
|
||||
char* to_next = 0;
|
||||
F::result r = f.out(mbs, from, from + 9, from_next,
|
||||
|
@ -26,7 +26,7 @@ int main()
|
||||
std::locale l = std::locale::classic();
|
||||
std::vector<char> to(3);
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
char* to_next = 0;
|
||||
assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::noconv);
|
||||
assert(to_next == to.data());
|
||||
|
@ -28,7 +28,7 @@ int main()
|
||||
const char from[] = "some text";
|
||||
F::intern_type to[9];
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const char* from_next = 0;
|
||||
F::intern_type* to_next = 0;
|
||||
assert(f.in(mbs, from, from + 9, from_next,
|
||||
|
@ -22,7 +22,7 @@ int main()
|
||||
{
|
||||
std::locale l = std::locale::classic();
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const char from[] = "some text";
|
||||
assert(f.length(mbs, from, from+10, 0) == 0);
|
||||
assert(f.length(mbs, from, from+10, 8) == 8);
|
||||
|
@ -31,7 +31,7 @@ int main()
|
||||
{
|
||||
F::intern_type from[9] = {'s', 'o', 'm', 'e', ' ', 't', 'e', 'x', 't'};
|
||||
char to[9] = {0};
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const F::intern_type* from_next = 0;
|
||||
char* to_next = 0;
|
||||
F::result r = f.out(mbs, from, from + 9, from_next,
|
||||
|
@ -26,7 +26,7 @@ int main()
|
||||
std::locale l = std::locale::classic();
|
||||
std::vector<char> to(3);
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
char* to_next = 0;
|
||||
assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::noconv);
|
||||
assert(to_next == to.data());
|
||||
|
@ -28,7 +28,7 @@ int main()
|
||||
const std::basic_string<F::intern_type> from("some text");
|
||||
std::vector<char> to(from.size());
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const char* from_next = 0;
|
||||
char* to_next = 0;
|
||||
assert(f.in(mbs, from.data(), from.data() + from.size(), from_next,
|
||||
|
@ -22,7 +22,7 @@ int main()
|
||||
{
|
||||
std::locale l = std::locale::classic();
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const char from[10]= {0};
|
||||
assert(f.length(mbs, from, from+10, 0) == 0);
|
||||
assert(f.length(mbs, from, from+10, 9) == 9);
|
||||
|
@ -28,7 +28,7 @@ int main()
|
||||
const std::basic_string<F::intern_type> from("some text");
|
||||
std::vector<char> to(from.size());
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const char* from_next = 0;
|
||||
char* to_next = 0;
|
||||
assert(f.out(mbs, from.data(), from.data() + from.size(), from_next,
|
||||
|
@ -26,7 +26,7 @@ int main()
|
||||
std::locale l = std::locale::classic();
|
||||
std::vector<char> to(3);
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
char* to_next = 0;
|
||||
assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::noconv);
|
||||
assert(to_next == to.data());
|
||||
|
@ -30,7 +30,7 @@ int main()
|
||||
const F32_8& f32_8 = std::use_facet<F32_8>(std::locale::classic());
|
||||
const F32_16& f32_16 = std::use_facet<F32_16>(l);
|
||||
const F16_8& f16_8 = std::use_facet<F16_8>(std::locale::classic());
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
F32_8::intern_type* c32p;
|
||||
F16_8::intern_type* c16p;
|
||||
F32_8::extern_type* c8p;
|
||||
|
@ -29,7 +29,7 @@ int main()
|
||||
const std::basic_string<F::intern_type> expected(from.begin(), from.end());
|
||||
std::basic_string<F::intern_type> to(from.size(), F::intern_type());
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const F::extern_type* from_next = 0;
|
||||
F::intern_type* to_next = 0;
|
||||
F::result r = f.in(mbs, from.data(), from.data() + from.size(), from_next,
|
||||
|
@ -22,7 +22,7 @@ int main()
|
||||
{
|
||||
std::locale l = std::locale::classic();
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const char* from = "123467890";
|
||||
assert(f.length(mbs, from, from+10, 0) == 0);
|
||||
assert(f.length(mbs, from, from+10, 9) == 9);
|
||||
|
@ -29,7 +29,7 @@ int main()
|
||||
{
|
||||
const std::basic_string<F::intern_type> from(L"some text");
|
||||
std::vector<char> to(from.size()+1);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const F::intern_type* from_next = 0;
|
||||
char* to_next = 0;
|
||||
F::result r = f.out(mbs, from.data(), from.data() + from.size(), from_next,
|
||||
@ -43,7 +43,7 @@ int main()
|
||||
std::basic_string<F::intern_type> from(L"some text");
|
||||
from[4] = '\0';
|
||||
std::vector<char> to(from.size()+1);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const F::intern_type* from_next = 0;
|
||||
char* to_next = 0;
|
||||
F::result r = f.out(mbs, from.data(), from.data() + from.size(), from_next,
|
||||
@ -56,7 +56,7 @@ int main()
|
||||
{
|
||||
std::basic_string<F::intern_type> from(L"some text");
|
||||
std::vector<char> to(from.size()-1);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
const F::intern_type* from_next = 0;
|
||||
char* to_next = 0;
|
||||
F::result r = f.out(mbs, from.data(), from.data() + from.size(), from_next,
|
||||
|
@ -28,7 +28,7 @@ int main()
|
||||
std::locale l = std::locale::classic();
|
||||
std::vector<F::extern_type> to(3);
|
||||
const F& f = std::use_facet<F>(l);
|
||||
std::mbstate_t mbs = {0};
|
||||
std::mbstate_t mbs = {};
|
||||
F::extern_type* to_next = 0;
|
||||
assert(f.unshift(mbs, to.data(), to.data() + to.size(), to_next) == F::ok);
|
||||
assert(to_next == to.data());
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
std::mbstate_t mb = {0};
|
||||
std::mbstate_t mb = {};
|
||||
std::size_t s = 0;
|
||||
std::tm *tm = 0;
|
||||
std::wint_t w = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user