From: Marcin Siodelski Date: Tue, 15 Jan 2013 09:07:17 +0000 (+0100) Subject: [2317] Pass a string object to is_any_of() instead of char* value. X-Git-Tag: bind10-1.0.0-rc-release~100^2~2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cee583601a4e084bf54cf90e0d52b79f0783700;p=thirdparty%2Fkea.git [2317] Pass a string object to is_any_of() instead of char* value. This is a workaround for the warnings on Debian6: "array subscript is above array bounds". --- diff --git a/src/lib/dhcp/option_definition.cc b/src/lib/dhcp/option_definition.cc index 6db9e4bd10..d2b5aaef46 100644 --- a/src/lib/dhcp/option_definition.cc +++ b/src/lib/dhcp/option_definition.cc @@ -220,12 +220,12 @@ OptionDefinition::validate() const { if (!all(name_, boost::is_from_range('a', 'z') || boost::is_from_range('A', 'Z') || boost::is_digit() || - boost::is_any_of("-_")) || + boost::is_any_of(std::string("-_"))) || name_.empty() || // Hyphens and underscores are not allowed at the beginning // and at the end of the option name. - all(find_head(name_, 1), boost::is_any_of("-_")) || - all(find_tail(name_, 1), boost::is_any_of("-_"))) { + all(find_head(name_, 1), boost::is_any_of(std::string("-_"))) || + all(find_tail(name_, 1), boost::is_any_of(std::string("-_")))) { err_str << "invalid option name '" << name_ << "'"; } else if (type_ >= OPT_UNKNOWN_TYPE) {