Fix 'maybe-uninitialized' g++ error on macos (#600)

This commit is contained in:
Eric Vantillard 2022-09-14 13:56:45 +02:00 committed by John Wellbelove
parent a4a096a54d
commit 6ac2087368
3 changed files with 12 additions and 12 deletions

View File

@ -55,7 +55,7 @@ namespace
//*************************************************************************
TEST(test_copy_constructor)
{
int a;
int a{};
etl::fixed_iterator<const int*> fi1(&a);
etl::fixed_iterator<const int*> fi2(fi1);
@ -66,7 +66,7 @@ namespace
//*************************************************************************
TEST(test_constructor)
{
int a;
int a{};
etl::fixed_iterator<const int*> fi(&a);
@ -76,7 +76,7 @@ namespace
//*************************************************************************
TEST(test_make)
{
int a;
int a{};
etl::fixed_iterator<const int*> fi = &a;
@ -121,7 +121,7 @@ namespace
//*************************************************************************
TEST(test_conversion_operator)
{
int a;
int a{};
etl::fixed_iterator<const int*> fi(&a);
@ -202,8 +202,8 @@ namespace
//*************************************************************************
TEST(test_assignment)
{
int a;
int b;
int a{};
int b{};
etl::fixed_iterator<int*> fi = &a;
fi = &b;
@ -218,8 +218,8 @@ namespace
//*************************************************************************
TEST(test_equality)
{
int a;
int b;
int a{};
int b{};
etl::fixed_iterator<int*> fi1 = &a;
etl::fixed_iterator<int*> fi2 = &a;

View File

@ -202,7 +202,7 @@ namespace
//*************************************************************************
TEST(test_hash_pointer)
{
int i;
int i{};
size_t hash = etl::hash<int*>()(&i);
CHECK_EQUAL(size_t(&i), hash);
@ -211,7 +211,7 @@ namespace
//*************************************************************************
TEST(test_hash_const_pointer)
{
int i;
int i{};
size_t hash = etl::hash<const int*>()(&i);
CHECK_EQUAL(size_t(&i), hash);
@ -220,7 +220,7 @@ namespace
//*************************************************************************
TEST(test_hash_const_pointer_const)
{
int i;
int i{};
const int * const pi = &i;
size_t hash = etl::hash<const int *>()(pi);

View File

@ -298,7 +298,7 @@ namespace
//*************************************************************************
TEST(test_empty)
{
Data data;
Data data{};
CHECK(!data.empty());
CHECK(!data[0].empty());