diff --git a/include/etl/atomic/atomic_gcc_sync.h b/include/etl/atomic/atomic_gcc_sync.h index 30691900..337c375e 100644 --- a/include/etl/atomic/atomic_gcc_sync.h +++ b/include/etl/atomic/atomic_gcc_sync.h @@ -41,10 +41,6 @@ SOFTWARE. // Select the amtomic builtins based on the version of the GCC compiler. #if defined(ETL_COMPILER_GCC) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wunused-parameter" - #pragma GCC diagnostic ignored "-Wunused-value" - #if ETL_COMPILER_FULL_VERSION >= 40700 #define ETL_USE_ATOMIC_BUILTINS #else @@ -68,7 +64,6 @@ namespace etl #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); - //*************************************************************************** // Atomic type for pre C++11 GCC compilers that support the builtin '__atomic' functions. // Only integral and pointer types are supported. @@ -849,6 +844,7 @@ namespace etl // Store void store(T v, etl::memory_order order = etl::memory_order_seq_cst) { + (void)order; ETL_BUILTIN_LOCK; value = v; ETL_BUILTIN_UNLOCK; @@ -856,6 +852,7 @@ namespace etl void store(T v, etl::memory_order order = etl::memory_order_seq_cst) volatile { + (void)order; ETL_BUILTIN_LOCK; value = v; ETL_BUILTIN_UNLOCK; @@ -864,6 +861,7 @@ namespace etl // Load T load(etl::memory_order order = etl::memory_order_seq_cst) const volatile { + (void)order; ETL_BUILTIN_LOCK; T result = value; ETL_BUILTIN_UNLOCK; @@ -874,6 +872,7 @@ namespace etl // Load T load(etl::memory_order order = etl::memory_order_seq_cst) const { + (void)order; ETL_BUILTIN_LOCK; T result = value; ETL_BUILTIN_UNLOCK; @@ -884,6 +883,7 @@ namespace etl // Exchange T exchange(T v, etl::memory_order order = etl::memory_order_seq_cst) { + (void)order; ETL_BUILTIN_LOCK; T result = value; value = v; @@ -894,6 +894,7 @@ namespace etl T exchange(T v, etl::memory_order order = etl::memory_order_seq_cst) volatile { + (void)order; ETL_BUILTIN_LOCK; T result = value; value = v; @@ -907,6 +908,7 @@ namespace etl { bool result; + (void)order; ETL_BUILTIN_LOCK; if (memcmp(&value, &expected, sizeof(T)) == 0) { @@ -926,6 +928,7 @@ namespace etl { bool result; + (void)order; ETL_BUILTIN_LOCK; if (memcmp(&value, &expected, sizeof(T)) == 0) { @@ -943,32 +946,42 @@ namespace etl bool compare_exchange_weak(T& expected, T desired, etl::memory_order success, etl::memory_order failure) { + (void)success; + (void)failure; return compare_exchange_weak(expected, desired); } bool compare_exchange_weak(T& expected, T desired, etl::memory_order success, etl::memory_order failure) volatile { + (void)success; + (void)failure; return compare_exchange_weak(expected, desired); } // Compare exchange strong bool compare_exchange_strong(T& expected, T desired, etl::memory_order order = etl::memory_order_seq_cst) { + (void)order; return compare_exchange_weak(expected, desired); } bool compare_exchange_strong(T& expected, T desired, etl::memory_order order = etl::memory_order_seq_cst) volatile { + (void)order; return compare_exchange_weak(expected, desired); } bool compare_exchange_strong(T& expected, T desired, etl::memory_order success, etl::memory_order failure) { + (void)success; + (void)failure; return compare_exchange_weak(expected, desired); } bool compare_exchange_strong(T& expected, T desired, etl::memory_order success, etl::memory_order failure) volatile { + (void)success; + (void)failure; return compare_exchange_weak(expected, desired); } @@ -2206,8 +2219,4 @@ namespace etl typedef etl::atomic atomic_uintmax_t; } -#if defined(ETL_COMPILER_GCC) -#pragma GCC diagnostic pop -#endif - #endif diff --git a/include/etl/basic_string.h b/include/etl/basic_string.h index 72df2ad6..d1fee188 100644 --- a/include/etl/basic_string.h +++ b/include/etl/basic_string.h @@ -53,11 +53,6 @@ SOFTWARE. #include "binary.h" #include "flags.h" -#ifdef ETL_COMPILER_GCC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" -#endif - #include "private/minmax_push.h" //***************************************************************************** @@ -2630,8 +2625,4 @@ namespace etl #include "private/minmax_pop.h" -#ifdef ETL_COMPILER_GCC -#pragma GCC diagnostic pop -#endif - #endif diff --git a/include/etl/basic_string_stream.h b/include/etl/basic_string_stream.h index a112e914..e91ee1fe 100644 --- a/include/etl/basic_string_stream.h +++ b/include/etl/basic_string_stream.h @@ -194,7 +194,7 @@ namespace etl //********************************* /// etl::left_spec from etl::left stream manipulator //********************************* - friend basic_string_stream& operator <<(basic_string_stream& ss, etl::private_basic_format_spec::left_spec spec) + friend basic_string_stream& operator <<(basic_string_stream& ss, etl::private_basic_format_spec::left_spec /*spec*/) { ss.spec.left(); return ss; @@ -203,7 +203,7 @@ namespace etl //********************************* /// etl::right_spec from etl::left stream manipulator //********************************* - friend basic_string_stream& operator <<(basic_string_stream& ss, etl::private_basic_format_spec::right_spec spec) + friend basic_string_stream& operator <<(basic_string_stream& ss, etl::private_basic_format_spec::right_spec /*spec*/) { ss.spec.right(); return ss; diff --git a/include/etl/debug_count.h b/include/etl/debug_count.h index 8fb49788..33ef568a 100644 --- a/include/etl/debug_count.h +++ b/include/etl/debug_count.h @@ -155,7 +155,7 @@ namespace etl } // namespace etl -static void swap(etl::debug_count& lhs, etl::debug_count& rhs) +inline void swap(etl::debug_count& lhs, etl::debug_count& rhs) { lhs.swap(rhs); } diff --git a/include/etl/flat_map.h b/include/etl/flat_map.h index 2947142e..29bd2cd4 100644 --- a/include/etl/flat_map.h +++ b/include/etl/flat_map.h @@ -358,7 +358,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, const_reference value) + iterator insert(const_iterator /*position*/, const_reference value) { return insert(value).first; } @@ -370,7 +370,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, rvalue_reference value) + iterator insert(const_iterator /*position*/, rvalue_reference value) { return insert(etl::move(value)).first; } diff --git a/include/etl/flat_multimap.h b/include/etl/flat_multimap.h index cf9e7d92..cd3686fb 100644 --- a/include/etl/flat_multimap.h +++ b/include/etl/flat_multimap.h @@ -301,7 +301,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, const value_type& value) + iterator insert(const_iterator /*position*/, const value_type& value) { return insert(value).first; } @@ -313,7 +313,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, rvalue_reference value) + iterator insert(const_iterator /*position*/, rvalue_reference value) { return insert(etl::move(value)).first; } diff --git a/include/etl/flat_multiset.h b/include/etl/flat_multiset.h index 20308349..7d3fdce2 100644 --- a/include/etl/flat_multiset.h +++ b/include/etl/flat_multiset.h @@ -272,7 +272,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, const_reference value) + iterator insert(const_iterator /*position*/, const_reference value) { return insert(value).first; } @@ -284,7 +284,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, rvalue_reference value) + iterator insert(const_iterator /*position*/, rvalue_reference value) { return insert(etl::move(value)).first; } diff --git a/include/etl/flat_set.h b/include/etl/flat_set.h index 75d89d01..05505df9 100644 --- a/include/etl/flat_set.h +++ b/include/etl/flat_set.h @@ -280,7 +280,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, const_reference value) + iterator insert(const_iterator /*position*/, const_reference value) { return insert(value).first; } @@ -292,7 +292,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, rvalue_reference value) + iterator insert(const_iterator /*position*/, rvalue_reference value) { return insert(etl::move(value)).first; } diff --git a/include/etl/forward_list.h b/include/etl/forward_list.h index b33cb029..a4b077c3 100644 --- a/include/etl/forward_list.h +++ b/include/etl/forward_list.h @@ -1499,7 +1499,6 @@ namespace etl else { node_t* p_last_node = &this->start_node; - node_t* p_rhs_node = rhs.start_node.next; // Add all of the elements. etl::iforward_list::iterator first = rhs.begin(); diff --git a/include/etl/generators/message_packet_generator.h b/include/etl/generators/message_packet_generator.h index ece44455..d02c58c4 100644 --- a/include/etl/generators/message_packet_generator.h +++ b/include/etl/generators/message_packet_generator.h @@ -484,7 +484,7 @@ namespace etl cog.outl("#else") cog.outl(" //********************************************") cog.outl(" template ") - cog.out(" explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet<") + cog.out(" explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet<") for n in range(1, int(Handlers)): cog.out("T%s, " % n) cog.outl("T%s> >::value &&" % int(Handlers)) @@ -759,7 +759,7 @@ namespace etl cog.outl("#else") cog.outl(" //********************************************") cog.outl(" template ") - cog.out(" explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet<") + cog.out(" explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet<") for t in range(1, n): cog.out("T%s, " % t) cog.outl("T%s> >::value &&" % n) diff --git a/include/etl/indirect_vector.h b/include/etl/indirect_vector.h index 03702aa2..73cf111d 100644 --- a/include/etl/indirect_vector.h +++ b/include/etl/indirect_vector.h @@ -40,11 +40,6 @@ SOFTWARE. #include "static_assert.h" #include "initializer_list.h" -#ifdef ETL_COMPILER_GCC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" -#endif - //***************************************************************************** ///\defgroup indirect_vector indirect_vector /// A indirect_vector with the capacity defined at compile time. Objects are allocated from a pool and stored as pointers. @@ -1568,9 +1563,5 @@ namespace etl }; } -#ifdef ETL_COMPILER_GCC -#pragma GCC diagnostic pop -#endif - #endif diff --git a/include/etl/message_packet.h b/include/etl/message_packet.h index 79192b48..3da882d1 100644 --- a/include/etl/message_packet.h +++ b/include/etl/message_packet.h @@ -393,7 +393,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value, int>::type = 0) : data() @@ -677,7 +677,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>::value, int>::type = 0) : data() @@ -959,7 +959,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>::value, int>::type = 0) : data() @@ -1239,7 +1239,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>::value, int>::type = 0) : data() @@ -1516,7 +1516,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>::value, int>::type = 0) : data() @@ -1788,7 +1788,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>::value, int>::type = 0) : data() @@ -2058,7 +2058,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value, int>::type = 0) : data() @@ -2326,7 +2326,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8, T9>::value, int>::type = 0) : data() @@ -2591,7 +2591,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7, T8>::value, int>::type = 0) : data() @@ -2851,7 +2851,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6, T7>::value, int>::type = 0) : data() @@ -3109,7 +3109,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5, T6>::value, int>::type = 0) : data() @@ -3365,7 +3365,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4, T5>::value, int>::type = 0) : data() @@ -3618,7 +3618,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3, T4>::value, int>::type = 0) : data() @@ -3866,7 +3866,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2, T3>::value, int>::type = 0) : data() @@ -4112,7 +4112,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1, T2>::value, int>::type = 0) : data() @@ -4356,7 +4356,7 @@ namespace etl #else //******************************************** template - explicit message_packet(const TMessage& msg, typename etl::enable_if::type, etl::message_packet >::value && + explicit message_packet(const TMessage& /*msg*/, typename etl::enable_if::type, etl::message_packet >::value && !etl::is_same::type, etl::imessage>::value && !etl::is_one_of::type, T1>::value, int>::type = 0) : data() diff --git a/include/etl/poly_span.h b/include/etl/poly_span.h index e36670da..6208cc6e 100644 --- a/include/etl/poly_span.h +++ b/include/etl/poly_span.h @@ -283,12 +283,11 @@ namespace etl /// Construct from iterator + size //************************************************************************* template - ETL_CONSTEXPR poly_span(const TIterator begin_, const TSize size_) ETL_NOEXCEPT + ETL_CONSTEXPR poly_span(const TIterator begin_, const TSize /*size_*/) ETL_NOEXCEPT : pbegin(etl::addressof(*begin_)) , element_size(sizeof(typename etl::iterator_traits::value_type)) { typedef typename etl::iterator_traits::value_type data_type; - typedef typename etl::iterator_traits::iterator_category iterator_category; ETL_STATIC_ASSERT((etl::is_same::iterator_category>::value), "Not a random access iterator"); ETL_STATIC_ASSERT((etl::is_base_of::value || etl::is_same::value), "TBase not a base of the data type"); @@ -298,7 +297,7 @@ namespace etl /// Construct from iterators //************************************************************************* template - ETL_CONSTEXPR poly_span(const TIterator begin_, const TIterator end_) + ETL_CONSTEXPR poly_span(const TIterator begin_, const TIterator /*end_*/) : pbegin(etl::addressof(*begin_)) , element_size(sizeof(typename etl::iterator_traits::value_type)) { @@ -600,7 +599,7 @@ namespace etl /// Construct from iterator + offset + element size /// extent_ is ignored. //************************************************************************* - ETL_CONSTEXPR poly_span(TBase* pbegin_, size_t offset_, size_t extent_, size_t element_size_) ETL_NOEXCEPT + ETL_CONSTEXPR poly_span(TBase* pbegin_, size_t offset_, size_t /*extent_*/, size_t element_size_) ETL_NOEXCEPT : pbegin(reinterpret_cast(reinterpret_cast(pbegin_) + (offset_ * element_size_))) , element_size(element_size_) { diff --git a/include/etl/private/diagnostic_pessimizing-move_push.h b/include/etl/private/diagnostic_pessimizing-move_push.h new file mode 100644 index 00000000..ef077649 --- /dev/null +++ b/include/etl/private/diagnostic_pessimizing-move_push.h @@ -0,0 +1,39 @@ +///\file + +/****************************************************************************** +The MIT License(MIT) + +Embedded Template Library. +https://github.com/ETLCPP/etl +https://www.etlcpp.com + +Copyright(c) 2022 John Wellbelove + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files(the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions : + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +******************************************************************************/ + +/* + * The header include guard has been intentionally omitted. + * This file is intended to evaluated multiple times by design. + */ + +#if defined(__clang__) || defined(__llvm__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpessimizing-move" +#endif diff --git a/include/etl/private/diagnostic_pop.h b/include/etl/private/diagnostic_pop.h new file mode 100644 index 00000000..a4621538 --- /dev/null +++ b/include/etl/private/diagnostic_pop.h @@ -0,0 +1,42 @@ +///\file + +/****************************************************************************** +The MIT License(MIT) + +Embedded Template Library. +https://github.com/ETLCPP/etl +https://www.etlcpp.com + +Copyright(c) 2022 John Wellbelove + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files(the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions : + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +******************************************************************************/ + +/* + * The header include guard has been intentionally omitted. + * This file is intended to evaluated multiple times by design. + */ + +#if defined(__GNUC__) && !defined(__clang__) && !defined(__llvm__) +#pragma GCC diagnostic pop +#endif + +#if defined(__clang__) || defined(__llvm__) +#pragma clang diagnostic pop +#endif diff --git a/include/etl/private/diagnostic_self_assign_overloaded_push.h b/include/etl/private/diagnostic_self_assign_overloaded_push.h new file mode 100644 index 00000000..5bdb2280 --- /dev/null +++ b/include/etl/private/diagnostic_self_assign_overloaded_push.h @@ -0,0 +1,39 @@ +///\file + +/****************************************************************************** +The MIT License(MIT) + +Embedded Template Library. +https://github.com/ETLCPP/etl +https://www.etlcpp.com + +Copyright(c) 2022 John Wellbelove + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files(the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions : + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +******************************************************************************/ + +/* + * The header include guard has been intentionally omitted. + * This file is intended to evaluated multiple times by design. + */ + +#if defined(__clang__) || defined(__llvm__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wself-assign-overloaded" +#endif diff --git a/include/etl/private/diagnostic_unused_function_push.h b/include/etl/private/diagnostic_unused_function_push.h new file mode 100644 index 00000000..16f62df0 --- /dev/null +++ b/include/etl/private/diagnostic_unused_function_push.h @@ -0,0 +1,44 @@ +///\file + +/****************************************************************************** +The MIT License(MIT) + +Embedded Template Library. +https://github.com/ETLCPP/etl +https://www.etlcpp.com + +Copyright(c) 2022 John Wellbelove + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files(the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions : + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +******************************************************************************/ + +/* + * The header include guard has been intentionally omitted. + * This file is intended to evaluated multiple times by design. + */ + +#if defined(__GNUC__) && !defined(__clang__) && !defined(__llvm__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" +#endif + +#if defined(__clang__) || defined(__llvm__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-function" +#endif diff --git a/include/etl/private/pvoidvector.h b/include/etl/private/pvoidvector.h index 03b33c49..243dde75 100644 --- a/include/etl/private/pvoidvector.h +++ b/include/etl/private/pvoidvector.h @@ -44,10 +44,6 @@ SOFTWARE. #include "../functional.h" #include "../iterator.h" -#ifdef ETL_COMPILER_GCC -#pragma GCC diagnostic ignored "-Wunused-variable" -#endif - #include "minmax_push.h" namespace etl diff --git a/include/etl/private/variant_variadic.h b/include/etl/private/variant_variadic.h index 4aebeb66..622eb92c 100644 --- a/include/etl/private/variant_variadic.h +++ b/include/etl/private/variant_variadic.h @@ -181,7 +181,7 @@ namespace etl template struct operation_type { - static void do_operation(int operation, char* pstorage, const char* pvalue) + static void do_operation(int operation, char* pstorage, const char* /*pvalue*/) { switch (operation) { diff --git a/include/etl/reference_flat_map.h b/include/etl/reference_flat_map.h index 1858e75e..7c4a41a0 100644 --- a/include/etl/reference_flat_map.h +++ b/include/etl/reference_flat_map.h @@ -588,7 +588,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, reference value) + iterator insert(const_iterator /*position*/, reference value) { return insert(value).first; } diff --git a/include/etl/reference_flat_multimap.h b/include/etl/reference_flat_multimap.h index 1810e249..b207635f 100644 --- a/include/etl/reference_flat_multimap.h +++ b/include/etl/reference_flat_multimap.h @@ -480,7 +480,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, const value_type& value) + iterator insert(const_iterator /*position*/, const value_type& value) { return insert(value).first; } diff --git a/include/etl/reference_flat_multiset.h b/include/etl/reference_flat_multiset.h index a59438f2..1ed5f8f4 100644 --- a/include/etl/reference_flat_multiset.h +++ b/include/etl/reference_flat_multiset.h @@ -473,7 +473,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, value_type& value) + iterator insert(const_iterator /*position*/, value_type& value) { return insert(value).first; } diff --git a/include/etl/reference_flat_set.h b/include/etl/reference_flat_set.h index 2e93db34..5a6126bd 100644 --- a/include/etl/reference_flat_set.h +++ b/include/etl/reference_flat_set.h @@ -456,7 +456,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, reference value) + iterator insert(const_iterator /*position*/, reference value) { return insert(value).first; } diff --git a/include/etl/set.h b/include/etl/set.h index e95f83af..0fac988c 100644 --- a/include/etl/set.h +++ b/include/etl/set.h @@ -2531,8 +2531,6 @@ namespace etl set(set&& other) : etl::iset(node_pool, MAX_SIZE) { - int count = 0; - if (this != &other) { typename etl::iset::iterator from = other.begin(); diff --git a/include/etl/span.h b/include/etl/span.h index bc6b4aa1..74adaa89 100644 --- a/include/etl/span.h +++ b/include/etl/span.h @@ -86,7 +86,7 @@ namespace etl /// Construct from pointer + size //************************************************************************* template - ETL_CONSTEXPR span(const TIterator begin_, const TSize size_) ETL_NOEXCEPT + ETL_CONSTEXPR span(const TIterator begin_, const TSize /*size_*/) ETL_NOEXCEPT : pbegin(etl::addressof(*begin_)) { } @@ -95,7 +95,7 @@ namespace etl /// Construct from iterators //************************************************************************* template - ETL_CONSTEXPR span(const TIterator begin_, const TIterator end_) + ETL_CONSTEXPR span(const TIterator begin_, const TIterator /*end_*/) : pbegin(etl::addressof(*begin_)) { } diff --git a/include/etl/state_chart.h b/include/etl/state_chart.h index 66b6393f..8ef23e42 100644 --- a/include/etl/state_chart.h +++ b/include/etl/state_chart.h @@ -808,13 +808,13 @@ namespace etl } //************************************************************************* - const transition* const transition_table_end() const + const transition* transition_table_end() const { return transition_table_begin + transition_table_size; } //************************************************************************* - const state* const state_table_end() const + const state* state_table_end() const { return state_table_begin + state_table_size; } @@ -1058,13 +1058,13 @@ namespace etl } //************************************************************************* - const transition* const transition_table_end() const + const transition* transition_table_end() const { return transition_table_begin + transition_table_size; } //************************************************************************* - const state* const state_table_end() const + const state* state_table_end() const { return state_table_begin + state_table_size; } diff --git a/include/etl/type_lookup.h b/include/etl/type_lookup.h index 1cae9a94..94991ca2 100644 --- a/include/etl/type_lookup.h +++ b/include/etl/type_lookup.h @@ -279,22 +279,22 @@ namespace etl enum { value = - (unsigned int) etl::is_same::value ? T1::ID : - (unsigned int) etl::is_same::value ? T2::ID : - (unsigned int) etl::is_same::value ? T3::ID : - (unsigned int) etl::is_same::value ? T4::ID : - (unsigned int) etl::is_same::value ? T5::ID : - (unsigned int) etl::is_same::value ? T6::ID : - (unsigned int) etl::is_same::value ? T7::ID : - (unsigned int) etl::is_same::value ? T8::ID : - (unsigned int) etl::is_same::value ? T9::ID : - (unsigned int) etl::is_same::value ? T10::ID : - (unsigned int) etl::is_same::value ? T11::ID : - (unsigned int) etl::is_same::value ? T12::ID : - (unsigned int) etl::is_same::value ? T13::ID : - (unsigned int) etl::is_same::value ? T14::ID : - (unsigned int) etl::is_same::value ? T15::ID : - (unsigned int) etl::is_same::value ? T16::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T1::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T2::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T3::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T4::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T5::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T6::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T7::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T8::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T9::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T10::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T11::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T12::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T13::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T14::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T15::ID : + (unsigned int) etl::is_same::value ? (unsigned int)T16::ID : (unsigned int) UNKNOWN }; diff --git a/include/etl/unaligned_type.h b/include/etl/unaligned_type.h index e6f845c7..54b72205 100644 --- a/include/etl/unaligned_type.h +++ b/include/etl/unaligned_type.h @@ -374,7 +374,7 @@ namespace etl } //******************************* - static ETL_CONSTEXPR14 void copy(const char* src, int endian_src, char* dst) + static ETL_CONSTEXPR14 void copy(const char* src, int /*endian_src*/, char* dst) { dst[0] = src[0]; } diff --git a/include/etl/unordered_multiset.h b/include/etl/unordered_multiset.h index 66b82b2e..6fba7d13 100644 --- a/include/etl/unordered_multiset.h +++ b/include/etl/unordered_multiset.h @@ -775,7 +775,7 @@ namespace etl ///\param position The position to insert at. ///\param value The value to insert. //********************************************************************* - iterator insert(const_iterator position, const_reference key) + iterator insert(const_iterator /*position*/, const_reference key) { return insert(key).first; } diff --git a/include/etl/vector.h b/include/etl/vector.h index c287ddb9..6fee8de3 100644 --- a/include/etl/vector.h +++ b/include/etl/vector.h @@ -54,11 +54,6 @@ SOFTWARE. #include "algorithm.h" #include "initializer_list.h" -#ifdef ETL_COMPILER_GCC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" -#endif - //***************************************************************************** ///\defgroup vector vector /// A vector with the capacity defined at compile time. @@ -1816,8 +1811,4 @@ namespace etl } } -#ifdef ETL_COMPILER_GCC -#pragma GCC diagnostic pop -#endif - #endif diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 25f19f8b..07dad9e0 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,8 +32,6 @@ if (ETL_FORCE_TEST_CPP03_IMPLEMENTATION) add_definitions(-DETL_FORCE_TEST_CPP03_IMPLEMENTATION) endif() -include_directories(${UTPP_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/../include) - set(TEST_SOURCE_FILES main.cpp murmurhash3.cpp @@ -314,6 +312,10 @@ set(UNITTEST_SOURCE_FILES UnitTest++/XmlTestReporter.cpp ) +set(UNITTEST_DIR + UnitTest++ + ) + if (WIN32) set(UNITTEST_SOURCE_FILES ${UNITTEST_SOURCE_FILES} @@ -327,20 +329,33 @@ else () ) endif () +if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + message(STATUS "Using MSVC") +endif() + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") message(STATUS "Using GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,undefined") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") endif() if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") message(STATUS "Using Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,undefined") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") endif() add_executable(etl_tests ${TEST_SOURCE_FILES}) add_library(unit_test ${UNITTEST_SOURCE_FILES}) +include_directories(${PROJECT_SOURCE_DIR}/../include) +target_include_directories(etl_tests SYSTEM PRIVATE ${UNITTEST_DIR}) +target_include_directories(etl_tests PUBLIC ${CMAKE_CURRENT_LIST_DIR}) if(UNIX AND NOT APPLE) # atomic is need on Linux with Clang @@ -355,8 +370,6 @@ else() target_link_libraries(etl_tests unit_test) endif() -target_include_directories(etl_tests PUBLIC ${CMAKE_CURRENT_LIST_DIR}) - # Enable the 'make test' CMake target using the executable defined above add_test(etl_unit_tests etl_tests) diff --git a/test/UnitTest++/Checks.h b/test/UnitTest++/Checks.h index 7c37691b..1f05232c 100644 --- a/test/UnitTest++/Checks.h +++ b/test/UnitTest++/Checks.h @@ -1,6 +1,16 @@ #ifndef UNITTEST_CHECKS_H #define UNITTEST_CHECKS_H +#if defined(__GNUC__) && !defined(__clang__) && !defined(__llvm__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wsign-compare" +#endif + +#if defined(__clang__) || defined(__llvm__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wsign-compare" +#endif + #include "Config.h" #include "TestResults.h" #include "MemoryOutStream.h" @@ -155,4 +165,12 @@ namespace UnitTest { } +#if defined(__GNUC__) && !defined(__clang__) && !defined(__llvm__) +#pragma GCC diagnostic pop +#endif + +#if defined(__clang__) || defined(__llvm__) +#pragma clang diagnostic pop +#endif + #endif diff --git a/test/iterators_for_unit_tests.h b/test/iterators_for_unit_tests.h index 12244514..16085f87 100644 --- a/test/iterators_for_unit_tests.h +++ b/test/iterators_for_unit_tests.h @@ -52,6 +52,12 @@ struct non_random_iterator : public etl::iterator) @@ -751,6 +753,8 @@ namespace f_issue_482(c); } +#include "etl/private/diagnostic_pop.h" + //************************************************************************* TEST(test_fill) { diff --git a/test/test_bit.cpp b/test/test_bit.cpp index cf74950e..43dae6a1 100644 --- a/test/test_bit.cpp +++ b/test/test_bit.cpp @@ -39,9 +39,9 @@ namespace //*********************************** // Count bits the long way. template - size_t test_count(T value) + int test_count(T value) { - size_t count = 0UL; + int count = 0; for (int i = 0; i < etl::integral_limits::bits; ++i) { @@ -57,9 +57,9 @@ namespace //*********************************** // Count trailing zeros the long way. template - size_t test_trailing_zeros(T value) + int test_trailing_zeros(T value) { - size_t count = 0UL; + int count = 0; for (int i = 0; i < etl::integral_limits::bits; ++i) { @@ -81,7 +81,7 @@ namespace //*********************************** // Count leading zeros the long way. template - size_t test_leading_zeros(T value) + int test_leading_zeros(T value) { value = etl::reverse_bits(value); return test_trailing_zeros(value); @@ -90,9 +90,9 @@ namespace //*********************************** // Count trailing ones the long way. template - size_t test_trailing_ones(T value) + int test_trailing_ones(T value) { - size_t count = 0UL; + int count = 0UL; for (int i = 0; i < etl::integral_limits::bits; ++i) { @@ -114,7 +114,7 @@ namespace //*********************************** // Count leading ones the long way. template - size_t test_leading_ones(T value) + int test_leading_ones(T value) { value = etl::reverse_bits(value); return test_trailing_ones(value); diff --git a/test/test_bit_stream_reader_big_endian.cpp b/test/test_bit_stream_reader_big_endian.cpp index af7c6839..5a417be6 100644 --- a/test/test_bit_stream_reader_big_endian.cpp +++ b/test/test_bit_stream_reader_big_endian.cpp @@ -33,6 +33,8 @@ SOFTWARE. #include #include +#include "etl/private/diagnostic_unused_function_push.h" + namespace { //*********************************** @@ -63,8 +65,6 @@ namespace etl template <> Object read_unchecked(etl::bit_stream_reader& stream) { - bool success = true; - int16_t result_s = stream.read_unchecked(14); int32_t result_i = stream.read_unchecked(23); uint8_t result_c = stream.read_unchecked(); @@ -960,12 +960,12 @@ namespace //************************************************************************* TEST(test_read_multiple_full_size) { - int8_t c1 = 90; // 0x5A - uint16_t s1 = 4660; // 0x1234 - int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF - int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 - uint16_t s2 = 22136; // 0x5678 - int8_t c2 = -91; // 0xA5 + //int8_t c1 = 90; // 0x5A + //uint16_t s1 = 4660; // 0x1234 + //int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF + //int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 + //uint16_t s2 = 22136; // 0x5678 + //int8_t c2 = -91; // 0xA5 std::array storage = { char(0x5A), char(0x12), char(0x34), @@ -1006,12 +1006,12 @@ namespace //************************************************************************* TEST(test_read_multiple_variable_size) { - int8_t c1 = 90; // 0x5A 6 bits - uint16_t s1 = 4660; // 0x1234 13 bits - int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF 23 bits - int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 25 bits - uint16_t s2 = 22136; // 0x5678 11 bits - int8_t c2 = -91; // 0xA5 7 bits + //int8_t c1 = 90; // 0x5A 6 bits + //uint16_t s1 = 4660; // 0x1234 13 bits + //int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF 23 bits + //int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 25 bits + //uint16_t s2 = 22136; // 0x5678 11 bits + //int8_t c2 = -91; // 0xA5 7 bits std::array storage = { char(0x6A), char(0x46), char(0x8A), char(0xF3), char(0x7B), char(0xDB), char(0x97), char(0x53), @@ -1049,12 +1049,12 @@ namespace //************************************************************************* TEST(test_read_multiple_variable_size_using_non_member_functions) { - int8_t c1 = 90; // 0x5A 6 bits - uint16_t s1 = 4660; // 0x1234 13 bits - int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF 23 bits - int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 25 bits - uint16_t s2 = 22136; // 0x5678 11 bits - int8_t c2 = -91; // 0xA5 7 bits + //int8_t c1 = 90; // 0x5A 6 bits + //uint16_t s1 = 4660; // 0x1234 13 bits + //int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF 23 bits + //int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 25 bits + //uint16_t s2 = 22136; // 0x5678 11 bits + //int8_t c2 = -91; // 0xA5 7 bits std::array storage = { char(0x6A), char(0x46), char(0x8A), char(0xF3), char(0x7B), char(0xDB), char(0x97), char(0x53), @@ -1145,3 +1145,5 @@ namespace } }; } + +#include "etl/private/diagnostic_pop.h" diff --git a/test/test_bit_stream_reader_little_endian.cpp b/test/test_bit_stream_reader_little_endian.cpp index 44ffda50..eea9f46e 100644 --- a/test/test_bit_stream_reader_little_endian.cpp +++ b/test/test_bit_stream_reader_little_endian.cpp @@ -43,6 +43,7 @@ namespace uint8_t c; }; +#include "etl/private/diagnostic_unused_function_push.h" bool operator ==(const Object& lhs, const Object& rhs) { return (lhs.s == rhs.s) && @@ -55,6 +56,7 @@ namespace os << object.s << "," << object.i << "," << (int)object.c; return os; } +#include "etl/private/diagnostic_pop.h" } namespace etl @@ -63,8 +65,6 @@ namespace etl template <> Object read_unchecked(etl::bit_stream_reader& stream) { - bool success = true; - int16_t result_s = stream.read_unchecked(14); int32_t result_i = stream.read_unchecked(23); uint8_t result_c = stream.read_unchecked(); @@ -968,12 +968,12 @@ namespace //************************************************************************* TEST(test_read_multiple_full_size) { - int8_t c1 = 90; // 0x5A - uint16_t s1 = 4660; // 0x1234 - int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF - int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 - uint16_t s2 = 22136; // 0x5678 - int8_t c2 = -91; // 0xA5 + //int8_t c1 = 90; // 0x5A + //uint16_t s1 = 4660; // 0x1234 + //int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF + //int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 + //uint16_t s2 = 22136; // 0x5678 + //int8_t c2 = -91; // 0xA5 std::array storage = { char(0x5A), char(0x2C), char(0x48), @@ -1014,12 +1014,12 @@ namespace //************************************************************************* TEST(test_read_multiple_variable_size) { - int8_t c1 = 90; // 0x5A 6 bits - uint16_t s1 = 4660; // 0x1234 13 bits - int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF 23 bits - int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 25 bits - uint16_t s2 = 22136; // 0x5678 11 bits - int8_t c2 = -91; // 0xA5 7 bits + //int8_t c1 = 90; // 0x5A 6 bits + //uint16_t s1 = 4660; // 0x1234 13 bits + //int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF 23 bits + //int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 25 bits + //uint16_t s2 = 22136; // 0x5678 11 bits + //int8_t c2 = -91; // 0xA5 7 bits std::array storage = { char(0x58), char(0xB1), char(0x3E), char(0xF6), char(0x7A), char(0x86), char(0x57), char(0x4E), @@ -1057,12 +1057,12 @@ namespace //************************************************************************* TEST(test_read_multiple_variable_size_using_non_member_functions) { - int8_t c1 = 90; // 0x5A 6 bits - uint16_t s1 = 4660; // 0x1234 13 bits - int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF 23 bits - int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 25 bits - uint16_t s2 = 22136; // 0x5678 11 bits - int8_t c2 = -91; // 0xA5 7 bits + //int8_t c1 = 90; // 0x5A 6 bits + //uint16_t s1 = 4660; // 0x1234 13 bits + //int32_t i1 = 0x89ABCDEF; // 0x89ABCDEF 23 bits + //int32_t i2 = 0xFEDCBA98; // 0xFEDCBA98 25 bits + //uint16_t s2 = 22136; // 0x5678 11 bits + //int8_t c2 = -91; // 0xA5 7 bits std::array storage = { char(0x58), char(0xB1), char(0x3E), char(0xF6), char(0x7A), char(0x86), char(0x57), char(0x4E), @@ -1153,3 +1153,4 @@ namespace } }; } + diff --git a/test/test_bit_stream_writer_big_endian.cpp b/test/test_bit_stream_writer_big_endian.cpp index 7b07ab3e..ccb1f6a2 100644 --- a/test/test_bit_stream_writer_big_endian.cpp +++ b/test/test_bit_stream_writer_big_endian.cpp @@ -44,6 +44,7 @@ namespace uint8_t c; }; +#include "etl/private/diagnostic_unused_function_push.h" bool operator ==(const Object& lhs, const Object& rhs) { return (lhs.s == rhs.s) && @@ -56,6 +57,7 @@ namespace os << object.s << "," << object.i << "," << (int)object.c; return os; } +#include "etl/private/diagnostic_pop.h" } namespace etl @@ -791,3 +793,4 @@ namespace } }; } + diff --git a/test/test_bit_stream_writer_little_endian.cpp b/test/test_bit_stream_writer_little_endian.cpp index 9a9e6fbc..df8bd1eb 100644 --- a/test/test_bit_stream_writer_little_endian.cpp +++ b/test/test_bit_stream_writer_little_endian.cpp @@ -44,6 +44,7 @@ namespace uint8_t c; }; +#include "etl/private/diagnostic_unused_function_push.h" bool operator ==(const Object& lhs, const Object& rhs) { return (lhs.s == rhs.s) && @@ -56,6 +57,7 @@ namespace os << object.s << "," << object.i << "," << (int)object.c; return os; } +#include "etl/private/diagnostic_pop.h" } namespace etl diff --git a/test/test_bresenham_line.cpp b/test/test_bresenham_line.cpp index 78a092b0..96f5e231 100644 --- a/test/test_bresenham_line.cpp +++ b/test/test_bresenham_line.cpp @@ -48,12 +48,16 @@ namespace using Point = etl::coordinate_2d; +#include "etl/private/diagnostic_unused_function_push.h" + std::ostream& operator << (std::ostream& os, const Point& point) { os << "(" << int(point.x) << "," << int(point.y) << ")"; return os; } +#include "etl/private/diagnostic_pop.h" + using BresenhamLine = etl::bresenham_line; SUITE(test_bresenham_line) diff --git a/test/test_callback_timer_interrupt.cpp b/test/test_callback_timer_interrupt.cpp index 715abc99..f695239d 100644 --- a/test/test_callback_timer_interrupt.cpp +++ b/test/test_callback_timer_interrupt.cpp @@ -779,6 +779,7 @@ namespace // Start the repeating timers. timer_controller.start(id0); + timer_controller.start(id1); timer_controller.start(id2); timer_controller.start(id3); diff --git a/test/test_circular_buffer.cpp b/test/test_circular_buffer.cpp index 7f59080a..ae2d3363 100644 --- a/test/test_circular_buffer.cpp +++ b/test/test_circular_buffer.cpp @@ -511,17 +511,17 @@ namespace Data data; data.push(input1.begin(), input1.end()); - for (int i = 0; i < SIZE; ++i) + for (size_t i = 0; i < SIZE; ++i) { CHECK_EQUAL(input1[i + 3], data[i]); } - for (int i = 0; i < SIZE; ++i) + for (size_t i = 0; i < SIZE; ++i) { data[i] = input2[i]; } - for (int i = 0; i < SIZE; ++i) + for (size_t i = 0; i < SIZE; ++i) { CHECK_EQUAL(input2[i], data[i]); } @@ -535,7 +535,7 @@ namespace Data data; data.push(input.begin(), input.end()); - for (int i = 0; i < SIZE; ++i) + for (size_t i = 0; i < SIZE; ++i) { CHECK_EQUAL(input[i + 3], data[i]); } diff --git a/test/test_circular_buffer_external_buffer.cpp b/test/test_circular_buffer_external_buffer.cpp index 1c1d08aa..0c5dfc0d 100644 --- a/test/test_circular_buffer_external_buffer.cpp +++ b/test/test_circular_buffer_external_buffer.cpp @@ -521,17 +521,17 @@ namespace Data data(buffer1.raw, SIZE); data.push(input1.begin(), input1.end()); - for (int i = 0; i < SIZE; ++i) + for (int i = 0; i < int(SIZE); ++i) { CHECK_EQUAL(input1[i + 3], data[i]); } - for (int i = 0; i < SIZE; ++i) + for (int i = 0; i < int(SIZE); ++i) { data[i] = input2[i]; } - for (int i = 0; i < SIZE; ++i) + for (int i = 0; i < int(SIZE); ++i) { CHECK_EQUAL(input2[i], data[i]); } @@ -545,7 +545,7 @@ namespace Data data(buffer1.raw, SIZE); data.push(input.begin(), input.end()); - for (int i = 0; i < SIZE; ++i) + for (int i = 0; i < int(SIZE); ++i) { CHECK_EQUAL(input[i + 3], data[i]); } diff --git a/test/test_deque.cpp b/test/test_deque.cpp index fdb4120a..29c0b63d 100644 --- a/test/test_deque.cpp +++ b/test/test_deque.cpp @@ -327,7 +327,9 @@ namespace DataNDC deque1(initial_data.begin(), initial_data.end()); DataNDC deque2(deque1); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" deque2 = deque2; +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(deque1.size(), deque2.size()); CHECK(std::equal(deque1.begin(), deque1.end(), deque2.begin())); diff --git a/test/test_flat_map.cpp b/test/test_flat_map.cpp index b6146a29..3b1e0c2c 100644 --- a/test/test_flat_map.cpp +++ b/test/test_flat_map.cpp @@ -471,7 +471,9 @@ namespace DataNDC data(initial_data.begin(), initial_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool isEqual = Check_Equal(data.begin(), data.end(), diff --git a/test/test_flat_multimap.cpp b/test/test_flat_multimap.cpp index 1c648fa1..c9fa25de 100644 --- a/test/test_flat_multimap.cpp +++ b/test/test_flat_multimap.cpp @@ -442,7 +442,9 @@ namespace DataNDC data(initial_data.begin(), initial_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool isEqual = Check_Equal(data.begin(), data.end(), diff --git a/test/test_flat_multiset.cpp b/test/test_flat_multiset.cpp index deb6155c..e6e57c92 100644 --- a/test/test_flat_multiset.cpp +++ b/test/test_flat_multiset.cpp @@ -404,7 +404,9 @@ namespace DataNDC data(initial_data.begin(), initial_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool isEqual = std::equal(data.begin(), data.end(), @@ -1239,8 +1241,6 @@ namespace #if ETL_USING_CPP17 && ETL_HAS_INITIALIZER_LIST && !defined(ETL_TEMPLATE_DEDUCTION_GUIDE_TESTS_DISABLED) TEST_FIXTURE(SetupFixture, test_flat_set_template_deduction) { - using Pair = ETL_OR_STD::pair; - etl::flat_multiset data{ NDC("A"), NDC("B"), NDC("B2"), NDC("C"), NDC("D"), NDC("E"), NDC("F") }; auto v = *data.begin(); diff --git a/test/test_flat_set.cpp b/test/test_flat_set.cpp index 153a114c..14718176 100644 --- a/test/test_flat_set.cpp +++ b/test/test_flat_set.cpp @@ -413,7 +413,9 @@ namespace DataNDC data(initial_data.begin(), initial_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool isEqual = std::equal(data.begin(), data.end(), @@ -1164,8 +1166,6 @@ namespace #if ETL_USING_CPP17 && ETL_HAS_INITIALIZER_LIST && !defined(ETL_TEMPLATE_DEDUCTION_GUIDE_TESTS_DISABLED) TEST_FIXTURE(SetupFixture, test_flat_set_template_deduction) { - using Pair = ETL_OR_STD::pair; - etl::flat_set data{ NDC("A"), NDC("B"), NDC("C"), NDC("D"), NDC("E"), NDC("F") }; auto v = *data.begin(); diff --git a/test/test_forward_list.cpp b/test/test_forward_list.cpp index 7f34eb7f..21356c63 100644 --- a/test/test_forward_list.cpp +++ b/test/test_forward_list.cpp @@ -969,7 +969,9 @@ namespace DataNDC data(sorted_data.begin(), sorted_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(data.size(), other_data.size()); diff --git a/test/test_forward_list_shared_pool.cpp b/test/test_forward_list_shared_pool.cpp index 78359758..5ac72e0e 100644 --- a/test/test_forward_list_shared_pool.cpp +++ b/test/test_forward_list_shared_pool.cpp @@ -1348,7 +1348,9 @@ namespace DataNDC data1(sorted_data.begin(), sorted_data.end(), pool); DataNDC other_data(data1, pool); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(data1.size(), other_data.size()); diff --git a/test/test_indirect_vector.cpp b/test/test_indirect_vector.cpp index 20264808..06ba7d2b 100644 --- a/test/test_indirect_vector.cpp +++ b/test/test_indirect_vector.cpp @@ -393,7 +393,9 @@ namespace DataNDC data(initial_data.begin(), initial_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool is_equal = std::equal(data.begin(), data.end(), diff --git a/test/test_indirect_vector_external_buffer.cpp b/test/test_indirect_vector_external_buffer.cpp index 4db579c2..57a29663 100644 --- a/test/test_indirect_vector_external_buffer.cpp +++ b/test/test_indirect_vector_external_buffer.cpp @@ -463,7 +463,9 @@ namespace DataNDC data(initial_data.begin(), initial_data.end(), lookup1, pool1); DataNDC other_data(data, lookup2, pool2); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool is_equal = std::equal(data.begin(), data.end(), diff --git a/test/test_io_port.cpp b/test/test_io_port.cpp index e443f458..3e2f9eea 100644 --- a/test/test_io_port.cpp +++ b/test/test_io_port.cpp @@ -34,13 +34,6 @@ SOFTWARE. #include #include -#if defined(ETL_COMPILER_GCC) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wunused-variable" -#else - #pragma warning(disable:4101) // Unused variable. -#endif - uint8_t rw = 0x12U; uint8_t ro = 0x34U; uint8_t wo = 0x56U; @@ -226,7 +219,3 @@ namespace } }; } - -#if defined(ETL_COMPILER_GCC) - #pragma GCC diagnostic pop -#endif diff --git a/test/test_list.cpp b/test/test_list.cpp index cb40d0ac..6ac28708 100644 --- a/test/test_list.cpp +++ b/test/test_list.cpp @@ -1204,7 +1204,9 @@ namespace DataNDC data(sorted_data.begin(), sorted_data.end()); DataNDC other_data = data; +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(data.size(), other_data.size()); diff --git a/test/test_list_shared_pool.cpp b/test/test_list_shared_pool.cpp index b7d5cd75..eb76d425 100644 --- a/test/test_list_shared_pool.cpp +++ b/test/test_list_shared_pool.cpp @@ -1426,7 +1426,9 @@ namespace DataNDC other_data(pool); other_data = data; +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(data.size(), other_data.size()); diff --git a/test/test_map.cpp b/test/test_map.cpp index dfb71cc0..c4e11b69 100644 --- a/test/test_map.cpp +++ b/test/test_map.cpp @@ -363,7 +363,9 @@ namespace Data data(initial_data.begin(), initial_data.end()); Data other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool isEqual = std::equal(data.begin(), data.end(), diff --git a/test/test_memory.cpp b/test/test_memory.cpp index dd153994..d1878d30 100644 --- a/test/test_memory.cpp +++ b/test/test_memory.cpp @@ -104,7 +104,7 @@ namespace } template - void operator()(U* p) const + void operator()(U* /*p*/) const { } }; diff --git a/test/test_message_packet.cpp b/test/test_message_packet.cpp index f0ec86e1..b4110ddf 100644 --- a/test/test_message_packet.cpp +++ b/test/test_message_packet.cpp @@ -338,7 +338,10 @@ namespace Message2 message2(2.2); Packet packet1(message1); + +#include "etl/private/diagnostic_pessimizing-move_push.h" Packet packet2(std::move(Packet(message1))); +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(MESSAGE1, packet1.get().get_message_id()); CHECK_EQUAL(MESSAGE1, packet2.get().get_message_id()); diff --git a/test/test_message_router_registry.cpp b/test/test_message_router_registry.cpp index 28dfa160..8819b6a3 100644 --- a/test/test_message_router_registry.cpp +++ b/test/test_message_router_registry.cpp @@ -64,7 +64,7 @@ namespace { } - void on_receive(const Message1& msg) + void on_receive(const Message1&) { } @@ -85,7 +85,7 @@ namespace { } - void on_receive(const Message1& msg) + void on_receive(const Message1&) { } @@ -106,7 +106,7 @@ namespace { } - void on_receive(const Message1& msg) + void on_receive(const Message1&) { } @@ -127,7 +127,7 @@ namespace { } - void on_receive(const Message1& msg) + void on_receive(const Message1&) { } @@ -148,7 +148,7 @@ namespace { } - void on_receive(const Message1& msg) + void on_receive(const Message1&) { } diff --git a/test/test_message_timer_interrupt.cpp b/test/test_message_timer_interrupt.cpp index 6b69ac54..ee02cb44 100644 --- a/test/test_message_timer_interrupt.cpp +++ b/test/test_message_timer_interrupt.cpp @@ -716,6 +716,7 @@ namespace // Start the repeating timers. timer_controller.start(id1); + timer_controller.start(id2); timer_controller.start(id3); timer_controller.start(id4); diff --git a/test/test_multi_range.cpp b/test/test_multi_range.cpp index 403b2ac3..bceb94cb 100644 --- a/test/test_multi_range.cpp +++ b/test/test_multi_range.cpp @@ -53,6 +53,11 @@ namespace { } + Index(const Index& other) + : index(other.index) + { + } + Index& operator ++() { ++index; @@ -71,7 +76,7 @@ namespace return *this; } - bool operator = (const Index& other) + Index& operator = (const Index& other) { index = other.index; diff --git a/test/test_multimap.cpp b/test/test_multimap.cpp index f1df310e..1d580e54 100644 --- a/test/test_multimap.cpp +++ b/test/test_multimap.cpp @@ -362,7 +362,9 @@ namespace Data data(initial_data.begin(), initial_data.end()); Data other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool isEqual = std::equal(data.begin(), data.end(), diff --git a/test/test_multiset.cpp b/test/test_multiset.cpp index 2febb064..3ac3eeb3 100644 --- a/test/test_multiset.cpp +++ b/test/test_multiset.cpp @@ -365,7 +365,9 @@ namespace Data data(initial_data.begin(), initial_data.end()); Data other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool isEqual = std::equal(data.begin(), data.end(), diff --git a/test/test_optional.cpp b/test/test_optional.cpp index d0ddfe8c..9a218512 100644 --- a/test/test_optional.cpp +++ b/test/test_optional.cpp @@ -130,6 +130,7 @@ namespace //************************************************************************* TEST(test_moveable) { +#include "etl/private/diagnostic_pessimizing-move_push.h" etl::optional data(std::move(DataM(1))); CHECK_EQUAL(1U, data.value().value); CHECK(bool(data)); @@ -141,6 +142,7 @@ namespace etl::optional data2(etl::move(data)); CHECK_EQUAL(2U, data2.value().value); CHECK(bool(data2)); +#include "etl/private/diagnostic_pop.h" } //************************************************************************* diff --git a/test/test_pool.cpp b/test/test_pool.cpp index e9ce0981..4f375076 100644 --- a/test/test_pool.cpp +++ b/test/test_pool.cpp @@ -37,11 +37,6 @@ SOFTWARE. #include "etl/pool.h" #include "etl/largest.h" -#if defined(ETL_COMPILER_GCC) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif - typedef TestDataDC Test_Data; typedef TestDataNDC Test_Data2; @@ -267,6 +262,7 @@ namespace CHECK_EQUAL(4U, pool.available()); Test_Data* p; + (void)p; p = pool.allocate(); CHECK_EQUAL(3U, pool.available()); @@ -296,6 +292,7 @@ namespace CHECK_EQUAL(0U, pool.size()); Test_Data* p; + (void)p; p = pool.allocate(); CHECK_EQUAL(1U, pool.size()); @@ -318,6 +315,7 @@ namespace CHECK(!pool.full()); Test_Data* p; + (void)p; p = pool.allocate(); CHECK(!pool.empty()); @@ -376,6 +374,11 @@ namespace double* p3 = nullptr; Test_Data* p4 = nullptr; + (void)p1; + (void)p2; + (void)p3; + (void)p4; + CHECK_NO_THROW(p1 = pool.allocate()); CHECK_NO_THROW(p2 = pool.allocate()); CHECK_NO_THROW(p3 = pool.allocate()); @@ -471,7 +474,3 @@ namespace CHECK_EQUAL(0, memPool.size()); } } - -#if defined(ETL_COMPILER_GCC) - #pragma GCC diagnostic pop -#endif diff --git a/test/test_pool_external_buffer.cpp b/test/test_pool_external_buffer.cpp index 16269769..70a5f0cb 100644 --- a/test/test_pool_external_buffer.cpp +++ b/test/test_pool_external_buffer.cpp @@ -37,11 +37,6 @@ SOFTWARE. #include "etl/pool.h" #include "etl/largest.h" -#if defined(ETL_COMPILER_GCC) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif - typedef TestDataDC Test_Data; typedef TestDataNDC Test_Data2; @@ -282,6 +277,7 @@ namespace CHECK_EQUAL(4U, pool.available()); Test_Data* p; + (void)p; p = pool.allocate(); CHECK_EQUAL(3U, pool.available()); @@ -320,6 +316,7 @@ namespace CHECK_EQUAL(0U, pool.size()); Test_Data* p; + (void)p; p = pool.allocate(); CHECK_EQUAL(1U, pool.size()); @@ -347,6 +344,7 @@ namespace CHECK(!pool.full()); Test_Data* p; + (void)p; p = pool.allocate(); CHECK(!pool.empty()); @@ -404,121 +402,123 @@ namespace delete[] buffer; } - //************************************************************************* - TEST(test_create_destroy) - { - const size_t SIZE = 4; + //************************************************************************* + TEST(test_create_destroy) + { + const size_t SIZE = 4; - auto buffer0 = new etl::pool_ext::element[SIZE]; - etl::pool_ext pool0(buffer0, SIZE); + auto buffer0 = new etl::pool_ext::element[SIZE]; + etl::pool_ext pool0(buffer0, SIZE); - auto buffer1 = new etl::pool_ext::element[SIZE]; - etl::pool_ext pool1(buffer1, SIZE); + auto buffer1 = new etl::pool_ext::element[SIZE]; + etl::pool_ext pool1(buffer1, SIZE); - auto buffer2 = new etl::pool_ext::element[SIZE]; - etl::pool_ext pool2(buffer2, SIZE); + auto buffer2 = new etl::pool_ext::element[SIZE]; + etl::pool_ext pool2(buffer2, SIZE); - auto buffer3 = new etl::pool_ext::element[SIZE]; - etl::pool_ext pool3(buffer3, SIZE); + auto buffer3 = new etl::pool_ext::element[SIZE]; + etl::pool_ext pool3(buffer3, SIZE); - auto buffer4 = new etl::pool_ext::element[SIZE]; - etl::pool_ext pool4(buffer4, SIZE); + auto buffer4 = new etl::pool_ext::element[SIZE]; + etl::pool_ext pool4(buffer4, SIZE); - D0* p0 = pool0.create(); - D1* p1 = pool1.create("1"); - D2* p2 = pool2.create("1", "2"); - D3* p3 = pool3.create("1", "2", "3"); - D4* p4 = pool4.create("1", "2", "3", "4"); + D0* p0 = pool0.create(); + D1* p1 = pool1.create("1"); + D2* p2 = pool2.create("1", "2"); + D3* p3 = pool3.create("1", "2", "3"); + D4* p4 = pool4.create("1", "2", "3", "4"); - CHECK_EQUAL(pool0.max_size() - 1, pool0.available()); - CHECK_EQUAL(1U, pool0.size()); + (void)p1; + (void)p2; + (void)p3; + (void)p4; - CHECK_EQUAL(pool1.max_size() - 1, pool1.available()); - CHECK_EQUAL(1U, pool1.size()); + CHECK_EQUAL(pool0.max_size() - 1, pool0.available()); + CHECK_EQUAL(1U, pool0.size()); - CHECK_EQUAL(pool2.max_size() - 1, pool2.available()); - CHECK_EQUAL(1U, pool2.size()); + CHECK_EQUAL(pool1.max_size() - 1, pool1.available()); + CHECK_EQUAL(1U, pool1.size()); - CHECK_EQUAL(pool3.max_size() - 1, pool3.available()); - CHECK_EQUAL(1U, pool3.size()); + CHECK_EQUAL(pool2.max_size() - 1, pool2.available()); + CHECK_EQUAL(1U, pool2.size()); - CHECK_EQUAL(pool4.max_size() - 1, pool4.available()); - CHECK_EQUAL(1U, pool4.size()); + CHECK_EQUAL(pool3.max_size() - 1, pool3.available()); + CHECK_EQUAL(1U, pool3.size()); - CHECK_EQUAL(D0(), *p0); - CHECK_EQUAL(D1("1"), *p1); - CHECK_EQUAL(D2("1", "2"), *p2); - CHECK_EQUAL(D3("1", "2", "3"), *p3); - CHECK_EQUAL(D4("1", "2", "3", "4"), *p4); + CHECK_EQUAL(pool4.max_size() - 1, pool4.available()); + CHECK_EQUAL(1U, pool4.size()); - pool0.destroy(p0); - pool1.destroy(p1); - pool2.destroy(p2); - pool3.destroy(p3); - pool4.destroy(p4); + CHECK_EQUAL(D0(), *p0); + CHECK_EQUAL(D1("1"), *p1); + CHECK_EQUAL(D2("1", "2"), *p2); + CHECK_EQUAL(D3("1", "2", "3"), *p3); + CHECK_EQUAL(D4("1", "2", "3", "4"), *p4); - CHECK_EQUAL(pool0.max_size(), pool0.available()); - CHECK_EQUAL(0U, pool0.size()); + pool0.destroy(p0); + pool1.destroy(p1); + pool2.destroy(p2); + pool3.destroy(p3); + pool4.destroy(p4); - CHECK_EQUAL(pool1.max_size(), pool1.available()); - CHECK_EQUAL(0U, pool1.size()); + CHECK_EQUAL(pool0.max_size(), pool0.available()); + CHECK_EQUAL(0U, pool0.size()); - CHECK_EQUAL(pool2.max_size(), pool2.available()); - CHECK_EQUAL(0U, pool2.size()); + CHECK_EQUAL(pool1.max_size(), pool1.available()); + CHECK_EQUAL(0U, pool1.size()); - CHECK_EQUAL(pool3.max_size(), pool3.available()); - CHECK_EQUAL(0U, pool3.size()); + CHECK_EQUAL(pool2.max_size(), pool2.available()); + CHECK_EQUAL(0U, pool2.size()); - CHECK_EQUAL(pool4.max_size(), pool4.available()); - CHECK_EQUAL(0U, pool4.size()); + CHECK_EQUAL(pool3.max_size(), pool3.available()); + CHECK_EQUAL(0U, pool3.size()); - delete[] buffer0; - delete[] buffer1; - delete[] buffer2; - delete[] buffer3; - delete[] buffer4; - } + CHECK_EQUAL(pool4.max_size(), pool4.available()); + CHECK_EQUAL(0U, pool4.size()); - //************************************************************************* - TEST(test_allocate_release_non_class) - { - const size_t SIZE = 4; - auto buffer = new etl::pool_ext::element[SIZE]; - etl::pool_ext pool(buffer, SIZE); + delete[] buffer0; + delete[] buffer1; + delete[] buffer2; + delete[] buffer3; + delete[] buffer4; + } - int* i = pool.allocate(); - pool.release(i); + //************************************************************************* + TEST(test_allocate_release_non_class) + { + const size_t SIZE = 4; + auto buffer = new etl::pool_ext::element[SIZE]; + etl::pool_ext pool(buffer, SIZE); - delete[] buffer; - } + int* i = pool.allocate(); + pool.release(i); + + delete[] buffer; + } - //************************************************************************* - TEST(test_issue_406_pool_of_c_array) - { - using elem_type = uint8_t[10]; + //************************************************************************* + TEST(test_issue_406_pool_of_c_array) + { + using elem_type = uint8_t[10]; - const size_t SIZE = 3; - auto buffer = new etl::pool_ext::element[SIZE]; - etl::pool_ext memPool(buffer, SIZE); + const size_t SIZE = 3; + auto buffer = new etl::pool_ext::element[SIZE]; + etl::pool_ext memPool(buffer, SIZE); - CHECK_EQUAL(3, memPool.available()); - CHECK_EQUAL(0, memPool.size()); + CHECK_EQUAL(3, memPool.available()); + CHECK_EQUAL(0, memPool.size()); - elem_type* memory = memPool.allocate(); + elem_type* memory = memPool.allocate(); - CHECK_EQUAL(2, memPool.available()); - CHECK_EQUAL(1, memPool.size()); + CHECK_EQUAL(2, memPool.available()); + CHECK_EQUAL(1, memPool.size()); - memPool.release(memory); + memPool.release(memory); - CHECK_EQUAL(3, memPool.available()); - CHECK_EQUAL(0, memPool.size()); + CHECK_EQUAL(3, memPool.available()); + CHECK_EQUAL(0, memPool.size()); - delete[] buffer; + delete[] buffer; + } } } -} -#if defined(ETL_COMPILER_GCC) - #pragma GCC diagnostic pop -#endif diff --git a/test/test_priority_queue.cpp b/test/test_priority_queue.cpp index c6866d30..997b99f6 100644 --- a/test/test_priority_queue.cpp +++ b/test/test_priority_queue.cpp @@ -571,7 +571,10 @@ namespace etl::priority_queue priority_queue2 = priority_queue1; +#include "etl/private/diagnostic_self_assign_overloaded_push.h" priority_queue1 = priority_queue1; +#include "etl/private/diagnostic_pop.h" + CHECK(priority_queue1.size() == priority_queue2.size()); diff --git a/test/test_queue.cpp b/test/test_queue.cpp index 89b4ee72..cf1c4098 100644 --- a/test/test_queue.cpp +++ b/test/test_queue.cpp @@ -538,7 +538,9 @@ namespace queue.push(3); queue.push(4); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" queue = queue; +#include "etl/private/diagnostic_pop.h" CHECK(queue.max_size() == queue.size()); diff --git a/test/test_queue_memory_model_small.cpp b/test/test_queue_memory_model_small.cpp index 2796f7b8..0613d129 100644 --- a/test/test_queue_memory_model_small.cpp +++ b/test/test_queue_memory_model_small.cpp @@ -521,8 +521,10 @@ namespace queue.push(3); queue.push(4); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" queue = queue; - +#include "etl/private/diagnostic_pop.h" + CHECK(queue.max_size() == queue.size()); CHECK_EQUAL(1, queue.front()); diff --git a/test/test_set.cpp b/test/test_set.cpp index 16f0d60e..7a3595a6 100644 --- a/test/test_set.cpp +++ b/test/test_set.cpp @@ -98,10 +98,10 @@ namespace return (lhs < rhs.k); } - bool operator <(const Key& lhs, const Key& rhs) - { - return (lhs.k < rhs.k); - } + //bool operator <(const Key& lhs, const Key& rhs) + //{ + // return (lhs.k < rhs.k); + //} SUITE(test_set) { @@ -330,7 +330,9 @@ namespace Data data(initial_data.begin(), initial_data.end()); Data otherData(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" data = data; +#include "etl/private/diagnostic_pop.h" bool isEqual = Check_Equal(data.begin(), data.end(), diff --git a/test/test_shared_message.cpp b/test/test_shared_message.cpp index 6983466d..7aa48ab2 100644 --- a/test/test_shared_message.cpp +++ b/test/test_shared_message.cpp @@ -80,17 +80,17 @@ namespace { } - void on_receive(const Message1& message) + void on_receive(const Message1&) { ++count_message1; } - void on_receive(const Message2& message) + void on_receive(const Message2&) { ++count_message2; } - void on_receive_unknown(const etl::imessage& message) + void on_receive_unknown(const etl::imessage&) { } @@ -118,12 +118,12 @@ namespace { } - void on_receive(const Message1& message) + void on_receive(const Message1&) { ++count_message1; } - void on_receive_unknown(const etl::imessage& message) + void on_receive_unknown(const etl::imessage&) { ++count_unknown_message; } @@ -173,7 +173,7 @@ namespace return rcm2; } - void release(const etl::ireference_counted_message& msg) override + void release(const etl::ireference_counted_message&) override { // Do nothing. } @@ -182,7 +182,9 @@ namespace //************************************************************************* TEST(test_move_constructor) { +#include "etl/private/diagnostic_pessimizing-move_push.h" etl::shared_message sm1(std::move(etl::shared_message(message_pool, Message1(1)))); +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(1, sm1.get_reference_count()); } @@ -194,11 +196,17 @@ namespace Message2& m2 = prcm->get_message(); // Check that we can get a non-const reference to the message. const Message2& cm2 = prcm->get_message(); // Check that we can get a const reference to the message. + (void)m2; + (void)cm2; + etl::shared_message sm1(*prcm); etl::imessage& im = sm1.get_message(); // Check that we can get a non-const reference to the message. const etl::imessage& cim = sm1.get_message(); // Check that we can get a const reference to the message. + (void)im; + (void)cim; + CHECK_EQUAL(1, sm1.get_reference_count()); CHECK(sm1.is_valid()); } @@ -207,7 +215,9 @@ namespace TEST(test_move_assignment) { etl::shared_message sm2 = etl::shared_message(message_pool, Message1(2)); +#include "etl/private/diagnostic_pessimizing-move_push.h" sm2 = std::move(etl::shared_message(message_pool, Message1(3))); +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(1, sm2.get_reference_count()); CHECK(sm2.is_valid()); } @@ -266,6 +276,8 @@ namespace CHECK_NO_THROW(prcm = message_pool.allocate(3)); CHECK_NO_THROW(prcm = message_pool.allocate(4)); + (void)prcm; + try { prcm = message_pool.allocate(5); diff --git a/test/test_span_dynamic_extent.cpp b/test/test_span_dynamic_extent.cpp index d8b682e7..0188384b 100644 --- a/test/test_span_dynamic_extent.cpp +++ b/test/test_span_dynamic_extent.cpp @@ -412,10 +412,10 @@ namespace View view(etldata); CView cview = view; - CHECK_EQUAL(etldata.size(), view.size()); - CHECK_EQUAL(etldata.max_size(), view.max_size()); + CHECK_EQUAL(etldata.size(), cview.size()); + CHECK_EQUAL(etldata.max_size(), cview.max_size()); - bool isEqual = std::equal(view.begin(), view.end(), etldata.begin()); + bool isEqual = std::equal(cview.begin(), cview.end(), etldata.begin()); CHECK(isEqual); } @@ -693,7 +693,7 @@ namespace } //************************************************************************* - void f_issue_481(etl::span value) + void f_issue_481(etl::span) { } @@ -705,6 +705,8 @@ namespace } //************************************************************************* +#include "etl/private/diagnostic_unused_function_push.h" + struct C_issue_482 {}; void f_issue_482(etl::span) @@ -741,7 +743,7 @@ namespace } //************************************************************************* - void f_issue_486(etl::span value) + void f_issue_486(etl::span) { } @@ -755,5 +757,6 @@ namespace // Should not compile. //f_issue_486(c); } +#include "etl/private/diagnostic_pop.h" }; } diff --git a/test/test_span_fixed_extent.cpp b/test/test_span_fixed_extent.cpp index 589cfd3b..0a7ecb09 100644 --- a/test/test_span_fixed_extent.cpp +++ b/test/test_span_fixed_extent.cpp @@ -412,10 +412,10 @@ namespace View view(etldata); CView cview = view; - CHECK_EQUAL(etldata.size(), view.size()); - CHECK_EQUAL(etldata.max_size(), view.max_size()); + CHECK_EQUAL(etldata.size(), cview.size()); + CHECK_EQUAL(etldata.max_size(), cview.max_size()); - bool isEqual = std::equal(view.begin(), view.end(), etldata.begin()); + bool isEqual = std::equal(cview.begin(), cview.end(), etldata.begin()); CHECK(isEqual); } @@ -683,7 +683,7 @@ namespace } //************************************************************************* - void f_issue_481(etl::span value) + void f_issue_481(etl::span) { } @@ -695,6 +695,8 @@ namespace } //************************************************************************* +#include "etl/private/diagnostic_unused_function_push.h" + struct C_issue_482 {}; void f_issue_482(etl::span) @@ -731,7 +733,7 @@ namespace } //************************************************************************* - void f_issue_486(etl::span value) + void f_issue_486(etl::span) { } @@ -745,5 +747,7 @@ namespace // Should not compile. //f_issue_486(c); } + +#include "etl/private/diagnostic_pop.h" }; } diff --git a/test/test_stack.cpp b/test/test_stack.cpp index 473f7117..6fa704cc 100644 --- a/test/test_stack.cpp +++ b/test/test_stack.cpp @@ -491,8 +491,10 @@ namespace stack.push(3); stack.push(4); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" stack = stack; - +#include "etl/private/diagnostic_pop.h" + CHECK(stack.max_size() == stack.size()); CHECK_EQUAL(4, stack.top()); diff --git a/test/test_string_char.cpp b/test/test_string_char.cpp index 64fa68bf..7d29ea7e 100644 --- a/test/test_string_char.cpp +++ b/test/test_string_char.cpp @@ -485,7 +485,9 @@ namespace Text text(initial_text.begin(), initial_text.end()); Text other_text(text); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); @@ -502,7 +504,9 @@ namespace Text text(longer_text.begin(), longer_text.end()); Text other_text(text); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); diff --git a/test/test_string_char_external_buffer.cpp b/test/test_string_char_external_buffer.cpp index e282c11f..bb20ef7e 100644 --- a/test/test_string_char_external_buffer.cpp +++ b/test/test_string_char_external_buffer.cpp @@ -613,7 +613,9 @@ namespace TextBuffer buffer2; Text other_text(text, buffer2.data(), buffer2.size()); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); @@ -633,7 +635,9 @@ namespace TextBuffer buffer2; Text other_text(text, buffer2.data(), buffer2.size()); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); diff --git a/test/test_string_u16.cpp b/test/test_string_u16.cpp index 8daa7a8e..63d24b34 100644 --- a/test/test_string_u16.cpp +++ b/test/test_string_u16.cpp @@ -47,20 +47,20 @@ namespace } //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iu16string::value_type& c) - { - os << uint16_t(c); + //std::ostream& operator << (std::ostream& os, const etl::iu16string::value_type& c) + //{ + // os << uint16_t(c); - return os; - } + // return os; + //} //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iu16string::value_type* c) - { - os << (void*)c; + //std::ostream& operator << (std::ostream& os, const etl::iu16string::value_type* c) + //{ + // os << (void*)c; - return os; - } + // return os; + //} SUITE(test_string_char) { @@ -501,7 +501,9 @@ namespace Text text(initial_text.begin(), initial_text.end()); Text other_text(text); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); @@ -518,7 +520,9 @@ namespace Text text(longer_text.begin(), longer_text.end()); Text other_text(text); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); diff --git a/test/test_string_u16_external_buffer.cpp b/test/test_string_u16_external_buffer.cpp index 9eb28a73..c4f72c12 100644 --- a/test/test_string_u16_external_buffer.cpp +++ b/test/test_string_u16_external_buffer.cpp @@ -48,20 +48,20 @@ namespace } //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iu16string::value_type& c) - { - os << uint16_t(c); + //std::ostream& operator << (std::ostream& os, const etl::iu16string::value_type& c) + //{ + // os << uint16_t(c); - return os; - } + // return os; + //} //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iu16string::value_type* c) - { - os << (void*)c; + //std::ostream& operator << (std::ostream& os, const etl::iu16string::value_type* c) + //{ + // os << (void*)c; - return os; - } + // return os; + //} SUITE(test_string_char) { @@ -629,7 +629,9 @@ namespace TextBuffer buffer2; Text other_text(text, buffer2.data(), buffer2.size()); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); @@ -649,7 +651,9 @@ namespace TextBuffer buffer2; Text other_text(text, buffer2.data(), buffer2.size()); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); diff --git a/test/test_string_u32.cpp b/test/test_string_u32.cpp index 457e61ae..266a8f3d 100644 --- a/test/test_string_u32.cpp +++ b/test/test_string_u32.cpp @@ -47,20 +47,20 @@ namespace } //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iu32string::value_type& c) - { - os << uint32_t(c); + //std::ostream& operator << (std::ostream& os, const etl::iu32string::value_type& c) + //{ + // os << uint32_t(c); - return os; - } + // return os; + //} //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iu32string::value_type* c) - { - os << (void*)c; + //std::ostream& operator << (std::ostream& os, const etl::iu32string::value_type* c) + //{ + // os << (void*)c; - return os; - } + // return os; + //} SUITE(test_string_char) { @@ -501,7 +501,9 @@ namespace Text text(initial_text.begin(), initial_text.end()); Text other_text(text); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); @@ -518,7 +520,9 @@ namespace Text text(longer_text.begin(), longer_text.end()); Text other_text(text); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); diff --git a/test/test_string_u32_external_buffer.cpp b/test/test_string_u32_external_buffer.cpp index 2b9a4bc9..0d9b9d9b 100644 --- a/test/test_string_u32_external_buffer.cpp +++ b/test/test_string_u32_external_buffer.cpp @@ -48,20 +48,20 @@ namespace } //*********************************** - std::ostream& operator << (std::ostream& os, const etl::u32string_ext::value_type& c) - { - os << uint32_t(c); + //std::ostream& operator << (std::ostream& os, const etl::u32string_ext::value_type& c) + //{ + // os << uint32_t(c); - return os; - } + // return os; + //} //*********************************** - std::ostream& operator << (std::ostream& os, const etl::u32string_ext::value_type* c) - { - os << (void*)c; + //std::ostream& operator << (std::ostream& os, const etl::u32string_ext::value_type* c) + //{ + // os << (void*)c; - return os; - } + // return os; + //} SUITE(test_string_char) { @@ -629,7 +629,9 @@ namespace TextBuffer buffer2; Text other_text(text, buffer2.data(), buffer2.size()); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); @@ -649,7 +651,9 @@ namespace TextBuffer buffer2; Text other_text(text, buffer2.data(), buffer2.size()); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); diff --git a/test/test_string_utilities_std_u16.cpp b/test/test_string_utilities_std_u16.cpp index 3fc6bc7d..afff9cef 100644 --- a/test/test_string_utilities_std_u16.cpp +++ b/test/test_string_utilities_std_u16.cpp @@ -41,12 +41,12 @@ SOFTWARE. namespace { //*********************************** - std::ostream& operator << (std::ostream& os, const std::wstring::value_type& c) - { - os << uint16_t(c); + //std::ostream& operator << (std::ostream& os, const std::wstring::value_type& c) + //{ + // os << uint16_t(c); - return os; - } + // return os; + //} SUITE(test_string_utilities_std_u16) { diff --git a/test/test_string_utilities_std_u32.cpp b/test/test_string_utilities_std_u32.cpp index 435403fb..e7ac9080 100644 --- a/test/test_string_utilities_std_u32.cpp +++ b/test/test_string_utilities_std_u32.cpp @@ -41,12 +41,12 @@ SOFTWARE. namespace { //*********************************** - std::ostream& operator << (std::ostream& os, const std::u32string::value_type& c) - { - os << uint32_t(c); + //std::ostream& operator << (std::ostream& os, const std::u32string::value_type& c) + //{ + // os << uint32_t(c); - return os; - } + // return os; + //} SUITE(test_string_utilities_std_u32) { diff --git a/test/test_string_utilities_std_wchar_t.cpp b/test/test_string_utilities_std_wchar_t.cpp index 39758ae8..82fadcc2 100644 --- a/test/test_string_utilities_std_wchar_t.cpp +++ b/test/test_string_utilities_std_wchar_t.cpp @@ -41,12 +41,12 @@ SOFTWARE. namespace { //*********************************** - std::ostream& operator << (std::ostream& os, const std::wstring::value_type& c) - { - os << uint16_t(c); + //std::ostream& operator << (std::ostream& os, const std::wstring::value_type& c) + //{ + // os << uint16_t(c); - return os; - } + // return os; + //} SUITE(test_string_utilities_std_wchar_t) { diff --git a/test/test_string_utilities_u16.cpp b/test/test_string_utilities_u16.cpp index da154793..f457b553 100644 --- a/test/test_string_utilities_u16.cpp +++ b/test/test_string_utilities_u16.cpp @@ -39,12 +39,12 @@ SOFTWARE. namespace { //*********************************** - std::ostream& operator << (std::ostream& os, const std::u16string::value_type& c) - { - os << uint16_t(c); + //std::ostream& operator << (std::ostream& os, const std::u16string::value_type& c) + //{ + // os << uint16_t(c); - return os; - } + // return os; + //} SUITE(test_string_utilities_u16) { diff --git a/test/test_string_utilities_u32.cpp b/test/test_string_utilities_u32.cpp index 1ecf5faa..3c16a1d0 100644 --- a/test/test_string_utilities_u32.cpp +++ b/test/test_string_utilities_u32.cpp @@ -39,12 +39,12 @@ SOFTWARE. namespace { //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iu32string::value_type& c) - { - os << uint32_t(c); + //std::ostream& operator << (std::ostream& os, const etl::iu32string::value_type& c) + //{ + // os << uint32_t(c); - return os; - } + // return os; + //} SUITE(test_string_utilities_u32) { diff --git a/test/test_string_utilities_wchar_t.cpp b/test/test_string_utilities_wchar_t.cpp index e06d9d6d..ba7af84a 100644 --- a/test/test_string_utilities_wchar_t.cpp +++ b/test/test_string_utilities_wchar_t.cpp @@ -39,12 +39,12 @@ SOFTWARE. namespace { //*********************************** - std::ostream& operator << (std::ostream& os, const std::wstring::value_type& c) - { - os << uint16_t(c); + //std::ostream& operator << (std::ostream& os, const std::wstring::value_type& c) + //{ + // os << uint16_t(c); - return os; - } + // return os; + //} SUITE(test_string_utilities_wchar_t) { diff --git a/test/test_string_wchar_t.cpp b/test/test_string_wchar_t.cpp index 37adaf7e..a1add733 100644 --- a/test/test_string_wchar_t.cpp +++ b/test/test_string_wchar_t.cpp @@ -47,20 +47,20 @@ namespace } //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iwstring::value_type& c) - { - os << uint16_t(c); + //std::ostream& operator << (std::ostream& os, const etl::iwstring::value_type& c) + //{ + // os << uint16_t(c); - return os; - } + // return os; + //} //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iwstring::value_type* c) - { - os << (void*)c; + //std::ostream& operator << (std::ostream& os, const etl::iwstring::value_type* c) + //{ + // os << (void*)c; - return os; - } + // return os; + //} SUITE(test_string_wchar_t) { @@ -501,7 +501,9 @@ namespace Text text(initial_text.begin(), initial_text.end()); Text other_text(text); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); @@ -518,7 +520,9 @@ namespace Text text(longer_text.begin(), longer_text.end()); Text other_text(text); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); diff --git a/test/test_string_wchar_t_external_buffer.cpp b/test/test_string_wchar_t_external_buffer.cpp index 73179c3f..9d240997 100644 --- a/test/test_string_wchar_t_external_buffer.cpp +++ b/test/test_string_wchar_t_external_buffer.cpp @@ -48,20 +48,20 @@ namespace } //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iwstring::value_type& c) - { - os << uint16_t(c); + //std::ostream& operator << (std::ostream& os, const etl::iwstring::value_type& c) + //{ + // os << uint16_t(c); - return os; - } + // return os; + //} //*********************************** - std::ostream& operator << (std::ostream& os, const etl::iwstring::value_type* c) - { - os << (void*)c; + //std::ostream& operator << (std::ostream& os, const etl::iwstring::value_type* c) + //{ + // os << (void*)c; - return os; - } + // return os; + //} SUITE(test_string_char) { @@ -629,7 +629,9 @@ namespace TextBuffer buffer2; Text other_text(text, buffer2.data(), buffer2.size()); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); @@ -649,7 +651,9 @@ namespace TextBuffer buffer2; Text other_text(text, buffer2.data(), buffer2.size()); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_text = other_text; +#include "etl/private/diagnostic_pop.h" bool is_equal = Equal(text, other_text); diff --git a/test/test_unordered_map.cpp b/test/test_unordered_map.cpp index c4937985..70c49338 100644 --- a/test/test_unordered_map.cpp +++ b/test/test_unordered_map.cpp @@ -350,7 +350,9 @@ namespace DataNDC data(initial_data.begin(), initial_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool isEqual = std::equal(data.begin(), data.end(), diff --git a/test/test_unordered_multimap.cpp b/test/test_unordered_multimap.cpp index 1ca03da3..ab50ae13 100644 --- a/test/test_unordered_multimap.cpp +++ b/test/test_unordered_multimap.cpp @@ -327,7 +327,10 @@ namespace DataNDC data(initial_data.begin(), initial_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" + bool isEqual = std::equal(data.begin(), data.end(), diff --git a/test/test_unordered_multiset.cpp b/test/test_unordered_multiset.cpp index 279351a7..7ddc43a9 100644 --- a/test/test_unordered_multiset.cpp +++ b/test/test_unordered_multiset.cpp @@ -206,14 +206,8 @@ namespace DataM data2(std::move(data1)); - size_t count1 = etl::distance(data1.begin(), data1.end()); - size_t count2 = etl::distance(data2.begin(), data2.end()); - CHECK(!data1.empty()); // Move does not clear the source. - DataM::const_iterator itr = data1.begin(); - - CHECK(data2.find(ItemM(1)) != data2.end()); CHECK(data2.find(ItemM(2)) != data2.end()); CHECK(data2.find(ItemM(3)) != data2.end()); @@ -277,7 +271,9 @@ namespace DataNDC data(initial_data.begin(), initial_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool isEqual = std::equal(data.begin(), data.end(), diff --git a/test/test_unordered_set.cpp b/test/test_unordered_set.cpp index 7414d6b5..17af20a5 100644 --- a/test/test_unordered_set.cpp +++ b/test/test_unordered_set.cpp @@ -254,7 +254,9 @@ namespace DataNDC data(initial_data.begin(), initial_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool isEqual = std::equal(data.begin(), data.end(), diff --git a/test/test_utility.cpp b/test/test_utility.cpp index ab141c76..3261a294 100644 --- a/test/test_utility.cpp +++ b/test/test_utility.cpp @@ -36,7 +36,6 @@ namespace { bool nonConstCalled; bool constCalled; - int value; void TestText(std::string&) { @@ -169,7 +168,9 @@ namespace etl::pair p1(1, 2.3); etl::pair p2(0, 0); +#include "etl/private/diagnostic_pessimizing-move_push.h" p2 = etl::make_pair(std::move(ItemM1(1)), std::move(ItemM2(2.3))); +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(p1.first, p2.first); CHECK_EQUAL(p1.second, p2.second); diff --git a/test/test_variant_legacy.cpp b/test/test_variant_legacy.cpp index 8290329b..8dc9f103 100644 --- a/test/test_variant_legacy.cpp +++ b/test/test_variant_legacy.cpp @@ -443,7 +443,9 @@ namespace test_variant_3a variant; variant = 1; +#include "etl/private/diagnostic_self_assign_overloaded_push.h" variant = variant; +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(1, variant.get()); } diff --git a/test/test_variant_variadic.cpp b/test/test_variant_variadic.cpp index 559db8c0..3bc02e22 100644 --- a/test/test_variant_variadic.cpp +++ b/test/test_variant_variadic.cpp @@ -673,7 +673,9 @@ namespace test_variant_etl_3 variant_etl; variant_etl = 1; +#include "etl/private/diagnostic_self_assign_overloaded_push.h" variant_etl = variant_etl; +#include "etl/private/diagnostic_pop.h" CHECK_EQUAL(1, etl::get(variant_etl)); } diff --git a/test/test_vector.cpp b/test/test_vector.cpp index 4588f906..70313f3f 100644 --- a/test/test_vector.cpp +++ b/test/test_vector.cpp @@ -248,7 +248,9 @@ namespace Data data(initial_data.begin(), initial_data.end()); Data other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool is_equal = std::equal(data.begin(), data.end(), diff --git a/test/test_vector_external_buffer.cpp b/test/test_vector_external_buffer.cpp index eaf6223a..117bcdb1 100644 --- a/test/test_vector_external_buffer.cpp +++ b/test/test_vector_external_buffer.cpp @@ -241,7 +241,9 @@ namespace Data data(initial_data.begin(), initial_data.end(), buffer1, SIZE); Data other_data(data, buffer1, SIZE); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool is_equal = std::equal(data.begin(), data.end(), diff --git a/test/test_vector_non_trivial.cpp b/test/test_vector_non_trivial.cpp index 1a2db4f7..3b4efc27 100644 --- a/test/test_vector_non_trivial.cpp +++ b/test/test_vector_non_trivial.cpp @@ -339,7 +339,9 @@ namespace DataNDC data(initial_data.begin(), initial_data.end()); DataNDC other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool is_equal = std::equal(data.begin(), data.end(), diff --git a/test/test_vector_pointer.cpp b/test/test_vector_pointer.cpp index 680a507d..d6aad71d 100644 --- a/test/test_vector_pointer.cpp +++ b/test/test_vector_pointer.cpp @@ -408,7 +408,9 @@ namespace Data data(initial_data.begin(), initial_data.end()); Data other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool is_equal = std::equal(data.begin(), data.end(), other_data.begin()); @@ -421,7 +423,9 @@ namespace CData data(initial_data.begin(), initial_data.end()); CData other_data(data); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool is_equal = std::equal(data.begin(), data.end(), other_data.begin()); diff --git a/test/test_vector_pointer_external_buffer.cpp b/test/test_vector_pointer_external_buffer.cpp index 33dd1336..edad3ac9 100644 --- a/test/test_vector_pointer_external_buffer.cpp +++ b/test/test_vector_pointer_external_buffer.cpp @@ -394,7 +394,9 @@ namespace Data data(initial_data.begin(), initial_data.end(), buffer1, SIZE); Data other_data(data, buffer2, SIZE); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool is_equal = std::equal(data.begin(), data.end(), other_data.begin()); @@ -407,7 +409,9 @@ namespace CData data(initial_data.begin(), initial_data.end(), buffer1, SIZE); CData other_data(data, buffer2, SIZE); +#include "etl/private/diagnostic_self_assign_overloaded_push.h" other_data = other_data; +#include "etl/private/diagnostic_pop.h" bool is_equal = std::equal(data.begin(), data.end(), other_data.begin()); diff --git a/test/vs2019/etl.vcxproj b/test/vs2019/etl.vcxproj index 9a1a1e69..3b471ff1 100644 --- a/test/vs2019/etl.vcxproj +++ b/test/vs2019/etl.vcxproj @@ -1042,7 +1042,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1052,6 +1052,7 @@ stdcpp17 ProgramDatabase /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1065,7 +1066,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_NO_STL;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1075,6 +1076,7 @@ stdcpp17 EditAndContinue /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1088,7 +1090,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1098,6 +1100,7 @@ stdcpp17 EditAndContinue /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1111,7 +1114,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1121,6 +1124,7 @@ stdcpp17 EditAndContinue /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1135,7 +1139,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1145,6 +1149,7 @@ stdcpp20 EditAndContinue /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1158,7 +1163,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_NO_STL;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1168,6 +1173,7 @@ stdcpp20 EditAndContinue /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1181,7 +1187,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_FORCE_TEST_CPP03_IMPLEMENTATION;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1191,6 +1197,7 @@ stdcpp17 EditAndContinue /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1204,7 +1211,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_FORCE_TEST_CPP03;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1214,6 +1221,7 @@ stdcpp17 EditAndContinue /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1227,7 +1235,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_DISABLE_STRING_TRUNCATION_CHECKS;ETL_DISABLE_STRING_CLEAR_AFTER_USE;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1236,6 +1244,7 @@ false stdcpp17 /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1249,7 +1258,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_TEMPLATE_DEDUCTION_GUIDE_TESTS_DISABLED;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1258,6 +1267,7 @@ false stdcpp17 /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1292,7 +1302,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_NO_CHECKS;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1301,6 +1311,7 @@ false stdcpp17 /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1314,7 +1325,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_STRING_TRUNCATION_IS_ERROR;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1323,6 +1334,7 @@ false stdcpp17 /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1336,7 +1348,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;ETL_NO_STL;ETL_FORCE_STD_INITIALIZER_LIST;%(PreprocessorDefinitions) ./;../../../unittest-cpp/;../../include;../../test @@ -1346,6 +1358,7 @@ stdcpp17 ProgramDatabase /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1359,7 +1372,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;ETL_NO_STL;%(PreprocessorDefinitions) ./;../../../unittest-cpp/;../../include;../../test @@ -1369,6 +1382,7 @@ stdcpp17 ProgramDatabase /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1382,7 +1396,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;ETL_NO_STL;ETL_USE_MEM_BUILTINS;ETL_USE_TYPE_TRAITS_BUILTINS;ETL_USING_BUILTIN_MEMCPY=0;ETL_USING_BUILTIN_MEMMOVE=0;ETL_USING_BUILTIN_MEMSET=0;%(PreprocessorDefinitions) ./;../../../unittest-cpp/;../../include;../../test @@ -1392,6 +1406,7 @@ stdcpp17 ProgramDatabase /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1405,7 +1420,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;ETL_NO_STL;ETL_FORCE_CONSTEXPR_ALGORITHMS=1;%(PreprocessorDefinitions) ./;../../../unittest-cpp/;../../include;../../test @@ -1415,6 +1430,7 @@ stdcpp17 ProgramDatabase /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1428,7 +1444,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;ETL_NO_STL;ETL_TEMPLATE_DEDUCTION_GUIDE_TESTS_DISABLED;%(PreprocessorDefinitions) ./;../../../unittest-cpp/;../../include;../../test @@ -1437,6 +1453,7 @@ false stdcpp17 /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1450,7 +1467,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;ETL_NO_STL;ETL_FORCE_NO_ADVANCED_CPP;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1459,6 +1476,7 @@ false stdcpp17 /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1472,7 +1490,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;__clang__;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1483,6 +1501,7 @@ false ProgramDatabase /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1496,7 +1515,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;__clang__;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1507,6 +1526,7 @@ false ProgramDatabase /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1520,7 +1540,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_NO_STL;__clang__;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1531,6 +1551,7 @@ false ProgramDatabase /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1592,7 +1613,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_NO_STL;ETL_USE_TYPE_TRAITS_BUILTINS;__clang__;%(PreprocessorDefinitions) ./;../../../unittest-cpp/;../../include;../../test @@ -1603,6 +1624,7 @@ false ProgramDatabase /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -1640,7 +1662,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -1652,6 +1674,7 @@ FullDebug Default /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -2211,7 +2234,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -2220,6 +2243,7 @@ false stdcpp17 /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -2254,7 +2278,7 @@ - Level3 + Level2 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ../../../unittest-cpp/;../../include;../../test @@ -2262,6 +2286,7 @@ stdcpp17 /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -2294,7 +2319,7 @@ - Level3 + Level2 MaxSpeed @@ -2304,6 +2329,7 @@ ../../unittest-cpp/;../../src false /Zc:__cplusplus %(AdditionalOptions) + true Console @@ -2412,6 +2438,10 @@ + + + + diff --git a/test/vs2019/etl.vcxproj.filters b/test/vs2019/etl.vcxproj.filters index d7fccd5f..a8845e57 100644 --- a/test/vs2019/etl.vcxproj.filters +++ b/test/vs2019/etl.vcxproj.filters @@ -1311,6 +1311,18 @@ Tests\Error Handler\Exceptions_And_Log_Errors + + ETL\Private + + + ETL\Private + + + ETL\Private + + + ETL\Private +