Skip to content
Snippets Groups Projects
Commit b5b95ad5 authored by Adrien Béraud's avatar Adrien Béraud Committed by Adrien Béraud
Browse files

eth: fix warnings

Change-Id: I510df00599ea148fa18cec08a12737159c52ebd4
parent 84fda58f
No related branches found
No related tags found
No related merge requests found
...@@ -332,6 +332,9 @@ public: ...@@ -332,6 +332,9 @@ public:
ConstructFromHashType _t = FixedHash<T>::AlignLeft) ConstructFromHashType _t = FixedHash<T>::AlignLeft)
: FixedHash<T>(_h, _t) : FixedHash<T>(_h, _t)
{} {}
SecureFixedHash(SecureFixedHash<T> const& _h)
: FixedHash<T>(_h.makeInsecure())
{}
template<unsigned M> template<unsigned M>
explicit SecureFixedHash(SecureFixedHash<M> const& _h, explicit SecureFixedHash(SecureFixedHash<M> const& _h,
ConstructFromHashType _t = FixedHash<T>::AlignLeft) ConstructFromHashType _t = FixedHash<T>::AlignLeft)
......
...@@ -33,9 +33,11 @@ namespace { ...@@ -33,9 +33,11 @@ namespace {
secp256k1_context const* secp256k1_context const*
getCtx() getCtx()
{ {
static std::unique_ptr<secp256k1_context, decltype(&secp256k1_context_destroy)> struct secp256k1Deleter {
s_ctx {secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY), void operator()(secp256k1_context* b) { secp256k1_context_destroy(b); }
&secp256k1_context_destroy}; };
static std::unique_ptr<secp256k1_context, secp256k1Deleter>
s_ctx(secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY));
return s_ctx.get(); return s_ctx.get();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment