Skip to content
Snippets Groups Projects
Commit f6eb57c9 authored by wenqing's avatar wenqing
Browse files

[Warning] Fixed some compilation warnings

parent fdc63b15
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
cmd.parse( argc, argv );
const std::string str_order = new_order_arg.getValue();
std::array<int, 3> new_order = {};
std::array<int, 3> new_order = {{}};
if (!parseNewOrder(str_order, new_order))
return EXIT_FAILURE;
......
......@@ -195,7 +195,8 @@ void operator()(EigenMatrix &matrix, SPARSITY_PATTERN const& sparsity_pattern)
"Set matrix sparsity relies on the EigenMatrix to be in "
"row-major storage order.");
assert(matrix.getNumberOfRows() == sparsity_pattern.size());
assert(matrix.getNumberOfRows()
== static_cast<EigenMatrix::IndexType>(sparsity_pattern.size()));
matrix.getRawMatrix().reserve(sparsity_pattern);
}
......
......@@ -129,7 +129,7 @@ void setMatrix(EigenMatrix& m,
auto const rows = m.getNumberOfRows();
auto const cols = m.getNumberOfColumns();
assert(values.size() == rows*cols);
assert(static_cast<EigenMatrix::IndexType>(values.size()) == rows*cols);
Eigen::MatrixXd tmp(rows, cols);
auto it = values.begin();
......@@ -153,7 +153,7 @@ void addToMatrix(EigenMatrix& m,
auto const rows = m.getNumberOfRows();
auto const cols = m.getNumberOfColumns();
assert(values.size() == rows*cols);
assert(static_cast<EigenMatrix::IndexType>(values.size()) == rows*cols);
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> tmp(rows, cols);
auto it = values.begin();
......
......@@ -68,7 +68,7 @@ template <int GlobalDim, template <typename, typename, typename, int>
class LocalAssemblerImplementation,
typename LocalAssemblerInterface, typename... ExtraCtorArgs>
void createLocalAssemblers(
const unsigned dimension,
const unsigned /*dimension*/,
std::vector<MeshLib::Element*> const& mesh_elements,
NumLib::LocalToGlobalIndexMap const& dof_table,
const unsigned shapefunction_order,
......
......@@ -138,6 +138,7 @@ void PostProcessTool::createProperties()
{
assert(new_prop->size() ==
_output_mesh->getNumberOfNodes() * n_dest_comp);
(void)(new_prop); // to avoid compilation warning.
}
else if (src_prop->getMeshItemType() == MeshLib::MeshItemType::Cell)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment