From: Francis Dupont Date: Wed, 24 Jun 2015 11:52:43 +0000 (+0200) Subject: [3919] Assign classcode_ to avoid cppcheck warning X-Git-Tag: trac3911_base~5^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78af50a26931709dec01b01cf9d4e289eba37a67;p=thirdparty%2Fkea.git [3919] Assign classcode_ to avoid cppcheck warning --- diff --git a/src/lib/dns/rrclass.cc b/src/lib/dns/rrclass.cc index 81c307c547..6c6c861628 100644 --- a/src/lib/dns/rrclass.cc +++ b/src/lib/dns/rrclass.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2010, 2015 Internet Systems Consortium, Inc. ("ISC") // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above @@ -31,10 +31,12 @@ namespace isc { namespace dns { RRClass::RRClass(const std::string& class_str) { - if (!RRParamRegistry::getRegistry().textToClassCode(class_str, classcode_)) { + uint16_t classcode; + if (!RRParamRegistry::getRegistry().textToClassCode(class_str, classcode)) { isc_throw(InvalidRRClass, "Unrecognized RR class string: " + class_str); } + classcode_ = classcode; } RRClass::RRClass(InputBuffer& buffer) {