Fixed all 'extra semicolon' warnings

This commit is contained in:
John Wellbelove 2025-12-16 09:15:26 +00:00
parent 558c04b0a0
commit d884719098
357 changed files with 1609 additions and 1591 deletions

View File

@ -75,8 +75,8 @@ namespace etl
{
#if defined(ETL_USE_ATOMIC_BUILTINS)
#define ETL_BUILTIN_LOCK while (__atomic_test_and_set(&flag, etl::memory_order_seq_cst)) {}
#define ETL_BUILTIN_UNLOCK __atomic_clear(&flag, etl::memory_order_seq_cst);
#define ETL_BUILTIN_LOCK do { while (__atomic_test_and_set(&flag, etl::memory_order_seq_cst)) {} } while (0)
#define ETL_BUILTIN_UNLOCK do { __atomic_clear(&flag, etl::memory_order_seq_cst); } while (0)
//***************************************************************************
// Atomic type for pre C++11 GCC compilers that support the builtin '__atomic' functions.
@ -1021,8 +1021,8 @@ namespace etl
#if defined(ETL_USE_SYNC_BUILTINS)
#define ETL_BUILTIN_LOCK while (__sync_lock_test_and_set(&flag, 1U)) {}
#define ETL_BUILTIN_UNLOCK __sync_lock_release(&flag);
#define ETL_BUILTIN_LOCK do { while (__sync_lock_test_and_set(&flag, 1U)) {} } while(0)
#define ETL_BUILTIN_UNLOCK do { __sync_lock_release(&flag); } while(0)
//***************************************************************************
// Atomic type for pre C++11 GCC compilers that support the builtin '__sync' functions.

View File

@ -1015,7 +1015,7 @@ namespace etl
ETL_ASSERT_FAIL(ETL_ERROR(string_truncation));
#endif
#endif
return to_iterator(position);;
return to_iterator(position);
}
// Fills the string to the end?

View File

@ -138,7 +138,7 @@ namespace etl
typename etl::enable_if<etl::is_unsigned<T>::value, int>::type
countr_one(T value) ETL_NOEXCEPT
{
return etl::count_trailing_ones(value);;
return etl::count_trailing_ones(value);
}

View File

@ -147,7 +147,7 @@ namespace etl
//*********************************
void allocate()
{
pdesc_item->in_use = true;;
pdesc_item->in_use = true;
}
/// The pointer to the buffer descriptor.

View File

@ -76,7 +76,7 @@ namespace etl
typename etl::enable_if<etl::is_integral<TInteger>::value, etl::byte&>::type
operator <<=(etl::byte& b, TInteger shift) ETL_NOEXCEPT
{
return b = b << shift;;
return b = b << shift;
}
//*************************************************************************

View File

@ -606,7 +606,7 @@ namespace etl
i_element->~value_type();
storage.release(etl::addressof(*i_element));
refmap_t::erase(i_element);
ETL_DECREMENT_DEBUG_COUNT;;
ETL_DECREMENT_DEBUG_COUNT;
return 1;
}
}
@ -627,7 +627,7 @@ namespace etl
i_element->~value_type();
storage.release(etl::addressof(*i_element));
refmap_t::erase(i_element);
ETL_DECREMENT_DEBUG_COUNT;;
ETL_DECREMENT_DEBUG_COUNT;
return 1;
}
}

View File

@ -1165,7 +1165,7 @@ namespace etl
link_type* before = &this->start;
link_type* before_next = get_next(before);
link_type* terminal = &this->terminator;;
link_type* terminal = &this->terminator;
while ((before->etl_next != terminal) && (other_begin != other_terminal))
{

View File

@ -259,7 +259,7 @@ namespace etl
//*************************************************************************
bool contains_node(const link_type& search_link) const
{
return is_link_in_list(&search_link);;
return is_link_in_list(&search_link);
}
//*************************************************************************
@ -268,7 +268,7 @@ namespace etl
//*************************************************************************
bool contains_node(const link_type* search_link) const
{
return is_link_in_list(search_link);;
return is_link_in_list(search_link);
}
protected:

View File

@ -1839,7 +1839,7 @@ namespace etl
{
ETL_ASSERT(p_node_pool != ETL_NULLPTR, ETL_ERROR(list_no_pool));
p_node_pool->release_all();
ETL_RESET_DEBUG_COUNT;;
ETL_RESET_DEBUG_COUNT;
}
else
{

View File

@ -1490,7 +1490,7 @@ namespace etl
key_compare key_comp() const
{
return kcompare;
};
}
//*************************************************************************
/// How to compare two value elements.
@ -1498,7 +1498,7 @@ namespace etl
value_compare value_comp() const
{
return vcompare;
};
}
//*************************************************************************
/// Check if the map contains the key.

View File

