From: Otto Moerbeek Date: Fri, 9 Sep 2022 07:11:06 +0000 (+0200) Subject: Fix CID 1497843: Execution cannot reach this statement X-Git-Tag: rec-4.8.0-alpha1~22^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=255ae4120b223e0bc39d8da82d969dba81b94033;p=thirdparty%2Fpdns.git Fix CID 1497843: Execution cannot reach this statement Followup to #11143. Not a bug per se, but the unreachable code should be guarded by proper #ifdef --- diff --git a/pdns/tkey.cc b/pdns/tkey.cc index f7f439afa4..7fdd540229 100644 --- a/pdns/tkey.cc +++ b/pdns/tkey.cc @@ -16,7 +16,9 @@ void PacketHandler::tkeyHandler(const DNSPacket& p, std::unique_ptr& TKEYRecordContent tkey_in; std::shared_ptr tkey_out(new TKEYRecordContent()); DNSName name; +#ifdef ENABLE_GSS_TSIG bool sign = false; +#endif if (!p.getTKEYRecord(&tkey_in, &name)) { g_log<& zrr.dr.d_place = DNSResourceRecord::ANSWER; r->addRecord(std::move(zrr)); +#ifdef ENABLE_GSS_TSIG if (sign) { TSIGRecordContent trc; @@ -122,6 +125,7 @@ void PacketHandler::tkeyHandler(const DNSPacket& p, std::unique_ptr& // this should cause it to lookup name context r->setTSIGDetails(trc, name, name.toStringNoDot(), "", false); } +#endif r->commitD(); }