diff --git a/src/hooks/dhcp/high_availability/ha_config_parser.cc b/src/hooks/dhcp/high_availability/ha_config_parser.cc index 7cba9c10cd..a0ac78f5b7 100644 --- a/src/hooks/dhcp/high_availability/ha_config_parser.cc +++ b/src/hooks/dhcp/high_availability/ha_config_parser.cc @@ -255,7 +255,7 @@ T HAConfigParser::getAndValidateInteger(const ConstElementPtr& config, } else if (value > std::numeric_limits::max()) { isc_throw(ConfigError, "'" << parameter_name << "' must not be greater than " - << std::numeric_limits::max()); + << +std::numeric_limits::max()); } return (static_cast(value)); diff --git a/src/lib/dhcp/option_data_types.cc b/src/lib/dhcp/option_data_types.cc index a74ec9e3ac..6d27c8ce35 100644 --- a/src/lib/dhcp/option_data_types.cc +++ b/src/lib/dhcp/option_data_types.cc @@ -236,7 +236,7 @@ OptionDataTypeUtil::writeTuple(const std::string& value, if (value.size() > std::numeric_limits::max()) { isc_throw(BadDataTypeCast, "invalid tuple value (size " << value.size() << " larger than " - << std::numeric_limits::max() << ")"); + << +std::numeric_limits::max() << ")"); } buf.push_back(static_cast(value.size())); @@ -267,7 +267,7 @@ OptionDataTypeUtil::writeTuple(const OpaqueDataTuple& tuple, if (tuple.getLength() > std::numeric_limits::max()) { isc_throw(BadDataTypeCast, "invalid tuple value (size " << tuple.getLength() << " larger than " - << std::numeric_limits::max() << ")"); + << +std::numeric_limits::max() << ")"); } buf.push_back(static_cast(tuple.getLength())); diff --git a/src/lib/dhcp/option_definition.cc b/src/lib/dhcp/option_definition.cc index 91bf7db475..2452f598bd 100644 --- a/src/lib/dhcp/option_definition.cc +++ b/src/lib/dhcp/option_definition.cc @@ -603,9 +603,9 @@ OptionDefinition::lexicalCastWithRangeCheck(const std::string& value_str) result < numeric_limits::min()) { isc_throw(BadDataTypeCast, "unable to convert '" << value_str << "' to numeric type. This value is " - " expected to be in the range of " - << numeric_limits::min() - << ".." << numeric_limits::max()); + "expected to be in the range of " + << +numeric_limits::min() << ".." + << +numeric_limits::max()); } } return (static_cast(result));