@ -1478,7 +1478,7 @@ namespace etl
key_compare key_comp() const
{
return compare;
};
}
//*************************************************************************
/// How to compare two value elements.
@ -1486,7 +1486,7 @@ namespace etl
value_compare value_comp() const
{
return compare;
};
}
//*************************************************************************
/// Check if the set contains the key.

View File

@ -1231,7 +1231,7 @@ namespace etl
void reset_position(pointer pbuffer,
size_t position) ETL_NOEXCEPT
{
const size_t index = position >> etl::log2<Bits_Per_Element>::value;;
const size_t index = position >> etl::log2<Bits_Per_Element>::value;
const element_type bit = element_type(1) << (position & (Bits_Per_Element - 1));
pbuffer[index] &= ~bit;
@ -1454,7 +1454,7 @@ namespace etl
void flip_position(pointer pbuffer,
size_t position) ETL_NOEXCEPT
{
const size_t index = position >> etl::log2<Bits_Per_Element>::value;;
const size_t index = position >> etl::log2<Bits_Per_Element>::value;
const element_type bit = element_type(1) << (position & (Bits_Per_Element - 1));
pbuffer[index] ^= bit;

View File

@ -285,7 +285,7 @@ namespace etl
private:
void read(no_type8&) {};
void read(no_type8&) {}
};
//*************************************************************************
@ -311,8 +311,8 @@ namespace etl
private:
void read(no_type7&) {};
void read(no_type8&) {};
void read(no_type7&) {}
void read(no_type8&) {}
};
//*************************************************************************
@ -337,9 +337,9 @@ namespace etl
private:
void read(no_type6&) {};
void read(no_type7&) {};
void read(no_type8&) {};
void read(no_type6&) {}
void read(no_type7&) {}
void read(no_type8&) {}
};
//*************************************************************************
@ -363,10 +363,10 @@ namespace etl
private:
void read(no_type5&) {};
void read(no_type6&) {};
void read(no_type7&) {};
void read(no_type8&) {};
void read(no_type5&) {}
void read(no_type6&) {}
void read(no_type7&) {}
void read(no_type8&) {}
};
//*************************************************************************
@ -389,11 +389,11 @@ namespace etl
private:
void read(no_type4&) {};
void read(no_type5&) {};
void read(no_type6&) {};
void read(no_type7&) {};
void read(no_type8&) {};
void read(no_type4&) {}
void read(no_type5&) {}
void read(no_type6&) {}
void read(no_type7&) {}
void read(no_type8&) {}
};
//*************************************************************************
@ -415,12 +415,12 @@ namespace etl
private:
void read(no_type3&) {};
void read(no_type4&) {};
void read(no_type5&) {};
void read(no_type6&) {};
void read(no_type7&) {};
void read(no_type8&) {};
void read(no_type3&) {}
void read(no_type4&) {}
void read(no_type5&) {}
void read(no_type6&) {}
void read(no_type7&) {}
void read(no_type8&) {}
};
//*************************************************************************
@ -441,13 +441,13 @@ namespace etl
private:
void read(no_type2&) {};
void read(no_type3&) {};
void read(no_type4&) {};
void read(no_type5&) {};
void read(no_type6&) {};
void read(no_type7&) {};
void read(no_type8&) {};
void read(no_type2&) {}
void read(no_type3&) {}
void read(no_type4&) {}
void read(no_type5&) {}
void read(no_type6&) {}
void read(no_type7&) {}
void read(no_type8&) {}
};
//***************************************************************************

View File

@ -84,7 +84,7 @@ namespace private_variant
case 2: { visitor(etl::get<2>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -102,7 +102,7 @@ namespace private_variant
case 3: { visitor(etl::get<3>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -121,7 +121,7 @@ namespace private_variant
case 4: { visitor(etl::get<4>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -141,7 +141,7 @@ namespace private_variant
case 5: { visitor(etl::get<5>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -162,7 +162,7 @@ namespace private_variant
case 6: { visitor(etl::get<6>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -184,7 +184,7 @@ namespace private_variant
case 7: { visitor(etl::get<7>(the_variant)); break; }
default: break;
}
};
}
};
#if !defined(ETL_VARIANT_CPP11_MAX_8_TYPES)
//***************************************************************************
@ -207,7 +207,7 @@ namespace private_variant
case 8: { visitor(etl::get<8>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -231,7 +231,7 @@ namespace private_variant
case 9: { visitor(etl::get<9>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -256,7 +256,7 @@ namespace private_variant
case 10: { visitor(etl::get<10>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -282,7 +282,7 @@ namespace private_variant
case 11: { visitor(etl::get<11>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -309,7 +309,7 @@ namespace private_variant
case 12: { visitor(etl::get<12>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -337,7 +337,7 @@ namespace private_variant
case 13: { visitor(etl::get<13>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -366,7 +366,7 @@ namespace private_variant
case 14: { visitor(etl::get<14>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -396,7 +396,7 @@ namespace private_variant
case 15: { visitor(etl::get<15>(the_variant)); break; }
default: break;
}
};
}
};
#if !defined(ETL_VARIANT_CPP11_MAX_16_TYPES)
//***************************************************************************
@ -427,7 +427,7 @@ namespace private_variant
case 16: { visitor(etl::get<16>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -459,7 +459,7 @@ namespace private_variant
case 17: { visitor(etl::get<17>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -492,7 +492,7 @@ namespace private_variant
case 18: { visitor(etl::get<18>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -526,7 +526,7 @@ namespace private_variant
case 19: { visitor(etl::get<19>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -561,7 +561,7 @@ namespace private_variant
case 20: { visitor(etl::get<20>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -597,7 +597,7 @@ namespace private_variant
case 21: { visitor(etl::get<21>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -634,7 +634,7 @@ namespace private_variant
case 22: { visitor(etl::get<22>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -672,7 +672,7 @@ namespace private_variant
case 23: { visitor(etl::get<23>(the_variant)); break; }
default: break;
}
};
}
};
#if !defined(ETL_VARIANT_CPP11_MAX_24_TYPES)
//***************************************************************************
@ -711,7 +711,7 @@ namespace private_variant
case 24: { visitor(etl::get<24>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -751,7 +751,7 @@ namespace private_variant
case 25: { visitor(etl::get<25>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -792,7 +792,7 @@ namespace private_variant
case 26: { visitor(etl::get<26>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -834,7 +834,7 @@ namespace private_variant
case 27: { visitor(etl::get<27>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -877,7 +877,7 @@ namespace private_variant
case 28: { visitor(etl::get<28>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -921,7 +921,7 @@ namespace private_variant
case 29: { visitor(etl::get<29>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -966,7 +966,7 @@ namespace private_variant
case 30: { visitor(etl::get<30>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -1012,7 +1012,7 @@ namespace private_variant
case 31: { visitor(etl::get<31>(the_variant)); break; }
default: break;
}
};
}
};
#endif
#endif

View File

@ -84,7 +84,7 @@ namespace private_variant
case 2: { visitor.visit(etl::get<2>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -102,7 +102,7 @@ namespace private_variant
case 3: { visitor.visit(etl::get<3>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -121,7 +121,7 @@ namespace private_variant
case 4: { visitor.visit(etl::get<4>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -141,7 +141,7 @@ namespace private_variant
case 5: { visitor.visit(etl::get<5>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -162,7 +162,7 @@ namespace private_variant
case 6: { visitor.visit(etl::get<6>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -184,7 +184,7 @@ namespace private_variant
case 7: { visitor.visit(etl::get<7>(the_variant)); break; }
default: break;
}
};
}
};
#if !defined(ETL_VARIANT_CPP11_MAX_8_TYPES)
//***************************************************************************
@ -207,7 +207,7 @@ namespace private_variant
case 8: { visitor.visit(etl::get<8>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -231,7 +231,7 @@ namespace private_variant
case 9: { visitor.visit(etl::get<9>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -256,7 +256,7 @@ namespace private_variant
case 10: { visitor.visit(etl::get<10>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -282,7 +282,7 @@ namespace private_variant
case 11: { visitor.visit(etl::get<11>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -309,7 +309,7 @@ namespace private_variant
case 12: { visitor.visit(etl::get<12>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -337,7 +337,7 @@ namespace private_variant
case 13: { visitor.visit(etl::get<13>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -366,7 +366,7 @@ namespace private_variant
case 14: { visitor.visit(etl::get<14>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -396,7 +396,7 @@ namespace private_variant
case 15: { visitor.visit(etl::get<15>(the_variant)); break; }
default: break;
}
};
}
};
#if !defined(ETL_VARIANT_CPP11_MAX_16_TYPES)
//***************************************************************************
@ -427,7 +427,7 @@ namespace private_variant
case 16: { visitor.visit(etl::get<16>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -459,7 +459,7 @@ namespace private_variant
case 17: { visitor.visit(etl::get<17>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -492,7 +492,7 @@ namespace private_variant
case 18: { visitor.visit(etl::get<18>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -526,7 +526,7 @@ namespace private_variant
case 19: { visitor.visit(etl::get<19>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -561,7 +561,7 @@ namespace private_variant
case 20: { visitor.visit(etl::get<20>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -597,7 +597,7 @@ namespace private_variant
case 21: { visitor.visit(etl::get<21>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -634,7 +634,7 @@ namespace private_variant
case 22: { visitor.visit(etl::get<22>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -672,7 +672,7 @@ namespace private_variant
case 23: { visitor.visit(etl::get<23>(the_variant)); break; }
default: break;
}
};
}
};
#if !defined(ETL_VARIANT_CPP11_MAX_24_TYPES)
//***************************************************************************
@ -711,7 +711,7 @@ namespace private_variant
case 24: { visitor.visit(etl::get<24>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -751,7 +751,7 @@ namespace private_variant
case 25: { visitor.visit(etl::get<25>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -792,7 +792,7 @@ namespace private_variant
case 26: { visitor.visit(etl::get<26>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -834,7 +834,7 @@ namespace private_variant
case 27: { visitor.visit(etl::get<27>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -877,7 +877,7 @@ namespace private_variant
case 28: { visitor.visit(etl::get<28>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -921,7 +921,7 @@ namespace private_variant
case 29: { visitor.visit(etl::get<29>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -966,7 +966,7 @@ namespace private_variant
case 30: { visitor.visit(etl::get<30>(the_variant)); break; }
default: break;
}
};
}
};
//***************************************************************************
@ -1012,7 +1012,7 @@ namespace private_variant
case 31: { visitor.visit(etl::get<31>(the_variant)); break; }
default: break;
}
};
}
};
#endif
#endif

View File

@ -227,7 +227,7 @@ namespace etl
//*************************************************************************
bool full_implementation() const
{
return (current_size == Max_Size);;
return (current_size == Max_Size);
}
//*************************************************************************
@ -781,7 +781,7 @@ namespace etl
//*************************************************************************
reference front_implementation()
{
return p_buffer[this->read_index];;
return p_buffer[this->read_index];
}
//*************************************************************************
@ -789,7 +789,7 @@ namespace etl
//*************************************************************************
const_reference front_implementation() const
{
return p_buffer[this->read_index];;
return p_buffer[this->read_index];
}
// Disable copy construction and assignment.

View File

@ -406,7 +406,7 @@ namespace etl
//*************************************************************************
bool pop_from_unlocked(reference value)
{
return pop_implementation(value);;
return pop_implementation(value);
}
//*************************************************************************

View File

@ -73,7 +73,7 @@ namespace etl
{
public:
virtual ~ireference_counter() {};
virtual ~ireference_counter() {}
virtual void set_reference_count(int32_t value) = 0;
virtual void increment_reference_count() = 0;
ETL_NODISCARD virtual int32_t decrement_reference_count() = 0;

View File

@ -68,7 +68,7 @@ namespace etl
//*****************************************************************
TOutput operator ()(TInput value) const
{
return TOutput(((value - input_min_value) * multiplier)) + output_min_value;;
return TOutput(((value - input_min_value) * multiplier)) + output_min_value;
}
private:

View File

@ -1355,7 +1355,7 @@ namespace etl
key_compare key_comp() const
{
return compare;
};
}
//*************************************************************************
/// How to compare two value elements.
@ -1363,7 +1363,7 @@ namespace etl
value_compare value_comp() const
{
return compare;
};
}
//*************************************************************************
/// Check if the set contains the key.

View File

@ -844,7 +844,7 @@ namespace etl
typename etl::enable_if<etl::is_integral<TValue>::value, etl::to_arithmetic_result<TValue> >::type
to_arithmetic(const etl::ibasic_string<TChar>& str, const etl::radix::value_type radix)
{
return etl::to_arithmetic<TValue, TChar>(etl::basic_string_view<TChar>(str), radix);;
return etl::to_arithmetic<TValue, TChar>(etl::basic_string_view<TChar>(str), radix);
}
//***************************************************************************
@ -856,7 +856,7 @@ namespace etl
typename etl::enable_if<etl::is_integral<TValue>::value, etl::to_arithmetic_result<TValue> >::type
to_arithmetic(const etl::ibasic_string<TChar>& str)
{
return etl::to_arithmetic<TValue, TChar>(etl::basic_string_view<TChar>(str), etl::radix::decimal);;
return etl::to_arithmetic<TValue, TChar>(etl::basic_string_view<TChar>(str), etl::radix::decimal);
}
//***************************************************************************
@ -868,7 +868,7 @@ namespace etl
typename etl::enable_if<etl::is_integral<TValue>::value, etl::to_arithmetic_result<TValue> >::type
to_arithmetic(const etl::ibasic_string<TChar>& str, const typename etl::private_basic_format_spec::base_spec& spec)
{
return etl::to_arithmetic<TValue, TChar>(etl::basic_string_view<TChar>(str), spec);;
return etl::to_arithmetic<TValue, TChar>(etl::basic_string_view<TChar>(str), spec);
}
//***************************************************************************

View File

@ -460,12 +460,14 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
PRIVATE
-fno-omit-frame-pointer
-fno-common
# -pedantic-errors
-Wall
-Wextra
-Werror
-Wfloat-equal
-Wshadow
-Wnull-dereference
-Wextra-semi
-g
)
endif ()
@ -475,12 +477,16 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
PRIVATE
-fno-omit-frame-pointer
-fno-common
# -pedantic-errors
-Wall
-Wextra
-Werror
-Wfloat-equal
-Wshadow
-Wnull-dereference
-Wextra-semi
-Wextra-semi-stmt
-Wc++11-extra-semi
-g
)
endif ()

View File

@ -42,7 +42,7 @@ SOFTWARE.
#define ETL_IDEQUE_REPAIR_ENABLE
#define ETL_ICIRCULAR_BUFFER_REPAIR_ENABLE
#define ETL_IN_UNIT_TEST
#define ETL_DEBUG_COUNT
//#define ETL_DEBUG_COUNT
#define ETL_ARRAY_VIEW_IS_MUTABLE
#define ETL_MESSAGE_TIMER_USE_ATOMIC_LOCK

View File

@ -158,7 +158,7 @@ void MurmurHash3_x86_32(const void * key, int len, uint32_t seed, void * out)
case 2: k1 ^= tail[1] << 8U;
case 1: k1 ^= tail[0];
k1 *= c1; k1 = ROTL32(k1, 15); k1 *= c2; h1 ^= k1;
};
}
//----------
// finalization
@ -251,7 +251,7 @@ void MurmurHash3_x86_128(const void * key, const int len,
case 2: k1 ^= tail[1] << 8U;
case 1: k1 ^= tail[0] << 0U;
k1 *= c1; k1 = ROTL32(k1, 15); k1 *= c2; h1 ^= k1;
};
}
//----------
// finalization
@ -337,7 +337,7 @@ void MurmurHash3_x64_128(const void * key, const int len,
case 2: k1 ^= ((uint64_t)tail[1]) << 8U;
case 1: k1 ^= ((uint64_t)tail[0]) << 0U;
k1 *= c1; k1 = ROTL64(k1, 31); k1 *= c2; h1 ^= k1;
};
}
//----------
// finalization

View File

@ -35,10 +35,24 @@ set_target_properties(tests PROPERTIES
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS ON
)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(tests
PRIVATE
-fsyntax-only
-pedantic-errors
-Wextra-semi
)
endif ()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(tests
PRIVATE
-fsyntax-only
-pedantic-errors
-Wextra-semi
-Wextra-semi-stmt
-Wc++11-extra-semi
)
endif ()
if (ETL_CXX_STANDARD MATCHES "98")
message(STATUS "Compiling for C++98")

View File

@ -2504,5 +2504,5 @@ namespace
CHECK_EQUAL(0, result5);
CHECK_EQUAL(10, result6);
}
};
}
}

View File

@ -284,5 +284,5 @@ namespace
c.destroy();
CHECK_FALSE(c.has_value());
}
};
}
}

View File

@ -920,5 +920,5 @@ namespace
#endif
}
#endif
};
}
}

View File

@ -767,5 +767,5 @@ namespace
bool isEqual = std::equal(filldata.begin(), filldata.end(), view.begin());
CHECK(isEqual);
}
};
}
}

View File

@ -567,7 +567,7 @@ namespace
CHECK_EQUAL(compare_hash, hash);
}
};
}
}
#if defined(ETL_COMPILER_CLANG)

View File

@ -464,8 +464,8 @@ namespace
//*************************************************************************
TEST(test_atomic_operator_fetch_and)
{
std::atomic<int> compare(0xFFFFFFFFUL);
etl::atomic<int> test(0xFFFFFFFFUL);
std::atomic<int> compare(int(0xFFFFFFFFUL));
etl::atomic<int> test(int(0xFFFFFFFFUL));
CHECK_EQUAL(compare.fetch_and(0x55AA55AAUL), test.fetch_and(0x55AA55AAUL));
}
@ -766,5 +766,5 @@ namespace
CHECK_EQUAL(0, atomic_value.load());
}
#endif
};
}
}

View File

@ -774,6 +774,6 @@ namespace
CHECK_TRUE(b64.error());
#endif
}
};
}
}

View File

@ -744,6 +744,6 @@ namespace
CHECK_TRUE(b64.overflow());
#endif
}
};
}
}

View File

@ -771,6 +771,6 @@ namespace
CHECK_TRUE(b64.error());
#endif
}
};
}
}

View File

@ -740,6 +740,6 @@ namespace
CHECK_THROW((b64.encode(input_data.data(), 10)), etl::base64_overflow);
CHECK_TRUE(b64.overflow());
}
};
}
}

View File

@ -786,6 +786,6 @@ namespace
CHECK_TRUE(b64.error());
#endif
}
};
}
}

View File

@ -786,5 +786,5 @@ namespace
CHECK_TRUE(b64.error());
#endif
}
};
}
}

View File

@ -738,6 +738,6 @@ namespace
CHECK_THROW((b64.encode(input_data.data(), 10)), etl::base64_overflow);
CHECK_TRUE(b64.overflow());
}
};
}
}

View File

@ -738,6 +738,6 @@ namespace
CHECK_THROW((b64.encode(input_data.data(), 10)), etl::base64_overflow);
CHECK_TRUE(b64.overflow());
}
};
}
}

View File

@ -786,6 +786,6 @@ namespace
CHECK_TRUE(b64.error());
#endif
}
};
}
}

