Commit 598fc654 authored by Shawn Routhier's avatar Shawn Routhier
Browse files

[trac3706] Clean up some issues from cpp check

Remove or comment out some variables that aren't read after they are written.

Tag the process classes as noncopyable to avoid external code trying
to copy them and to avoid an issue for cpp check
parent cc1d69ea
......@@ -313,7 +313,10 @@ Pkt6::unpackMsg(OptionBuffer::const_iterator begin,
((*begin++) << 8) + (*begin++);
transid_ = transid_ & 0xffffff;
size -= sizeof(uint32_t); // We just parsed 4 bytes header
// See below about invoking Postel's law, as we aren't using
// size we don't need to update it. If we do so in the future
// perhaps for stats gathering we can uncomment this.
// size -= sizeof(uint32_t); // We just parsed 4 bytes header
OptionBuffer opt_buffer(begin, end);
// Copyright (C) 2011,2014 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011,2014,2015 Internet Systems Consortium, Inc. ("ISC")
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -80,7 +80,6 @@ void initLogger(isc::log::Severity severity, int dbglevel) {
// Root logger name is defined by the environment variable KEA_LOGGER_ROOT.
// If not present, the name is "kea".
const char* DEFAULT_ROOT = "kea";
const char* root = getenv("KEA_LOGGER_ROOT");
if (! root) {
// If not present, the name is "kea".
......@@ -30,7 +30,9 @@ namespace util {
/// avoid exposing the internals of the implementation, such as
/// custom handling of a SIGCHLD signal, and the conversion of the
/// arguments of the executable from the STL container to the array.
class ProcessSpawnImpl {
/// Made noncopyable to avoid problems with global operations
class ProcessSpawnImpl : boost::noncopyable {
/// @brief Constructor.
......@@ -16,6 +16,7 @@
#include <exceptions/exceptions.h>
#include <boost/noncopyable.hpp>
#include <string>
#include <sys/types.h>
#include <vector>
......@@ -53,10 +54,13 @@ typedef std::vector<std::string> ProcessArgs;
/// attempt to register a new SIGCHLD signal handler and, as a
/// consequence, the new @c ProcessSpawn object will fail to create.
/// Made noncopyable to avoid problems with global operations
/// @todo The SIGCHLD handling logic should be moved to the @c SignalSet
/// class so as multiple instances of the @c ProcessSpawn use the same
/// SIGCHLD signal handler.
class ProcessSpawn {
class ProcessSpawn : boost::noncopyable {
/// @brief Constructor.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment