fixed some warnings

This commit is contained in:
Joachim Schoeberl 2014-08-15 14:46:26 +00:00
parent 5860d14132
commit 4de47bdbeb
7 changed files with 30 additions and 41 deletions

View File

@ -400,6 +400,14 @@ void Transpose (Vec3d & v1, Vec3d & v2, Vec3d & v3)
}
/*
gcc4.8.3 warning: array subscript is above array bounds [-Warray-bounds]
*/
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
int SolveLinearSystem (const Vec3d & col1, const Vec3d & col2,
const Vec3d & col3, const Vec3d & rhs,
Vec3d & sol)
@ -519,6 +527,11 @@ int SolveLinearSystem (const Vec3d & col1, const Vec3d & col2,
*/
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
int SolveLinearSystemLS (const Vec3d & col1,
const Vec3d & col2,

View File

@ -1592,7 +1592,7 @@ namespace netgen
surfelementht -> Set (i3, sei); // war das wichtig ??? sel.GetIndex());
}
int np = GetNP();
// int np = GetNP();
if (dimension == 3)
{

View File

@ -372,7 +372,6 @@ namespace netgen
static int timer2a = NgProfiler::CreateTimer ("topology::buildfacesa");
static int timer2b = NgProfiler::CreateTimer ("topology::buildfacesb");
static int timer2c = NgProfiler::CreateTimer ("topology::buildfacesc");
static int timer2d = NgProfiler::CreateTimer ("topology::buildfacesd");
NgProfiler::RegionTimer reg2 (timer2);
if (id == 0)

View File

@ -584,7 +584,9 @@ namespace netgen
glDisable (GL_TEXTURE_1D);
glEnable (GL_COLOR_MATERIAL);
GLfloat textcol[3] = { 1 - backcolor, 1 - backcolor, 1 - backcolor };
GLfloat textcol[3] = { GLfloat(1 - backcolor),
GLfloat(1 - backcolor),
GLfloat(1 - backcolor) };
glColor3fv (textcol);
glPushAttrib (GL_LIST_BIT);
@ -638,9 +640,9 @@ namespace netgen
glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);
GLfloat textcol[3] = { 1 - backcolor,
1 - backcolor,
1 - backcolor };
GLfloat textcol[3] = { GLfloat(1 - backcolor),
GLfloat(1 - backcolor),
GLfloat(1 - backcolor) };
glColor3fv (textcol);
glLineWidth (1.0f);
@ -710,9 +712,9 @@ namespace netgen
glDisable (GL_LIGHTING);
glEnable (GL_COLOR_MATERIAL);
GLfloat textcol[3] = { 1 - backcolor,
1 - backcolor,
1 - backcolor };
GLfloat textcol[3] = { GLfloat(1 - backcolor),
GLfloat(1 - backcolor),
GLfloat(1 - backcolor) };
glColor3fv (textcol);
glLineWidth (1.0f);

View File

@ -411,9 +411,9 @@ namespace netgen
vispar.drawelementnumbers)
{
// glEnable (GL_COLOR_MATERIAL);
GLfloat textcol[3] = { 1 - backcolor,
1 - backcolor,
1 - backcolor };
GLfloat textcol[3] = { float(1-backcolor),
float(1-backcolor),
float(1-backcolor) };
glColor3fv (textcol);
glNormal3d (0, 0, 1);
glPushAttrib (GL_LIST_BIT);
@ -1816,16 +1816,6 @@ namespace netgen
*/
};
static float tetcols_ghost[4][4];
for (int j = 0; j < 4; j++)
{
for (int i = 0; i < 3; i++)
tetcols_ghost[j][i] = tetcols[j][i];
tetcols_ghost[j][3] = 0.3;
}
CurvedElements & curv = mesh->GetCurvedElements();
@ -3099,10 +3089,8 @@ namespace netgen
MouseDblClickSelect(px,py,clipplane,backcolor,transformationmat,center,rad,
filledlist,selelement,selface,seledge,selpoint,selpoint2,locpi);
GLdouble modelview[16], projection[16];
GLdouble /* modelview[16], */ projection[16];
GLint viewport[4];
GLdouble result[3];

View File

@ -3678,7 +3678,7 @@ namespace netgen
{ 1, 2 }, { 1, 3 }, { 2, 3 } };
double edgelam[6];
Point<3> edgep[6];
// Point<3> edgep[6];
double nodevali[4];
int cntce;
@ -4540,7 +4540,7 @@ namespace netgen
for (int i = 0; i < vssolution.soldata.Size(); i++)
{
if ( (strlen (vssolution.soldata[i]->name) == pointpos-1) &&
if ( (strlen (vssolution.soldata[i]->name) == size_t(pointpos-1)) &&
(strncmp (vssolution.soldata[i]->name, scalname, pointpos-1) == 0) )
{
vssolution.scalfunction = i;

View File

@ -430,25 +430,12 @@ int Tcl_AppInit(Tcl_Interp * interp)
// from the ngsolve shared library
#ifdef LINKMKL
typedef long int integer;
#define F77_FUNC(func) func ## _
extern "C" integer F77_FUNC(pardisoinit)
(void *, integer *, integer *, integer *, double *, integer *);
extern "C" double ddot_(int *n, double *dx, int *incx, double *dy,
int *incy);
int mkldummy()
void mkldummy()
{
int n = 1, one = 1;
double a = 1, b = 1;
ddot_(&n, &a, &one, &b, &one);
/*
void * p;
integer li;
F77_FUNC(pardisoinit) (p, &li, &li, &li, &a, &li);
*/
}
#endif