View File

@ -786,6 +786,6 @@ namespace
CHECK_TRUE(b64.error());
#endif
}
};
}
}

View File

@ -738,6 +738,6 @@ namespace
CHECK_THROW((b64.encode(input_data.data(), 10)), etl::base64_overflow);
CHECK_TRUE(b64.overflow());
}
};
}
}

View File

@ -738,6 +738,6 @@ namespace
CHECK_THROW((b64.encode(input_data.data(), 10)), etl::base64_overflow);
CHECK_TRUE(b64.overflow());
}
};
}
}

View File

@ -3052,7 +3052,7 @@ namespace
CHECK_ARRAY_EQUAL(expected.data(), output.data(), expected.size());
}
};
}
}
#include "etl/private/diagnostic_pop.h"

View File

@ -392,7 +392,7 @@ namespace
}
}
#endif
};
}
}
#endif // ETL_HAS_ATOMIC

View File

@ -1563,7 +1563,7 @@ namespace
CHECK_EQUAL(test_bit_width(uint64_t(0xAU)), sizeof(temp));
}
#endif
};
}
}
#include "etl/private/diagnostic_pop.h"

View File

@ -1072,7 +1072,7 @@ namespace
CHECK(bit_stream.get(rd));
CHECK_CLOSE(f, rd, 0.1f);
}
};
}
}
#include "etl/private/diagnostic_pop.h"

View File

@ -1504,7 +1504,7 @@ namespace
CHECK_EQUAL(object2.i, result2.i);
CHECK_EQUAL(object2.c, result2.c);
}
};
}
}
#include "etl/private/diagnostic_pop.h"

View File

@ -1192,7 +1192,7 @@ namespace
CHECK_EQUAL(object2.i, result2.i);
CHECK_EQUAL(object2.c, result2.c);
}
};
}
}
#include "etl/private/diagnostic_pop.h"

View File

@ -814,7 +814,7 @@ namespace
CHECK_EQUAL(bit_stream.empty(), false);
CHECK_EQUAL(bit_stream.full(), true);
}
};
}
}
#include "etl/private/diagnostic_pop.h"

View File

@ -902,7 +902,7 @@ namespace
CHECK_EQUAL(bit_stream.empty(), false);
CHECK_EQUAL(bit_stream.full(), true);
}
};
}
}
#include "etl/private/diagnostic_pop.h"

View File

@ -1532,5 +1532,5 @@ namespace
etl::bitset<0> shiftbits = bits << 1; // No exception.
}
};
}
}

View File

@ -235,5 +235,5 @@ namespace
CHECK(data2 != data3); // bitset (M) != bitset_ext (S)
CHECK(data3 != data2); // bitset_ext (S) != bitset (M)
}
};
}
}

