Skip to content
Snippets Groups Projects
Commit c75d333c authored by Jan Trávníček's avatar Jan Trávníček
Browse files

enable and fix additional warnings for alib2measurepp

parent 06ad1b7e
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,8 @@ endef
 
export NEW_LINE
 
CXX_FLAGS := -Wall -pedantic -Wextra -Werror -Wshadow -Wpointer-arith -Wcast-qual -Wdelete-non-virtual-dtor -Wredundant-decls
space := $(eval) $(eval)
 
LDFLAGS_DEBUG:=-rdynamic -shared
......@@ -54,7 +56,7 @@ FORCE:
$${NEW_LINE}\
export NEW_LINE$${NEW_LINE}\
$${NEW_LINE}\
CXXFLAGS:= -pipe -std=c++11 \$$(CXX_OTHER_FLAGS) -c -Wall -pedantic -Wextra -Werror -fPIC \$$(addprefix -I, \$$(realpath $(INCLUDE_PATHS))) -I\$$(realpath \$$(SOURCES_BASE_DIR)/../src/)$${NEW_LINE}\
CXXFLAGS:= -pipe -std=c++11 \$$(CXX_OTHER_FLAGS) -c $(CXX_FLAGS) -fPIC \$$(addprefix -I, \$$(realpath $(INCLUDE_PATHS))) -I\$$(realpath \$$(SOURCES_BASE_DIR)/../src/)$${NEW_LINE}\
$${NEW_LINE}\
SOURCES:= \$$(shell find \$$(SOURCES_BASE_DIR)/\$$(SRCDIR) -maxdepth 1 -type f -name \"*.cpp\")$${NEW_LINE}\
DEPENDENCIES:= \$$(patsubst \$$(SOURCES_BASE_DIR)/\$$(SRCDIR)%.cpp, \$$(OBJECTS_BASE_DIR)/\$$(SRCDIR)%.d, \$$(SOURCES))$${NEW_LINE}\
......
......@@ -31,7 +31,7 @@ MeasurementProvisionerResults MeasurementProvisioner::runConfiguration ( const M
MPRInputResult mprir;
 
for ( const auto & mpsmPair : substitutionMap )
mprir.inputs.push_back ( { mpsmPair.first, mpiData.getMPIDHandle ( mpsmPair.second ).alias } );
mprir.inputs.push_back ( { mpsmPair.first, mpiData.getMPIDHandle ( mpsmPair.second ).m_alias } );
 
if ( inputCounter != 1 )
std::clog << std::endl << std::endl;
......@@ -40,7 +40,7 @@ MeasurementProvisionerResults MeasurementProvisioner::runConfiguration ( const M
std::clog << "| Input [" << inputCounter++ << "/" << inputCount << "]: " << std::endl;
 
for ( const auto & mpsmPair : substitutionMap )
std::clog << "| \t$" << mpsmPair.first << " -> " << mpiData.getMPIDHandle ( mpsmPair.second ).alias << std::endl;
std::clog << "| \t$" << mpsmPair.first << " -> " << mpiData.getMPIDHandle ( mpsmPair.second ).m_alias << std::endl;
 
std::clog << "| Pipelines:" << std::endl;
 
......
......@@ -10,12 +10,12 @@
 
namespace measurements {
 
MPInputDatum::MPInputDatum ( MPInputDatum::Type type, std::string filename, std::string alias ) : type ( type ), filename ( std::move ( filename ) ), alias ( std::move ( alias ) ) {
MPInputDatum::MPInputDatum ( MPInputDatum::Type type, std::string filename, std::string alias ) : m_type ( type ), m_filename ( std::move ( filename ) ), m_alias ( std::move ( alias ) ) {
}
 
MPInputDatum::~MPInputDatum ( ) {
if ( type == MPInputDatum::Type::GENERATOR )
unlink ( filename.c_str ( ) );
if ( m_type == MPInputDatum::Type::GENERATOR )
unlink ( m_filename.c_str ( ) );
}
 
/*---------------------------------------------------------------------------------------------------------------*/
......@@ -101,28 +101,28 @@ bool MPSubstitution::containsSubstitution ( const std::string & str ) {
 
/*---------------------------------------------------------------------------------------------------------------*/
 
MPPipelineCommand::MPPipelineCommand ( std::string str, std::string alias, bool measure ) : MPSubstitution ( str ), rawCommand ( std::move ( str ) ), alias ( std::move ( alias ) ), measure ( measure ) {
MPPipelineCommand::MPPipelineCommand ( std::string str, std::string alias, bool measure ) : MPSubstitution ( str ), m_rawCommand ( std::move ( str ) ), m_alias ( std::move ( alias ) ), m_measure ( measure ) {
}
 
std::string MPPipelineCommand::substitute ( const MPSubstitutionMap & substitutionMap ) const {
std::string res = MPSubstitution::substitute ( substitutionMap );
 
if ( measure )
if ( m_measure )
res += " -m";
 
return res;
}
 
const std::string & MPPipelineCommand::getRawCommand ( ) const {
return rawCommand;
return m_rawCommand;
}
 
const std::string & MPPipelineCommand::getAlias ( ) const {
return alias;
return m_alias;
}
 
bool MPPipelineCommand::getMeasure ( ) const {
return measure;
return m_measure;
}
 
/*---------------------------------------------------------------------------------------------------------------*/
......@@ -193,7 +193,7 @@ void MPInputData::insertMPInputDatum ( MPInputDatum::Type type, std::string file
return;
 
MPInputDatum mpid ( type, std::move ( filename ), std::move ( alias ) );
this->mpidHandles.emplace ( mpid.filename, std::move ( mpid ) );
this->mpidHandles.emplace ( mpid.m_filename, std::move ( mpid ) );
}
 
void MPInputData::processSimpleBatchFileData ( const MPCInputDatum & inputDatum, std::list < std::string > & mpidList ) {
......
......@@ -19,9 +19,9 @@ struct MPInputDatum {
FILE, GENERATOR
};
 
Type type;
std::string filename;
std::string alias;
Type m_type;
std::string m_filename;
std::string m_alias;
 
MPInputDatum ( const MPInputDatum & ) = delete;
MPInputDatum & operator =( const MPInputDatum & ) = delete;
......@@ -55,9 +55,9 @@ public:
};
 
class MPPipelineCommand : public MPSubstitution {
std::string rawCommand;
std::string alias;
bool measure;
std::string m_rawCommand;
std::string m_alias;
bool m_measure;
 
public:
MPPipelineCommand ( std::string, std::string, bool );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment