Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ SCENARIO("erase_type_arguments", "[core][java_types]")
REQUIRE_THROWS_AS(
erase_type_arguments(
"testClassName<testTypeArgument1<testTypeArgument2>"),
unsupported_java_class_signature_exceptiont &);
unsupported_java_class_signature_exceptiont);
}
}
11 changes: 9 additions & 2 deletions src/util/small_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ class small_mapt
if(n == 0)
return nullptr;

T *mem = (T *)realloc(ptr, sizeof(T) * n);
// explicitly cast to char * as GCC 8 warns about not using new/delete for
// class sharing_node_innert<dstringt, std::basic_string<char>,
// std::equal_to<dstringt> >
T *mem = (T *)realloc((char *)ptr, sizeof(T) * n);

if(!mem)
throw std::bad_alloc();
Expand Down Expand Up @@ -486,7 +489,11 @@ class small_mapt
std::size_t n = size();
if(ii < n - 1)
{
memmove(p + ii, p + ii + 1, sizeof(T) * (n - ii - 1));
// explicitly cast to char * as GCC 8 warns about not using new/delete
// for
// class sharing_node_innert<dstringt, std::basic_string<char>,
// std::equal_to<dstringt> >
memmove((char *)(p + ii), p + ii + 1, sizeof(T) * (n - ii - 1));
}

p = allocate(p, n - 1);
Expand Down
2 changes: 1 addition & 1 deletion unit/testing-utils/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2245,7 +2245,7 @@ namespace Catch {
static_cast<void>(expr); \
__catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \
} \
catch( exceptionType ) { \
catch( const exceptionType & ) { \
__catchResult.captureResult( Catch::ResultWas::Ok ); \
} \
catch( ... ) { \
Expand Down