View File

@ -2709,5 +2709,5 @@ namespace
CHECK_EQUAL(32, ETL_OR_STD17::size(b));
}
};
}
}

View File

@ -2823,5 +2823,5 @@ namespace
CHECK_EQUAL(32, ETL_OR_STD17::size(b));
}
};
}
}

View File

@ -2459,5 +2459,5 @@ namespace
CHECK_EQUAL(32, ETL_OR_STD17::size(b));
}
};
}
}

View File

@ -2627,5 +2627,5 @@ namespace
CHECK_EQUAL(32, ETL_OR_STD17::size(b));
}
};
}
}

View File

@ -260,6 +260,6 @@ namespace
CHECK(!any_exist);
}
};
}
}

View File

@ -436,5 +436,5 @@ namespace
CHECK(bl1 != bl4);
CHECK(!(bl1 == bl4));
}
};
}
}

View File

@ -173,6 +173,6 @@ namespace
CHECK_EQUAL(hash1, hash2);
CHECK_EQUAL(hash1, hash3);
}
};
}
}

View File

@ -403,5 +403,5 @@ namespace
t2.join();
}
#endif
};
}
}

View File

@ -1348,7 +1348,7 @@ namespace
CHECK_FALSE(result.has_value());
CHECK_TRUE(r.empty());
}
};
}
}
#include "etl/private/diagnostic_pop.h"

View File

@ -329,5 +329,5 @@ namespace
CHECK(!member2_called);
CHECK(unhandled_called);
}
};
}
}

View File

@ -945,5 +945,5 @@ namespace
//CHECK_ARRAY_EQUAL(compare2.data(), free_tick_list1.data(), min(compare2.size(), free_tick_list1.size()));
}
#endif
};
}
}

View File

@ -951,7 +951,7 @@ namespace
//CHECK_ARRAY_EQUAL(compare2.data(), free_tick_list1.data(), min(compare2.size(), free_tick_list1.size()));
}
#endif
};
}
}
#endif

View File

@ -1264,5 +1264,5 @@ namespace
CHECK_EQUAL(0U, threadLock.lock_count);
}
#endif
};
}
}

View File

