]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Cast mismatched enums
authorFrancis Dupont <fdupont@isc.org>
Fri, 6 Oct 2017 22:40:50 +0000 (00:40 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 6 Oct 2017 22:40:50 +0000 (00:40 +0200)
src/lib/dhcp/option_vendor.cc

index 7b0220c1c5e5a59ca3edd9464369cc540eeb7375..aa137f7b4c71a6172309bcc56c9f7f6c73a485c2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2017 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 using namespace isc::dhcp;
 
 OptionVendor::OptionVendor(Option::Universe u, const uint32_t vendor_id)
-    :Option(u, u==Option::V4?DHO_VIVSO_SUBOPTIONS:D6O_VENDOR_OPTS), vendor_id_(vendor_id) {
+    : Option(u, u == Option::V4 ?
+             static_cast<uint16_t>(DHO_VIVSO_SUBOPTIONS) :
+             static_cast<uint16_t>(D6O_VENDOR_OPTS)),
+      vendor_id_(vendor_id) {
 }
 
 OptionVendor::OptionVendor(Option::Universe u, OptionBufferConstIter begin,
                            OptionBufferConstIter end)
-    :Option(u, u==Option::V4?DHO_VIVSO_SUBOPTIONS:D6O_VENDOR_OPTS), vendor_id_(0) {
+    : Option(u, u == Option::V4?
+             static_cast<uint16_t>(DHO_VIVSO_SUBOPTIONS) :
+             static_cast<uint16_t>(D6O_VENDOR_OPTS)),
+      vendor_id_(0) {
     unpack(begin, end);
 }