mirror of
https://github.com/microsoft/GSL.git
synced 2025-11-18 08:19:37 +01:00
Cleanup additional GCC warnings
When turning on the following flags, several additional warnings were generated, which have been cleaned up in this patch. The flags included: -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wctor-dtor-privacy -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Woverloaded-virtual
This commit is contained in:
committed by
Neil MacIntosh
parent
38f453d608
commit
d641796b21
@@ -1336,8 +1336,8 @@ SUITE(span_tests)
|
||||
#endif
|
||||
{
|
||||
auto f = [&]() {
|
||||
span<int, 4> s4 = {arr2, 2};
|
||||
static_cast<void>(s4);
|
||||
span<int, 4> _s4 = {arr2, 2};
|
||||
static_cast<void>(_s4);
|
||||
};
|
||||
CHECK_THROW(f(), fail_fast);
|
||||
}
|
||||
@@ -1345,8 +1345,8 @@ SUITE(span_tests)
|
||||
// this should fail - we are trying to assign a small dynamic span to a fixed_size larger one
|
||||
span<int> av = arr2;
|
||||
auto f = [&]() {
|
||||
span<int, 4> s4 = av;
|
||||
static_cast<void>(s4);
|
||||
span<int, 4> _s4 = av;
|
||||
static_cast<void>(_s4);
|
||||
};
|
||||
CHECK_THROW(f(), fail_fast);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user