@ -996,5 +996,5 @@ namespace
// Check the
CHECK_EQUAL(0U, ScopedGuard::guard_count);
}
};
}
}

View File

@ -1146,5 +1146,5 @@ namespace
CHECK_EQUAL(0U, threadLock.lock_count);
}
#endif
};
}
}

View File

@ -750,7 +750,7 @@ namespace
CHECK(int_type(char_traits::eof()) != char_traits::not_eof(char_traits::eof()));
CHECK(int_type(char_traits::eof() + 1) == char_traits::not_eof(char_traits::eof() + 1));
}
};
}
}
#include "etl/private/diagnostic_pop.h"

View File

@ -181,6 +181,6 @@ namespace
uint32_t hash3 = etl::checksum<uint32_t>(data3.rbegin(), data3.rend());
CHECK_EQUAL(int(hash1), int(hash3));
}
};
}
}

View File

@ -171,5 +171,5 @@ namespace
CHECK_EQUAL(sys_clock_count, scaled_steady_lock_count);
}
};
}
}

View File

@ -323,5 +323,5 @@ namespace
CHECK_EQUAL(256U, hashes.size());
}
#endif
};
}
}

View File

@ -1138,5 +1138,5 @@ namespace
#endif
}
#endif
};
}
}

View File

@ -285,5 +285,5 @@ namespace
CHECK_EQUAL(0, time.fractional_width);
CHECK_TRUE((std::is_same<duration_type, Chrono::hh_mm_ss<duration_type>::precision>::value));
}
};
}
}

View File

@ -84,5 +84,5 @@ namespace
CHECK_TRUE(etl::chrono::microseconds(1000) == 1000_microseconds);
CHECK_TRUE(etl::chrono::nanoseconds(10000) == 10000_nanoseconds);
}
};
}
}

View File

@ -352,5 +352,5 @@ namespace
CHECK_EQUAL(11U, static_cast<unsigned>(Chrono::November));
CHECK_EQUAL(12U, static_cast<unsigned>(Chrono::December));
}
};
}
}

View File

@ -210,6 +210,5 @@ namespace
CHECK_EQUAL(Chrono::December, md_max.month());
CHECK_EQUAL(Chrono::day{31}, md_max.day());
}
};
}
}

View File

@ -126,5 +126,5 @@ namespace
(void)std::unique(hashes.begin(), hashes.end());
}
#endif
};
}
}

View File

@ -120,5 +120,5 @@ namespace
CHECK_EQUAL(256U, hashes.size());
}
#endif
};
}
}

View File

@ -121,5 +121,5 @@ namespace
CHECK_EQUAL(256U, hashes.size());
}
#endif
};
}
}

View File

@ -281,5 +281,5 @@ namespace
CHECK_EQUAL(etl::chrono::May, ymdl5.month());
CHECK_EQUAL(etl::chrono::weekday_last(etl::chrono::Friday).weekday().c_encoding(), ymdl5.weekday().c_encoding());
}
};
}
}

View File

@ -358,5 +358,5 @@ namespace
CHECK_EQUAL(expected, actual);
}
};
}
}

View File

@ -383,5 +383,5 @@ namespace
CHECK_EQUAL(256U, hashes.size());
}
#endif
};
}
}

View File

@ -159,5 +159,5 @@ namespace
(void)std::unique(hashes.begin(), hashes.end());
}
#endif
};
}
}

View File

@ -131,5 +131,5 @@ namespace
(void)std::unique(hashes.begin(), hashes.end());
}
#endif
};
}
}

View File

@ -313,5 +313,5 @@ namespace
CHECK_EQUAL(65535U, hashes.size());
}
#endif
};
}
}

View File

@ -144,5 +144,5 @@ namespace
CHECK_TRUE(ym1 != ym2); // Different year
CHECK_TRUE(ym1 != ym3); // Different month
}
};
}
}

View File

@ -225,5 +225,5 @@ namespace
CHECK_TRUE(ym1 != ym3); // Different month
CHECK_TRUE(ym1 != ym4); // Different day
}
};
}
}

View File

@ -195,5 +195,5 @@ namespace
CHECK_EQUAL(11016, sd.time_since_epoch().count());
}
};
}
}

View File

@ -150,5 +150,5 @@ namespace
CHECK_TRUE(ym1 != ym3); // Different month
CHECK_TRUE(ym1 != ym4); // Different day
}
};
}
}

View File

@ -103,5 +103,5 @@ namespace
CHECK_TRUE(ym1 != ym3); // Different month
CHECK_TRUE(ym1 != ym4); // Different day
}
};
}
}

View File

@ -997,7 +997,7 @@ namespace
using CB = etl::circular_buffer<int, SIZE>;
std::vector<int> input = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
CB data(input.begin(), input.end());;
CB data(input.begin(), input.end());
char buffer[sizeof(CB)];
@ -1034,7 +1034,7 @@ namespace
using ICB = etl::icircular_buffer<int>;
std::vector<int> input = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
CB data(input.begin(), input.end());;
CB data(input.begin(), input.end());
char buffer[sizeof(CB)];
@ -1063,6 +1063,5 @@ namespace
CHECK(!is_equal);
}
};
}
}

View File

@ -1096,5 +1096,5 @@ namespace
CHECK(data1 != data2);
}
};
}
}

View File

@ -699,5 +699,5 @@ namespace
CHECK(ci1 != ci3);
CHECK(ci3 != ci1);
}
};
}
}

View File

@ -187,5 +187,5 @@ namespace
//c.bind(1, 2, 3); // Argument count mismatch
//c.bind(1, std::string()); // Argument is not convertible
}
};
}
}

View File

@ -158,7 +158,7 @@ namespace
static constexpr int result = c5();
CHECK_EQUAL(23, result);
}
};
}
}
#endif

View File

@ -191,5 +191,5 @@ namespace
CHECK_EQUAL(CompareInt::Greater, cmp_test_greater);
CHECK_EQUAL(CompareInt::Equal, cmp_test_equal);
}
};
}
}

View File

@ -1152,7 +1152,7 @@ namespace
static const bool compareAB1 = compare(value_type{ Key{ 'A' }, 0 }, value_type{ Key{ 'B' }, 0 });
static const bool compareAB2 = compare(value_type{ Key{ 'A' }, 0 }, Key{ 'B' });
static const bool compareAB3 = compare(Key{ 'A' }, value_type{ Key{ 'B' }, 0 });;
static const bool compareAB3 = compare(Key{ 'A' }, value_type{ Key{ 'B' }, 0 });
#ifdef TEST_GREATER_THAN
CHECK_FALSE(compareAA1);
@ -1197,7 +1197,7 @@ namespace
static const bool compareAB1 = compare(value_type{ 'A', 0 }, value_type{ 'B', 0 });
static const bool compareAB2 = compare(value_type{ 'A', 0 }, 'B');
static const bool compareAB3 = compare('A', value_type{ 'B', 0 });;
static const bool compareAB3 = compare('A', value_type{ 'B', 0 });
#ifdef TEST_GREATER_THAN
CHECK_FALSE(compareAA1);
@ -1574,5 +1574,5 @@ namespace
CHECK_TRUE(greater_than_equal11);
#endif
}
};
}
}

View File

@ -1154,7 +1154,7 @@ namespace
static constexpr bool compareAB1 = compare(value_type{ Key{ 'A' }, 0 }, value_type{ Key{ 'B' }, 0 });
static constexpr bool compareAB2 = compare(value_type{ Key{ 'A' }, 0 }, Key{ 'B' });
static constexpr bool compareAB3 = compare(Key{ 'A' }, value_type{ Key{ 'B' }, 0 });;
static constexpr bool compareAB3 = compare(Key{ 'A' }, value_type{ Key{ 'B' }, 0 });
#ifdef TEST_GREATER_THAN
CHECK_FALSE(compareAA1);
@ -1199,7 +1199,7 @@ namespace
static constexpr bool compareAB1 = compare(value_type{ 'A', 0 }, value_type{ 'B', 0 });
static constexpr bool compareAB2 = compare(value_type{ 'A', 0 }, 'B');
static constexpr bool compareAB3 = compare('A', value_type{ 'B', 0 });;
static constexpr bool compareAB3 = compare('A', value_type{ 'B', 0 });
#ifdef TEST_GREATER_THAN
CHECK_FALSE(compareAA1);
@ -1576,7 +1576,7 @@ namespace
CHECK_TRUE(greater_than_equal11);
#endif
}
};
}
}
#endif

View File

@ -1236,7 +1236,7 @@ namespace
static const bool compareAB1 = compare(value_type{ Key{ 'A' }, 0 }, value_type{ Key{ 'B' }, 0 });
static const bool compareAB2 = compare(value_type{ Key{ 'A' }, 0 }, Key{ 'B' });
static const bool compareAB3 = compare(Key{ 'A' }, value_type{ Key{ 'B' }, 0 });;
static const bool compareAB3 = compare(Key{ 'A' }, value_type{ Key{ 'B' }, 0 });
#ifdef TEST_GREATER_THAN
CHECK_FALSE(compareAA1);
@ -1281,7 +1281,7 @@ namespace
static const bool compareAB1 = compare(value_type{ 'A', 0 }, value_type{ 'B', 0 });
static const bool compareAB2 = compare(value_type{ 'A', 0 }, 'B');
static const bool compareAB3 = compare('A', value_type{ 'B', 0 });;
static const bool compareAB3 = compare('A', value_type{ 'B', 0 });
#ifdef TEST_GREATER_THAN
CHECK_FALSE(compareAA1);
@ -1709,5 +1709,5 @@ namespace
CHECK_TRUE(greater_than_equal11);
#endif
}
};
}
}

Some files were not shown because too many files have changed in this diff Show More