Skip to content

Commit cc49fcb

Browse files
committed
Work around G++ 8 warnings
The previous G++-8 cleanup did not include unit tests.
1 parent cbce4bc commit cc49fcb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: src/util/small_map.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class small_mapt
146146
if(n == 0)
147147
return nullptr;
148148

149-
T *mem = (T *)realloc(ptr, sizeof(T) * n);
149+
T *mem = (T *)realloc((char *)ptr, sizeof(T) * n);
150150

151151
if(!mem)
152152
throw std::bad_alloc();
@@ -486,7 +486,7 @@ class small_mapt
486486
std::size_t n = size();
487487
if(ii < n - 1)
488488
{
489-
memmove(p + ii, p + ii + 1, sizeof(T) * (n - ii - 1));
489+
memmove((char *)(p + ii), p + ii + 1, sizeof(T) * (n - ii - 1));
490490
}
491491

492492
p = allocate(p, n - 1);

Diff for: unit/testing-utils/catch.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2245,7 +2245,7 @@ namespace Catch {
22452245
static_cast<void>(expr); \
22462246
__catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \
22472247
} \
2248-
catch( exceptionType ) { \
2248+
catch( const exceptionType & ) { \
22492249
__catchResult.captureResult( Catch::ResultWas::Ok ); \
22502250
} \
22512251
catch( ... ) { \

0 commit comments

Comments
 (0)