Commit 0998d1e5 authored by Dave Moxey's avatar Dave Moxey
Browse files

Fixing some gcc compiler warnings

parent fa188640
......@@ -104,7 +104,7 @@ MACRO(SET_COMMON_PROPERTIES name)
IF( NOT MSVC )
SET(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-deprecated")
"${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-deprecated -Wno-sign-compare")
IF (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -fpermissive")
......
......@@ -57,7 +57,6 @@ int main(int argc, char *argv[])
}
// Set up the region shape and expansion types
StdRegions::ExpansionType regionShape = StdRegions::eHexahedron;
int bType_x_val = atoi(argv[1]);
int bType_y_val = atoi(argv[2]);
int bType_z_val = atoi(argv[3]);
......@@ -65,15 +64,12 @@ int main(int argc, char *argv[])
BasisType bType_x = static_cast<BasisType>( bType_x_val );
BasisType bType_y = static_cast<BasisType>( bType_y_val );
BasisType bType_z = static_cast<BasisType>( bType_z_val );
PointsType NodalType = LibUtilities::eNoPointsType;
if( (bType_x_val == 13) || (bType_y_val == 13) || (bType_z_val == 13) )
{
bType_x = LibUtilities::eOrtho_A;
bType_y = LibUtilities::eOrtho_B;
bType_z = LibUtilities::eOrtho_C;
NodalType = LibUtilities::eNodalTetElec;
}
if( (bType_x == eOrtho_B) || (bType_x == eModified_B) ) {
......
......@@ -63,15 +63,12 @@ int main(int argc, char *argv[])
LibUtilities::BasisType bType_x = static_cast<LibUtilities::BasisType>( bType_x_val );
LibUtilities::BasisType bType_y = static_cast<LibUtilities::BasisType>( bType_y_val );
LibUtilities::BasisType bType_z = static_cast<LibUtilities::BasisType>( bType_z_val );
LibUtilities::PointsType NodalType = LibUtilities::eNoPointsType;
if( (bType_x_val == 13) || (bType_y_val == 13) || (bType_z_val == 13) )
{
bType_x = LibUtilities::eOrtho_A;
bType_y = LibUtilities::eOrtho_B;
bType_z = LibUtilities::eOrtho_C;
NodalType = LibUtilities::eNodalTetElec;
}
// Check to see that correct Expansions are used
......
......@@ -70,7 +70,6 @@ int main(int argc, char *argv[])
// Define a segment expansion based on basis definition
const int zero=0;
const int one=1;
const int two=2;
const double dZero=0.0;
SpatialDomains::VertexComponentSharedPtr vert1 = MemoryManager<SpatialDomains::VertexComponent>::AllocateSharedPtr(one,zero,x[0],dZero,dZero);
SpatialDomains::VertexComponentSharedPtr vert2 = MemoryManager<SpatialDomains::VertexComponent>::AllocateSharedPtr(one,zero,x[1],dZero,dZero);
......
......@@ -21,7 +21,7 @@ int main(int argc, char *argv[])
{
int i;
int order1,order2, nq1,nq2,NodalTri = 0;
int order1,order2, nq1,nq2;
LibUtilities::PointsType Qtype1,Qtype2;
LibUtilities::BasisType btype1,btype2;
LibUtilities::PointsType NodalType;
......
......@@ -535,8 +535,6 @@ SpatialDomains::PrismGeomSharedPtr CreatePrismGeom(int argc, char *argv[])
// ////////////////////////////////////////////////////////////////////
// Set up Prism faces
const int nQFaces = 3;
const int nTFaces = 2;
const int nFaces = 5;
const int edgeConnectivity[][4] = {
{0,1,2,3},
......
......@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
int i;
int order1,order2, nq1,nq2,NodalTri = 0;
int order1,order2, nq1,nq2;
LibUtilities::PointsType Qtype1,Qtype2;
LibUtilities::BasisType btype1,btype2;
LibUtilities::PointsType NodalType;
......
......@@ -699,8 +699,6 @@ SpatialDomains::PrismGeomSharedPtr CreatePrismGeom(int argc, char *argv[])
// ////////////////////////////////////////////////////////////////////
// Set up Prism faces
const int nQFaces = 3;
const int nTFaces = 2;
const int nFaces = 5;
const int edgeConnectivity[][4] = {
{0,1,2,3},
......
......@@ -62,15 +62,12 @@ int main(int argc, char *argv[])
LibUtilities::BasisType bType_x = static_cast<LibUtilities::BasisType>( bType_x_val );
LibUtilities::BasisType bType_y = static_cast<LibUtilities::BasisType>( bType_y_val );
LibUtilities::BasisType bType_z = static_cast<LibUtilities::BasisType>( bType_z_val );
LibUtilities::PointsType NodalType = LibUtilities::eNoPointsType;
if( (bType_x_val == 13) || (bType_y_val == 13) || (bType_z_val == 13) )
{
bType_x = LibUtilities::eOrtho_A;
bType_y = LibUtilities::eOrtho_B;
bType_z = LibUtilities::eOrtho_C;
NodalType = LibUtilities::eNodalTetElec;
}
// Check to see that correct Expansions are used
......
......@@ -58,15 +58,12 @@ int main(int argc, char *argv[])
BasisType bType_x = static_cast<BasisType>( bType_x_val );
BasisType bType_y = static_cast<BasisType>( bType_y_val );
BasisType bType_z = static_cast<BasisType>( bType_z_val );
PointsType NodalType = eNoPointsType;
if( (bType_x_val == 13) || (bType_y_val == 13) || (bType_z_val == 13) )
{
bType_x = LibUtilities::eOrtho_A;
bType_y = LibUtilities::eOrtho_B;
bType_z = LibUtilities::eOrtho_C;
NodalType = LibUtilities::eNodalTetElec;
}
if( (bType_x == eOrtho_B) || (bType_x == eModified_B) ) {
......
......@@ -36,7 +36,6 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Define Expansion
int bc_val = 0;
int nzpoints;
NekDouble lz;
int FFT;
......@@ -75,7 +74,6 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Set up coordinates of mesh for Forcing function evaluation
int dim = Exp_u->GetCoordim(0);
int nq = Exp_u->GetTotPoints();
Array<OneD,NekDouble> xc0,xc1,xc2;
......
......@@ -35,7 +35,6 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Define Expansion
int bc_val = 0;
int nzpoints;
NekDouble lz;
int FFT;
......@@ -74,7 +73,6 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Set up coordinates of mesh for Forcing function evaluation
int dim = Exp_u->GetCoordim(0);
int nq = Exp_u->GetTotPoints();
Array<OneD,NekDouble> xc0,xc1,xc2;
......
......@@ -36,7 +36,6 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Define Expansion
int bc_val = 0;
int nypoints;
int nzpoints;
NekDouble ly;
......@@ -85,7 +84,6 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Set up coordinates of mesh for Forcing function evaluation
int dim = Exp_u->GetCoordim(0);
int nq = Exp_u->GetTotPoints();
Array<OneD,NekDouble> xc0,xc1,xc2;
......
......@@ -19,7 +19,7 @@ int main(int argc, char *argv[])
= LibUtilities::SessionReader::CreateInstance(argc, argv);
MultiRegions::ContField3DSharedPtr Exp,Fce;
int i, nq, coordim;
int nq, coordim;
Array<OneD,NekDouble> fce;
Array<OneD,NekDouble> xc0,xc1,xc2;
std::string meshfile(vSession->GetFilename());
......
......@@ -11,7 +11,7 @@ using namespace Nektar;
#ifdef TIMING
#include <time.h>
#define Timing(s) \
fprintf(stdout,"%s Took %g seconds\n",s,(clock()-st)/cps); \
fprintf(stdout,"%s Took %g seconds\n",s,(clock()-st)/(double)CLOCKS_PER_SEC); \
st = clock();
#else
#define Timing(s) \
......@@ -28,12 +28,11 @@ int main(int argc, char *argv[])
string meshfile(vSession->GetFilename());
MultiRegions::ContField2DSharedPtr Exp,Fce;
int i, nq, coordim;
int nq, coordim;
Array<OneD,NekDouble> fce;
Array<OneD,NekDouble> xc0,xc1,xc2;
NekDouble lambda;
NekDouble ax,ay;
NekDouble cps = (double)CLOCKS_PER_SEC;
if((argc != 2)&&(argc != 3))
{
......
......@@ -11,7 +11,7 @@
#ifdef TIMING
#include <time.h>
#define Timing(s) \
fprintf(stdout,"%s Took %g seconds\n",s,(clock()-st)/cps); \
fprintf(stdout,"%s Took %g seconds\n",s,(clock()-st)/(double)CLOCKS_PER_SEC); \
st = clock();
#else
#define Timing(s) \
......@@ -34,7 +34,6 @@ int main(int argc, char *argv[])
Array<OneD,NekDouble> fce;
Array<OneD,NekDouble> xc0,xc1,xc2;
StdRegions::ConstFactorMap factors;
NekDouble cps = (double)CLOCKS_PER_SEC;
if(argc != 2)
{
......
......@@ -11,7 +11,7 @@
#ifdef TIMING
#include <time.h>
#define Timing(s) \
fprintf(stdout,"%s Took %g seconds\n",s,(clock()-st)/cps); \
fprintf(stdout,"%s Took %g seconds\n",s,(clock()-st)/(double)CLOCKS_PER_SEC); \
st = clock();
#else
#define Timing(s) \
......@@ -33,7 +33,6 @@ int main(int argc, char *argv[])
Array<OneD,NekDouble> fce;
Array<OneD,NekDouble> xc0,xc1,xc2;
StdRegions::ConstFactorMap factors;
double st, cps = (double)CLOCKS_PER_SEC;
if(argc != 2)
{
......
......@@ -12,7 +12,7 @@
#ifdef TIMING
#include <time.h>
#define Timing(s) \
fprintf(stdout,"%s Took %g seconds\n",s,(clock()-st)/cps); \
fprintf(stdout,"%s Took %g seconds\n",s,(clock()-st)/(double)CLOCKS_PER_SEC); \
st = clock();
#else
#define Timing(s) \
......@@ -31,12 +31,11 @@ int main(int argc, char *argv[])
MultiRegions::DisContField3DHomogeneous1DSharedPtr Exp,Fce;
MultiRegions::ExpListSharedPtr DerExp1,DerExp2,DerExp3;
int i, nq, coordim;
int i, nq;
Array<OneD,NekDouble> fce;
Array<OneD,NekDouble> xc0,xc1,xc2;
StdRegions::ConstFactorMap factors;
NekDouble lz;
NekDouble cps = (double)CLOCKS_PER_SEC;
if(argc != 2)
{
......@@ -82,9 +81,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Set up coordinates of mesh for Forcing function evaluation
coordim = Exp->GetCoordim(0);
nq = Exp->GetTotPoints();
nq = Exp->GetTotPoints();
xc0 = Array<OneD,NekDouble>(nq,0.0);
xc1 = Array<OneD,NekDouble>(nq,0.0);
xc2 = Array<OneD,NekDouble>(nq,0.0);
......
......@@ -13,7 +13,7 @@ using namespace Nektar;
#ifdef TIMING
#include <time.h>
#define Timing(s) \
fprintf(stdout,"%s Took %g seconds\n",s,(clock()-st)/cps); \
fprintf(stdout,"%s Took %g seconds\n",s,(clock()-st)/(double)CLOCKS_PER_SEC); \
st = clock();
#else
#define Timing(s) \
......@@ -34,8 +34,6 @@ int main(int argc, char *argv[])
StdRegions::ConstFactorMap factors;
StdRegions::VarCoeffMap varcoeffs;
FlagList flags;
NekDouble cps = (double)CLOCKS_PER_SEC;
NekDouble st;
if( (argc != 2) && (argc != 3) && (argc != 4))
{
......
......@@ -20,7 +20,7 @@ int main(int argc, char *argv[])
string meshfile(argv[1]);
MultiRegions::ContField3DHomogeneous1DSharedPtr Exp, Fce;
int i, nq, coordim;
int i, nq;
Array<OneD,NekDouble> fce;
Array<OneD,NekDouble> xc0,xc1,xc2;
StdRegions::ConstFactorMap factors;
......@@ -39,7 +39,6 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Define Expansion
int bc_val = 0;
int nplanes = vSession->GetParameter("HomModesZ");
NekDouble lz = vSession->GetParameter("LZ");
bool useFFT = false;
......@@ -68,9 +67,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Set up coordinates of mesh for Forcing function evaluation
coordim = Exp->GetCoordim(0);
nq = Exp->GetTotPoints();
nq = Exp->GetTotPoints();
xc0 = Array<OneD,NekDouble>(nq,0.0);
xc1 = Array<OneD,NekDouble>(nq,0.0);
xc2 = Array<OneD,NekDouble>(nq,0.0);
......
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