Skip to content

Commit

Permalink
[#3616] Fix UB warning about exceeding enum value
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-pavel committed Oct 25, 2024
1 parent e2300ef commit efec9a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/dhcp/option4_client_fqdn.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2013-2022 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-2024 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
Expand Down Expand Up @@ -145,7 +145,7 @@ class Option4ClientFqdn : public Option {


/// @brief Type of the domain-name: partial or full.
enum DomainNameType {
enum DomainNameType : int {
PARTIAL,
FULL
};
Expand Down
4 changes: 2 additions & 2 deletions src/lib/dhcp/option6_client_fqdn.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2013-2022 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2013-2024 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
Expand Down Expand Up @@ -102,7 +102,7 @@ class Option6ClientFqdn : public Option {
static const uint16_t FLAG_FIELD_LEN = 1;

/// @brief Type of the domain-name: partial or full.
enum DomainNameType {
enum DomainNameType : int {
PARTIAL,
FULL
};
Expand Down

0 comments on commit efec9a6

Please sign in to comment.