From: Andrew Nelless Date: Sun, 28 Feb 2016 01:23:54 +0000 (+0000) Subject: Fix cast parsing bug with GCC 4.7. X-Git-Tag: rec-4.0.0-alpha2~41^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e168c4d3e13494b77bc93c8bfff589757a095594;p=pdns Fix cast parsing bug with GCC 4.7. GCC 4.7 doesn't seem to like some_cast<::type> --- diff --git a/pdns/mtasker_ucontext.cc b/pdns/mtasker_ucontext.cc index aba7955e8..5bd19bd6f 100644 --- a/pdns/mtasker_ucontext.cc +++ b/pdns/mtasker_ucontext.cc @@ -61,14 +61,14 @@ pdns_ucontext_t::pdns_ucontext_t() { } pdns_ucontext_t::~pdns_ucontext_t() { - delete static_cast<::ucontext_t*>(uc_mcontext); + delete static_cast(uc_mcontext); } void pdns_swapcontext (pdns_ucontext_t& __restrict octx, pdns_ucontext_t const& __restrict ctx) { - if (::swapcontext (static_cast<::ucontext*>(octx.uc_mcontext), - static_cast<::ucontext*>(ctx.uc_mcontext))) { + if (::swapcontext (static_cast(octx.uc_mcontext), + static_cast(ctx.uc_mcontext))) { throw_errno ("swapcontext() failed"); } if (ctx.exception) { @@ -82,8 +82,8 @@ pdns_makecontext assert (ctx.uc_link); assert (ctx.uc_stack.size()); - auto const mcp = static_cast<::ucontext*>(ctx.uc_mcontext); - auto const next = static_cast<::ucontext*>(ctx.uc_link->uc_mcontext); + auto const mcp = static_cast(ctx.uc_mcontext); + auto const next = static_cast(ctx.uc_link->uc_mcontext); if (::getcontext (mcp)) { throw_errno ("getcontext() failed"); }