Commit 79443cef authored by gsell's avatar gsell
Browse files

Merge branch '453-cleanup-make-optimizer-compile-with-wextra-and-werror' into 'master'

Resolve "cleanup: make optimizer compile with -Wextra and -Werror"

Closes #453

See merge request !268
parents 0bd62b10 83f21669
...@@ -32,7 +32,7 @@ class SocialNetworkGraph : public TopoDiscoveryStrategy_t { ...@@ -32,7 +32,7 @@ class SocialNetworkGraph : public TopoDiscoveryStrategy_t {
public: public:
std::set<size_t> execute(size_t numMasters, size_t dimensions, size_t id, std::set<size_t> execute(size_t numMasters, size_t dimensions, size_t id,
int island_id) { int /*island_id*/) {
numMasters_ = numMasters; numMasters_ = numMasters;
dim_ = dimensions; dim_ = dimensions;
......
...@@ -52,7 +52,7 @@ namespace client ...@@ -52,7 +52,7 @@ namespace client
} }
template <typename T> template <typename T>
void operator()(T& x) const void operator()(T& /*x*/) const
{ {
// no-op // no-op
} }
...@@ -74,4 +74,4 @@ namespace client ...@@ -74,4 +74,4 @@ namespace client
}; };
} }
#endif #endif
\ No newline at end of file
...@@ -35,10 +35,10 @@ namespace client { namespace code_gen ...@@ -35,10 +35,10 @@ namespace client { namespace code_gen
} }
bool operator()(ast::nil) { BOOST_ASSERT(0); return false; } bool operator()(ast::nil) { BOOST_ASSERT(0); return false; }
bool operator()(unsigned int x) { return true; } bool operator()(unsigned int /*x*/) { return true; }
bool operator()(double x) { return true; } bool operator()(double /*x*/) { return true; }
bool operator()(bool x) { return true; } bool operator()(bool /*x*/) { return true; }
bool operator()(ast::quoted_string const &x) { return true; } bool operator()(ast::quoted_string const & /*x*/) { return true; }
bool operator()(ast::operation const& x) { bool operator()(ast::operation const& x) {
if (!boost::apply_visitor(*this, x.operand_)) if (!boost::apply_visitor(*this, x.operand_))
...@@ -97,4 +97,5 @@ namespace client { namespace code_gen ...@@ -97,4 +97,5 @@ namespace client { namespace code_gen
}; };
}} }}
#endif #endif
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
template <class T> struct BlendCrossover template <class T> struct BlendCrossover
{ {
void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2, void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2,
CmdArguments_t args) { CmdArguments_t /*args*/) {
// BLX-0.5 performs better than BLX operators with any other \alpha // BLX-0.5 performs better than BLX operators with any other \alpha
// value // value
...@@ -34,4 +34,5 @@ template <class T> struct BlendCrossover ...@@ -34,4 +34,5 @@ template <class T> struct BlendCrossover
ind2->genes_m[i] = (1 - gamma2) * ming + gamma2 * maxg; ind2->genes_m[i] = (1 - gamma2) * ming + gamma2 * maxg;
} }
} }
}; };
\ No newline at end of file
...@@ -77,7 +77,7 @@ public: ...@@ -77,7 +77,7 @@ public:
/// serialization of structure /// serialization of structure
template<class Archive> template<class Archive>
void serialize(Archive & ar, const unsigned int version) { void serialize(Archive & ar, const unsigned int /*version*/) {
ar & genes_m; ar & genes_m;
ar & objectives_m; ar & objectives_m;
ar & id_m; ar & id_m;
...@@ -157,4 +157,5 @@ private: ...@@ -157,4 +157,5 @@ private:
constraints_t constraints_m; constraints_t constraints_m;
}; };
#endif #endif
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
template <class T> struct NaiveOnePointCrossover template <class T> struct NaiveOnePointCrossover
{ {
void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2, void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2,
CmdArguments_t args) { CmdArguments_t /*args*/) {
typedef typename T::genes_t genes_t; typedef typename T::genes_t genes_t;
genes_t genes_ind2; genes_t genes_ind2;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
template <class T> struct NaiveUniformCrossover template <class T> struct NaiveUniformCrossover
{ {
void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2, void crossover(boost::shared_ptr<T> ind1, boost::shared_ptr<T> ind2,
CmdArguments_t args) { CmdArguments_t /*args*/) {
Individual::genes_t genes_ind2 = ind2->genes_m; Individual::genes_t genes_ind2 = ind2->genes_m;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/// Mutate exactly one gene of an individual. /// Mutate exactly one gene of an individual.
template <class T> struct OneBitMutation template <class T> struct OneBitMutation
{ {
void mutate(boost::shared_ptr<T> ind, CmdArguments_t args) { void mutate(boost::shared_ptr<T> ind, CmdArguments_t /*args*/) {
int range = ind->genes_m.size(); int range = ind->genes_m.size();
int position = static_cast<int>((rand() / (RAND_MAX + 1.0)) * range); int position = static_cast<int>((rand() / (RAND_MAX + 1.0)) * range);
......
...@@ -216,7 +216,7 @@ private: ...@@ -216,7 +216,7 @@ private:
protected: protected:
void parseInputFile(functionDictionary_t known_expr_funcs, bool isOptimizationRun) { void parseInputFile(functionDictionary_t /*known_expr_funcs*/, bool isOptimizationRun) {
try { try {
input_file_ = cmd_args_->getArg<std::string>("inputfile", true); input_file_ = cmd_args_->getArg<std::string>("inputfile", true);
...@@ -679,4 +679,4 @@ protected: ...@@ -679,4 +679,4 @@ protected:
}; };
#endif #endif
\ No newline at end of file
...@@ -28,7 +28,7 @@ public: ...@@ -28,7 +28,7 @@ public:
pipeline_.push_back(component); pipeline_.push_back(component);
} }
void unregisterComponent(std::string name) { void unregisterComponent(std::string /*name*/) {
//TODO: set null @ idx //TODO: set null @ idx
} }
......
...@@ -53,7 +53,7 @@ typedef struct { ...@@ -53,7 +53,7 @@ typedef struct {
bool is_valid; bool is_valid;
template<class Archive> template<class Archive>
void serialize(Archive & ar, const unsigned int version) { void serialize(Archive & ar, const unsigned int /*version*/) {
ar & type; ar & type;
ar & value; ar & value;
ar & is_valid; ar & is_valid;
......
Markdown is supported
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