From: Francis Dupont Date: Wed, 24 Jun 2015 11:54:31 +0000 (+0200) Subject: [3919] Assign typecode_ to avoid cppcheck warning X-Git-Tag: trac3911_base~5^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8939fad87d01be762d401868d5939179d12b0ac0;p=thirdparty%2Fkea.git [3919] Assign typecode_ to avoid cppcheck warning --- diff --git a/src/lib/dns/rrtype.cc b/src/lib/dns/rrtype.cc index 84892bfd7c..7258c6894b 100644 --- a/src/lib/dns/rrtype.cc +++ b/src/lib/dns/rrtype.cc @@ -32,10 +32,12 @@ namespace isc { namespace dns { RRType::RRType(const std::string& type_str) { - if (!RRParamRegistry::getRegistry().textToTypeCode(type_str, typecode_)) { + uint16_t typecode; + if (!RRParamRegistry::getRegistry().textToTypeCode(type_str, typecode)) { isc_throw(InvalidRRType, "Unrecognized RR type string: " + type_str); } + typecode_ = typecode; } RRType::RRType(InputBuffer& buffer) {