Commit 43241d8c authored by BRAMAS Berenger's avatar BRAMAS Berenger

Remove warnings

parent 1a587aa9
......@@ -226,7 +226,7 @@ protected:
double boxWidth; //< the box width read from file
int nbParticles; //< the number of particles read from file
double energy;
int removeWarning;
size_t removeWarning;
template<class Type>
Type readValue(){
......@@ -235,8 +235,8 @@ protected:
removeWarning = fread(&sizeBefore, sizeof(int), 1, file);
removeWarning = fread(&value, sizeof(Type), 1, file);
removeWarning = fread(&sizeAfter, sizeof(int), 1, file);
if( sizeBefore != sizeof(Type) ) printf("Error in loader ewal Size before %d should be %d\n", sizeBefore, sizeof(Type));
if( sizeAfter != sizeof(Type) ) printf("Error in loader ewal Size after %d should be %d\n", sizeAfter, sizeof(Type));
if( sizeBefore != sizeof(Type) ) printf("Error in loader ewal Size before %d should be %lu\n", sizeBefore, sizeof(Type));
if( sizeAfter != sizeof(Type) ) printf("Error in loader ewal Size after %d should be %lu\n", sizeAfter, sizeof(Type));
return value;
}
......@@ -246,8 +246,8 @@ protected:
removeWarning = fread(&sizeBefore, sizeof(int), 1, file);
removeWarning = fread(array, sizeof(Type), size, file);
removeWarning = fread(&sizeAfter, sizeof(int), 1, file);
if( sizeBefore != int(sizeof(Type) * size) ) printf("Error in loader ewal Size before %d should be %d\n", sizeBefore, size*sizeof(Type));
if( sizeAfter != int(sizeof(Type) * size) ) printf("Error in loader ewal Size after %d should be %d\n", sizeAfter, size*sizeof(Type));
if( sizeBefore != int(sizeof(Type) * size) ) printf("Error in loader ewal Size before %d should be %lu\n", sizeBefore, size*sizeof(Type));
if( sizeAfter != int(sizeof(Type) * size) ) printf("Error in loader ewal Size after %d should be %lu\n", sizeAfter, size*sizeof(Type));
return array;
}
......
......@@ -34,7 +34,7 @@
template <class ParticleClass>
class FRandomLoader : public FAbstractLoader<ParticleClass> {
protected:
const int nbParticles; //< the number of particles
const size_t nbParticles; //< the number of particles
const FReal boxWidth; //< the box width
const FPoint centerOfBox; //< The center of box
......@@ -42,7 +42,7 @@ public:
/**
* The constructor need the simulation data
*/
FRandomLoader(const int inNbParticles, const FReal inBoxWidth = 1.0,
FRandomLoader(const size_t inNbParticles, const FReal inBoxWidth = 1.0,
const FPoint& inCenterOfBox = FPoint(0,0,0), const unsigned int inSeed = static_cast<unsigned int>(0))
: nbParticles(inNbParticles), boxWidth(inBoxWidth), centerOfBox(inCenterOfBox) {
srand(inSeed);
......@@ -110,7 +110,7 @@ public:
template <class ParticleClass>
class FRandomLoaderTsm : public FRandomLoader<ParticleClass> {
public:
FRandomLoaderTsm(const int inNbParticles, const FReal inBoxWidth = 1.0,
FRandomLoaderTsm(const size_t inNbParticles, const FReal inBoxWidth = 1.0,
const FPoint& inCenterOfBox = FPoint(0,0,0), const unsigned int inSeed = static_cast<unsigned int>(time(NULL)))
: FRandomLoader<ParticleClass>(inNbParticles,inBoxWidth,inCenterOfBox,inSeed) {
}
......
......@@ -92,6 +92,10 @@ public:
/* empty */
}
virtual ~FAbstractChebKernel(){
// should not be used
}
const InterpolatorClass *const getPtrToInterpolator() const
{ return Interpolator.getPtr(); }
......
......@@ -38,6 +38,7 @@ enum KERNEL_FUNCTION_TYPE {HOMOGENEOUS, NON_HOMOGENEOUS};
*/
struct FChebAbstractMatrixKernel : FNoCopyable
{
virtual ~FChebAbstractMatrixKernel(){} // to remove warning
virtual FReal evaluate(const FPoint&, const FPoint&) const = 0;
// I need both functions because required arguments are not always given
virtual FReal getScaleFactor(const FReal, const int) const = 0;
......
......@@ -120,9 +120,9 @@ class FChebSymmetries
const unsigned int qidx = getQuadIdx(i,j,k);
// store absolut values of (i,j,k) in (u[0],u[1],u[2])
const int imask = i >> (sizeof(int)*CHAR_BIT-1);
const int jmask = j >> (sizeof(int)*CHAR_BIT-1);
const int kmask = k >> (sizeof(int)*CHAR_BIT-1);
const unsigned int imask = i >> (sizeof(int)*CHAR_BIT-1);
const unsigned int jmask = j >> (sizeof(int)*CHAR_BIT-1);
const unsigned int kmask = k >> (sizeof(int)*CHAR_BIT-1);
const unsigned int u[3] = {(i+imask)^imask, (j+jmask)^jmask, (k+kmask)^kmask};
// find right cone index
......
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