Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
20f13469
Commit
20f13469
authored
Jan 31, 2013
by
Stephen Morris
Browse files
[2673] Modifications to avoid clang warnings and errors in DHCP code
parent
53dec20f
Changes
11
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/Makefile.am
View file @
20f13469
...
...
@@ -5,6 +5,10 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS
+=
$(BOOST_INCLUDES)
AM_CXXFLAGS
=
$(B10_CXXFLAGS)
if
USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS
+=
-Wno-unused-parameter
endif
if
USE_STATIC_LINK
AM_LDFLAGS
=
-static
...
...
src/bin/dhcp4/config_parser.cc
View file @
20f13469
...
...
@@ -967,13 +967,13 @@ public:
return
(
new
OptionDataListParser
(
param_name
));
}
/// Pointer to options instances storage.
OptionStorage
*
options_
;
/// Intermediate option storage. This storage is used by
/// lower level parsers to add new options. Values held
/// in this storage are assigned to main storage (options_)
/// if overall parsing was successful.
OptionStorage
local_options_
;
/// Pointer to options instances storage.
OptionStorage
*
options_
;
/// Collection of parsers;
ParserCollection
parsers_
;
};
...
...
src/bin/dhcp4/dhcp4_srv.cc
View file @
20f13469
...
...
@@ -42,6 +42,18 @@ using namespace isc::dhcp;
using
namespace
isc
::
log
;
using
namespace
std
;
namespace
isc
{
namespace
dhcp
{
/// @brief file name of a server-id file
///
/// Server must store its server identifier in persistent storage that must not
/// change between restarts. This is name of the file that is created in dataDir
/// (see isc::dhcp::CfgMgr::getDataDir()). It is a text file that uses
/// regular IPv4 address, e.g. 192.0.2.1. Server will create it during
/// first run and then use it afterwards.
static
const
char
*
SERVER_ID_FILE
=
"b10-dhcp4-serverid"
;
// These are hardcoded parameters. Currently this is a skeleton server that only
// grants those options and a single, fixed, hardcoded lease.
...
...
@@ -717,3 +729,6 @@ Dhcpv4Srv::sanityCheck(const Pkt4Ptr& pkt, RequirementLevel serverid) {
;
}
}
}
// namespace dhcp
}
// namespace isc
src/bin/dhcp4/dhcp4_srv.h
View file @
20f13469
...
...
@@ -28,15 +28,6 @@
namespace
isc
{
namespace
dhcp
{
/// @brief file name of a server-id file
///
/// Server must store its server identifier in persistent storage that must not
/// change between restarts. This is name of the file that is created in dataDir
/// (see isc::dhcp::CfgMgr::getDataDir()). It is a text file that uses
/// regular IPv4 address, e.g. 192.0.2.1. Server will create it during
/// first run and then use it afterwards.
static
const
char
*
SERVER_ID_FILE
=
"b10-dhcp4-serverid"
;
/// @brief DHCPv4 server service.
///
/// This singleton class represents DHCPv4 server. It contains all
...
...
src/bin/dhcp4/tests/Makefile.am
View file @
20f13469
...
...
@@ -34,6 +34,10 @@ AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
CLEANFILES
=
$(builddir)
/interfaces.txt
$(builddir)
/logger_lockfile
AM_CXXFLAGS
=
$(B10_CXXFLAGS)
if
USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS
+=
-Wno-unused-parameter
endif
if
USE_STATIC_LINK
AM_LDFLAGS
=
-static
...
...
src/bin/dhcp6/Makefile.am
View file @
20f13469
...
...
@@ -6,6 +6,10 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/lib/cc -I$(top_builddir)/src/lib/cc
AM_CPPFLAGS
+=
$(BOOST_INCLUDES)
AM_CXXFLAGS
=
$(B10_CXXFLAGS)
if
USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS
+=
-Wno-unused-parameter
endif
if
USE_STATIC_LINK
AM_LDFLAGS
=
-static
...
...
src/bin/dhcp6/config_parser.cc
View file @
20f13469
...
...
@@ -996,13 +996,13 @@ public:
return
(
new
OptionDataListParser
(
param_name
));
}
/// Pointer to options instances storage.
OptionStorage
*
options_
;
/// Intermediate option storage. This storage is used by
/// lower level parsers to add new options. Values held
/// in this storage are assigned to main storage (options_)
/// if overall parsing was successful.
OptionStorage
local_options_
;
/// Pointer to options instances storage.
OptionStorage
*
options_
;
/// Collection of parsers;
ParserCollection
parsers_
;
};
...
...
src/bin/dhcp6/dhcp6_srv.cc
View file @
20f13469
...
...
@@ -56,6 +56,16 @@ using namespace std;
namespace
isc
{
namespace
dhcp
{
/// @brief file name of a server-id file
///
/// Server must store its duid in persistent storage that must not change
/// between restarts. This is name of the file that is created in dataDir
/// (see isc::dhcp::CfgMgr::getDataDir()). It is a text file that uses
/// double digit hex values separated by colons format, e.g.
/// 01:ff:02:03:06:80:90:ab:cd:ef. Server will create it during first
/// run and then use it afterwards.
static
const
char
*
SERVER_DUID_FILE
=
"b10-dhcp6-serverid"
;
Dhcpv6Srv
::
Dhcpv6Srv
(
uint16_t
port
)
:
alloc_engine_
(),
serverid_
(),
shutdown_
(
true
)
{
...
...
src/bin/dhcp6/dhcp6_srv.h
View file @
20f13469
...
...
@@ -31,16 +31,6 @@
namespace
isc
{
namespace
dhcp
{
/// @brief file name of a server-id file
///
/// Server must store its duid in persistent storage that must not change
/// between restarts. This is name of the file that is created in dataDir
/// (see isc::dhcp::CfgMgr::getDataDir()). It is a text file that uses
/// double digit hex values separated by colons format, e.g.
/// 01:ff:02:03:06:80:90:ab:cd:ef. Server will create it during first
/// run and then use it afterwards.
static
const
char
*
SERVER_DUID_FILE
=
"b10-dhcp6-serverid"
;
/// @brief DHCPv6 server service.
///
/// This class represents DHCPv6 server. It contains all
...
...
src/bin/dhcp6/tests/Makefile.am
View file @
20f13469
...
...
@@ -30,6 +30,10 @@ AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
CLEANFILES
=
$(builddir)
/interfaces.txt
$(builddir)
/logger_lockfile
AM_CXXFLAGS
=
$(B10_CXXFLAGS)
if
USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS
+=
-Wno-unused-parameter
endif
if
USE_STATIC_LINK
AM_LDFLAGS
=
-static
...
...
src/bin/dhcp6/tests/config_parser_unittest.cc
View file @
20f13469
...
...
@@ -277,9 +277,9 @@ public:
expected_data_len
));
}
int
rcode_
;
Dhcpv6Srv
srv_
;
int
rcode_
;
ConstElementPtr
comment_
;
string
valid_iface_
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment