yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12017
Re: Could you please fix warnings in Flow and ConcretePM ?
-
To:
Yade developers <yade-dev@xxxxxxxxxxxxxxxxxxx>
-
From:
Janek Kozicki <janek_listy@xxxxx>
-
Date:
Thu, 7 May 2015 19:03:45 +0200
-
Face:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUBAQEtLS1KSkpRUVFXV1dYWFhjY2Nzc3N3d3eHh4eKioqdnZ24uLjLy8vc3NxVIagyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2AIVEzgS1fgQtQAAAjRJREFUOMtt1DFv00AUAOAzFQNbjigSyoQaRaBMhKgLUyKXpVNNeUpk9vyDqFJhQ1kiBuaqAwJCqvPtSLY7RlTn5+5IdnYkkt/AOyfxXVLe5vf53Z1875kd34tOEax8djmj6GyjhB5bxz50GdsVZr9fqRjZwAtKOJw5Wqs2MMZ16ALHsaDncF7xAHix1oEFHAB8f+pRjcO4gfZDykcYzbiucRolOLUJ6kjA0xtVt+A6TySlM0RajIpK6DzwKZ/nOYbF/gclHMo1ZOHYY/+Ha+AWuM+3oMS4eeqYzZ8FiCltgUqI8cd2wwAVpJk+8LWYjBtnJdQpHQqJMd4Oxt4bU9ESiFGc5hkqaH74asAX4iabP5I5gZ+qjgGlJCqZa3h3lxhoeVcSE1qLQC4sqKOK9MGW9E3izFqqHokoztLFEgXg31sbZEKnWi2T74A4NxfVQqlkjKtcAWD+zcArFEES01dR0E/nnV0IgugmDd/2L84sOAouRBBHEc7gtc8teDkRlE0iNQPo2w3Xhh/D4TCIQ4LRLoTvgwjj6RRgavdurxYGMaIuGOyAW/PpNlCcU9/93AHenAWYjPoAwa+G3e3to/MgFNTAEKvKDjzuCzHTnY3qqdXtx24VijzQfZ0yewZ5cwRFQaa+mIYr1uI0I76+3W4xhlvoVRwOA0Fdl64HlJnxP6T8YpX/Lga4Wv4A3ErrU5oTfN7Mu/llXMl8RXEPji/lQkN3H7qXqgC2By47EXeU/7PJ/wPxRKMnuZwIeAAAAABJRU5ErkJggg==
-
In-reply-to:
<CANFfKpG_5kZSO=sUSvCLHoSiQS2tARZESHMWLHg9EN9C+iW-mw@mail.gmail.com>
Thanks Anton for fixing what you could. I notice that to remove the only two last warnings:
In file included from /home/salomea/yade/trunk/pkg/dem/PeriIsoCompressor.cpp:4:0:
/home/salomea/yade/trunk/pkg/dem/PeriIsoCompressor.hpp: In constructor ‘Peri3dController::Peri3dController()’:
/home/salomea/yade/trunk/pkg/dem/PeriIsoCompressor.hpp:118:1: warning: overflow in implicit constant conversion [-Woverflow]
/home/salomea/yade/trunk/pkg/dem/PeriIsoCompressor.hpp:118:1:
warning: overflow in implicit constant conversion [-Woverflow]
we need a following diff:
diff --git a/pkg/dem/PeriIsoCompressor.hpp b/pkg/dem/PeriIsoCompressor.hpp
index 94f141f..299d63a 100644
--- a/pkg/dem/PeriIsoCompressor.hpp
+++ b/pkg/dem/PeriIsoCompressor.hpp
@@ -109,8 +109,8 @@ class Peri3dController: public BoundaryController{
((Vector6i,ps,Vector6i::Zero(),Attr::readonly,"Peri3dController internal variable"))
((Vector6i,pathSizes,Vector6i::Zero(),Attr::readonly,"Peri3dController internal variable"))
((Vector6i,pathsCounter,Vector6i::Zero(),Attr::readonly,"Peri3dController internal variable"))
- ((int,lenPe,NaN,Attr::readonly,"Peri3dController internal variable"))
- ((int,lenPs,NaN,Attr::readonly,"Peri3dController internal variable"))
+ ((int,lenPe,,Attr::readonly,"Peri3dController internal variable"))
+ ((int,lenPs,,Attr::readonly,"Peri3dController internal variable"))
,
/*ctor*/
If you think it's acceptable, then please apply it. `git blame PeriIsoCompressor.hpp`
says we should ask Jan Stránský about this. Maybe instead of NaN put some number?
Or find a legal way to initialize to Nan?
best regards
Janek
Bruno Chareyre said: (by the date of Sun, 3 May 2015 14:48:51 +0200)
> Good idea Janek. Thanks.
> Bruno
>
> On 2 May 2015 at 13:00, Janek Kozicki <janek_listy@xxxxx> wrote:
>
> > Anton Gladky said: (by the date of Sat, 2 May 2015 08:13:46 +0200)
> >
> > > I recently raised the level of warnings, so not all of them are
> > > now fixed. Will try to fix it within the next several days.
> >
> > Thanks, maybe afterwards we could raise the level of warnings even more?
> > One very useful candidate is `-Wshadow`, because I also lost some
> > time trying to find a bug, which was caused by shadowing a variable
> > by mistake.
> >
> > But I see some warnings from eigen due to -Wshadow, I suppose we would
> > need to fix those warnings there also.
> >
> > --
> > Janek Kozicki http://janek.kozicki.pl/ |
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~yade-dev
> > Post to : yade-dev@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~yade-dev
> > More help : https://help.launchpad.net/ListHelp
> >
> >
--
Janek Kozicki http://janek.kozicki.pl/ |
Follow ups
References