Skip to content

Commit

Permalink
Merge pull request #361 from mimesis-inria/fix_warnings
Browse files Browse the repository at this point in the history
[SofaFramework] FIX: compilation warnings
  • Loading branch information
Hugo authored Aug 9, 2017
2 parents d5843ca + cfb22bb commit 5a952b3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
10 changes: 5 additions & 5 deletions applications/plugins/CGALPlugin/MeshGenerationFromPolyhedron.inl
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void MeshGenerationFromPolyhedron<DataTypes>::update()
if (newPoints.empty())
bbmin = bbmax = p;
else
for (int c=0; c<p.size(); c++)
for (size_t c=0; c<p.size(); c++)
if (p[c] < bbmin[c]) bbmin[c] = p[c]; else if (p[c] > bbmax[c]) bbmax[c] = p[c];
newPoints.push_back(p);
}
Expand Down Expand Up @@ -403,7 +403,7 @@ void MeshGenerationFromPolyhedron<DataTypes>::update()
helper::vector< std::pair<int,int> > sortArray2;
for (int e=0; e<nbe; ++e)
{
int p = tetrahedra[e][0];
unsigned p = tetrahedra[e][0];
for (int i=0; i<4; i++)
if (tetrahedra[e][i] < p) p = tetrahedra[e][i];
sortArray2.push_back(std::make_pair(p,e));
Expand Down Expand Up @@ -438,7 +438,7 @@ void MeshGenerationFromPolyhedron<DataTypes>::draw(const sofa::core::visual::Vis

vparams->drawTool()->setLightingEnabled(false);
std::vector< defaulttype::Vector3 > points[4];
for(unsigned int i=0; i<tetrahedra.size(); ++i)
for(size_t i=0; i<tetrahedra.size(); ++i)
{
int a = tetrahedra[i][0];
int b = tetrahedra[i][1];
Expand Down Expand Up @@ -490,7 +490,7 @@ void MeshGenerationFromPolyhedron<DataTypes>::draw(const sofa::core::visual::Vis

vparams->drawTool()->setLightingEnabled(false);
std::vector< defaulttype::Vector3 > points;
for(unsigned int i=0; i<triangles.size(); ++i)
for(size_t i=0; i<triangles.size(); ++i)
{
int a = triangles[i][0];
int b = triangles[i][1];
Expand All @@ -502,7 +502,7 @@ void MeshGenerationFromPolyhedron<DataTypes>::draw(const sofa::core::visual::Vis
points.push_back(pb);
points.push_back(pc);
}
for(unsigned int i=0; i<quads.size(); ++i)
for(size_t i=0; i<quads.size(); ++i)
{
int a = quads[i][0];
int b = quads[i][1];
Expand Down
3 changes: 1 addition & 2 deletions applications/plugins/CImgPlugin/ImageCImg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ bool ImageCImg::load(std::string filename)
return false;
}

unsigned int width, height, depth, channels;
unsigned int width, height, channels;
width = cimgImage.width();
height = cimgImage.height();
depth = cimgImage.depth();
channels = cimgImage.spectrum();

Image::DataType dataType;
Expand Down
8 changes: 3 additions & 5 deletions applications/plugins/SofaPython/Binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,9 @@ void bindSofaPythonModule()

/// Custom Exception to embed
PyObject* PyExc_SofaException = PyErr_NewExceptionWithDoc(
"Sofa.SofaException", /* char *name */
"Base exception class for the SofaPython module.",
/* char *doc */
NULL, /* PyObject *base */
NULL /* PyObject *dict */);
(char*) "Sofa.SofaException",
(char*) "Base exception class for the SofaPython module.",
NULL, NULL);

if ( PyExc_SofaException )
PyModule_AddObject(PythonFactory::s_sofaPythonModule, "SofaException", PyExc_SofaException);
Expand Down
1 change: 1 addition & 0 deletions applications/plugins/SofaPython/Binding_BaseContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ static PyObject * BaseContext_getObject(PyObject * self, PyObject * args, PyObje
}

bool emitWarningMessage = true;

if (kw && PyDict_Size(kw)>0)
{
PyObject* keys = PyDict_Keys(kw);
Expand Down
6 changes: 5 additions & 1 deletion extlibs/CImg/CImg.h
Original file line number Diff line number Diff line change
Expand Up @@ -4196,7 +4196,11 @@ namespace cimg_library_suffixed {
but it does not open an extra console windows
on Windows-based systems.
**/
inline int system(const char *const command, const char *const module_name=0) {
inline int system(const char *const
#ifndef cimg_no_system_calls
command
#endif
, const char *const module_name=0) {
cimg::unused(module_name);
#ifdef cimg_no_system_calls
return -1;
Expand Down

0 comments on commit 5a952b3

Please sign in to comment.