Fixed a number of compiler warnings reported by clang on OS X 10.9.

This commit is contained in:
Tzanio 2014-09-22 14:12:24 -07:00
parent 1296137d0f
commit 99c0b471eb
36 changed files with 61 additions and 54 deletions

View File

@ -134,7 +134,7 @@ dgssv(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
*
*/
DNformat *Bstore;
SuperMatrix *AA;/* A in SLU_NC format used by the factorization routine.*/
SuperMatrix *AA=NULL;/* A in SLU_NC format used by the factorization routine.*/
SuperMatrix AC; /* Matrix postmultiplied by Pc */
int lwork = 0, *etree, i;

View File

@ -61,7 +61,7 @@ double dlangs(char *norm, SuperMatrix *A)
NCformat *Astore;
double *Aval;
int i, j, irow;
double value, sum;
double value=0.0, sum;
double *rwork;
Astore = A->Store;

View File

@ -213,7 +213,7 @@ int hypre_BiCGSSolve(void *bicgs_vdata, void *A, void *b, void *x)
int logging = (bicgs_data -> logging);
double *norms = (bicgs_data -> norms);
int ierr, my_id, num_procs, iter;
int ierr=0, my_id, num_procs, iter;
double rho1, rho2, sigma, alpha, dtmp, r_norm, b_norm;
double beta, epsilon;

View File

@ -893,7 +893,7 @@ int HYPRE_LSI_DDAMGSolve(HYPRE_ParCSRMatrix A_csr, HYPRE_ParVector x_csr,
{
int i, j, k, *row_partition, local_nrows, num_procs, rowSize;
int *colInd, *newColInd, rowCnt, eqnNum, *rowLengths;
int nnz, relaxType[4], maxRowSize, global_nrows;
int nnz=0, relaxType[4], maxRowSize, global_nrows;
int myBegin_int, myEnd_int, *itemp_vec, *itemp_vec2;
int local_intface_nrows, global_intface_nrows;
int num_iterations;

View File

@ -3905,7 +3905,7 @@ int MLI_FEData::readFromFile(char *infile)
int nodeNumFields, *nodeFieldIDs=NULL;
int elemNumFields, *elemFieldIDs=NULL;
int *nodeIDs=NULL, **IDLists=NULL, *numProcs=NULL, **procLists=NULL;
int spaceDim, *nodeIDAux=NULL, mypid;
int spaceDim=0, *nodeIDAux=NULL, mypid;
char **nodeBCFlags=NULL;
double *nodeCoords=NULL, **newCoords=NULL, **elemMat, **nodeBCVals;
char filename[80], inputString[256];;

View File

@ -99,14 +99,19 @@ class MLI_FEData : public MLI_FEBase
int numFields_;
int *fieldIDs_;
int *fieldSizes_;
// The private fields below appear to be unused
/*
int elemsAssembled_;
int nodesAssembled_;
int facesAssembled_;
void *USR_FEMatrixObj_;
*/
void *USR_FEGridObj_;
int (*USR_computeShapeFuncInterpolant)(void*, int eGlobalID,
int nNodes, const double *coord, double *coef);
void *USR_FEMatrixObj_;
int (*USR_getElemMatrix)(void*, int eGlobalID, int sMatDim,
double *stiffMat);

View File

@ -429,7 +429,7 @@ int MLI_Method_AMGCR::setNumLevels( int nlevels )
int MLI_Method_AMGCR::selectIndepSet(MLI_Matrix *mli_Amat, int **indepSet)
{
int irow, localNRows, numColsOffd, graphArraySize;
int *graphArray, *graphArrayOffd, *ISMarker, *ISMarkerOffd;
int *graphArray, *graphArrayOffd, *ISMarker, *ISMarkerOffd=NULL;
int nprocs, *ADiagI, *ADiagJ;
double *measureArray;
hypre_ParCSRMatrix *hypreA, *hypreS;
@ -1010,7 +1010,7 @@ MLI_Matrix *MLI_Method_AMGCR::createPmat(int *indepSet, MLI_Matrix *mli_Amat,
double *tPDiagA, *ADDiagA, *AD2DiagA, omega=1, dtemp;
char paramString[100];
HYPRE_IJMatrix IJInvD, IJP;
hypre_ParCSRMatrix *hypreA, *hypreAff, *hypreInvD, *hypreP, *hypreAD;
hypre_ParCSRMatrix *hypreA, *hypreAff, *hypreInvD, *hypreP=NULL, *hypreAD;
hypre_ParCSRMatrix *hypreAD2, *hypreAfc, *hypreTmp;
hypre_CSRMatrix *ADiag, *DDiag, *tPDiag, *ADDiag, *AD2Diag;
MLI_Function *funcPtr;

View File

@ -1486,7 +1486,7 @@ MLI_Matrix *MLI_Method_AMGRS::createPmat(int *indepSet, MLI_Matrix *mli_Amat,
double *tPDiagA, *ADDiagA, *AD2DiagA, omega=2.0/3.0, dtemp;
char paramString[100];
HYPRE_IJMatrix IJInvD, IJP;
hypre_ParCSRMatrix *hypreA, *hypreAff, *hypreInvD, *hypreP, *hypreAD;
hypre_ParCSRMatrix *hypreA, *hypreAff, *hypreInvD, *hypreP=NULL, *hypreAD;
hypre_ParCSRMatrix *hypreAD2, *hypreAfc, *hypreTmp;
hypre_CSRMatrix *ADiag, *DDiag, *tPDiag, *ADDiag, *AD2Diag;
MLI_Function *funcPtr;

View File

@ -386,7 +386,7 @@ int MLI_Solver_BJacobi::solve(MLI_Vector *f_in, MLI_Vector *u_in)
int MLI_Solver_BJacobi::setParams(char *paramString, int argc, char **argv)
{
int i;
double *weights;
double *weights=NULL;
char param1[200];
sscanf(paramString, "%s", param1);

View File

@ -559,7 +559,7 @@ int MLI_Solver_BSGS::solve(MLI_Vector *f_in, MLI_Vector *u_in)
int MLI_Solver_BSGS::setParams(char *paramString, int argc, char **argv)
{
int i;
double *weights;
double *weights=NULL;
char param1[200], param2[200];
sscanf(paramString, "%s", param1);

View File

@ -231,7 +231,7 @@ int MLI_Solver_GS::solve(MLI_Vector *fIn, MLI_Vector *uIn)
int MLI_Solver_GS::setParams(char *paramString, int argc, char **argv)
{
int i;
double *weights;
double *weights=NULL;
if ( !strcmp(paramString, "numSweeps") )
{
@ -276,7 +276,7 @@ int MLI_Solver_GS::setParams(char *paramString, int argc, char **argv)
int MLI_Solver_GS::setParams( int ntimes, double *weights )
{
int i, nsweeps;
int i, nsweeps=0;
if ( ntimes <= 0 )
{

View File

@ -79,7 +79,7 @@ int MLI_Solver_HSchwarz::solve(MLI_Vector *fIn, MLI_Vector *uIn)
int MLI_Solver_HSchwarz::setParams( char *paramString, int argc, char **argv )
{
double *weights;
double *weights=NULL;
char param1[100];
sscanf(paramString, "%s", param1);

View File

@ -120,7 +120,7 @@ int MLI_Solver_HSGS::solve(MLI_Vector *fIn, MLI_Vector *uIn)
int MLI_Solver_HSGS::setParams(char *paramString, int argc, char **argv)
{
double *weights;
double *weights=NULL;
char param1[100];
sscanf(paramString, "%s", param1);

View File

@ -27,7 +27,9 @@ class MLI_Solver_HSGS : public MLI_Solver
{
MLI_Matrix *Amat_;
int nSweeps_;
int printRNorm_;
// The private field below appears to be unused
// int printRNorm_;
int calcOmega_;
double relaxWeights_;
double relaxOmega_;

View File

@ -283,7 +283,7 @@ int MLI_Solver_Jacobi::solve(MLI_Vector *fIn, MLI_Vector *uIn)
int MLI_Solver_Jacobi::setParams( char *paramString, int argc, char **argv )
{
int i, *fList;
double *weights;
double *weights=NULL;
if ( !strcmp(paramString, "numSweeps") )
{

View File

@ -263,7 +263,7 @@ int MLI_Solver_MLS::solve(MLI_Vector *fIn, MLI_Vector *uIn)
/* Wtemp = coef * Vtemp */
for ( deg = 1; deg < deg; deg++ )
for ( deg = 1; deg < mlsDeg_; deg++ )
{
hypre_ParCSRMatrixMatvec(1.0, A, Vtemp, 0.0, Wtemp);
hypre_ParVectorCopy(Wtemp,Vtemp);

View File

@ -296,7 +296,7 @@ int MLI_Solver_SGS::solve(MLI_Vector *fIn, MLI_Vector *uIn)
int MLI_Solver_SGS::setParams( char *paramString, int argc, char **argv )
{
int i;
double *weights;
double *weights=NULL;
char param1[100], param2[100];
sscanf(paramString, "%s", param1);

View File

@ -352,7 +352,7 @@ int MLI_Utils_ComputeExtremeRitzValues(hypre_ParCSRMatrix *A, double *ritz,
double *ADiagA, one=1.0, *rData, *srdiag;
MPI_Comm comm;
hypre_CSRMatrix *ADiag;
hypre_ParVector *rVec, *zVec, *pVec, *apVec;
hypre_ParVector *rVec=NULL, *zVec, *pVec, *apVec;
double *pData, *apData;
@ -1225,7 +1225,7 @@ int MLI_Utils_ComputeLowEnergyLanczos(hypre_ParCSRMatrix *A,
double rnorm, *alphaArray, *rnormArray, **Tmat;
double one=1.0, *rData;
MPI_Comm comm;
hypre_ParVector *rVec, *zVec, *pVec, *apVec;
hypre_ParVector *rVec=NULL, *zVec, *pVec, *apVec;
double *lanczos, *lanczos_p, *Umat, *ptr, *Uptr, *curr_le_vector;
double rVecNorm;

View File

@ -1503,7 +1503,7 @@ void profileMat(Mat_dh A)
HYPRE_Int type;
HYPRE_Int m;
HYPRE_Int i, j;
HYPRE_Int *work1;
HYPRE_Int *work1=NULL;
HYPRE_Real *work2;
bool isStructurallySymmetric = true;
bool isNumericallySymmetric = true;

View File

@ -67,9 +67,9 @@ hypre_F90_IFACE(hypre_parreadvector, HYPRE_PARREADVECTOR)
{
*ierr = 0;
(void*) (hypre_ParReadVector(
hypre_F90_PassComm (comm),
(char *) file ));
hypre_ParReadVector(
hypre_F90_PassComm (comm),
(char *) file );
}
/*--------------------------------------------------------------------------
@ -115,9 +115,9 @@ hypre_F90_IFACE(hypre_parcsrmultivectorread, HYPRE_PARCSRMULTIVECTORREAD)
{
*ierr = 0;
(void *) hypre_ParCSRMultiVectorRead(
hypre_ParCSRMultiVectorRead(
hypre_F90_PassComm (comm),
(void *) ii,
(void *) ii,
(char *) file );
}

View File

@ -449,7 +449,7 @@ hypre_seqAMGCycle( hypre_ParAMGData *amg_data,
}
else
{
HYPRE_Real *local_data;
HYPRE_Real *local_data=NULL;
if (my_id == 0)
local_data = hypre_VectorData(hypre_ParVectorLocalVector(U_coarse));

View File

@ -2679,7 +2679,7 @@ hypre_BoomerAMGInterpTruncation( hypre_ParCSRMatrix *P,
HYPRE_Int next_open;
HYPRE_Int now_checking;
HYPRE_Int num_lost;
HYPRE_Int num_lost_global;
HYPRE_Int num_lost_global=0;
HYPRE_Int next_open_offd;
HYPRE_Int now_checking_offd;
HYPRE_Int num_lost_offd;
@ -4220,7 +4220,7 @@ hypre_BoomerAMGTruncandBuild( hypre_ParCSRMatrix *P,
HYPRE_Int *new_col_map_offd;
HYPRE_Int P_offd_size, new_num_cols_offd;
HYPRE_Int P_offd_size=0, new_num_cols_offd;
HYPRE_Int *P_marker;

View File

@ -579,7 +579,7 @@ hypre_BoomerAMG_MyCreateS(hypre_ParCSRMatrix *A,
/**
* Initialize the IJBuffer counters
**/
inline HYPRE_Int
static inline HYPRE_Int
hypre_NonGalerkinIJBufferInit( HYPRE_Int *ijbuf_cnt, /* See NonGalerkinIJBufferWrite for parameter descriptions */
HYPRE_Int *ijbuf_rowcounter,
HYPRE_Int *ijbuf_numcols )
@ -598,7 +598,7 @@ hypre_NonGalerkinIJBufferInit( HYPRE_Int *ijbuf_cnt, /* See NonGal
/**
* Update the buffer counters
**/
inline HYPRE_Int
static inline HYPRE_Int
hypre_NonGalerkinIJBufferNewRow(HYPRE_Int *ijbuf_rownums, /* See NonGalerkinIJBufferWrite for parameter descriptions */
HYPRE_Int *ijbuf_numcols,
HYPRE_Int *ijbuf_rowcounter,
@ -625,7 +625,7 @@ hypre_NonGalerkinIJBufferNewRow(HYPRE_Int *ijbuf_rownums, /* See NonGalerkin
/**
* Compress the current row in an IJ Buffer by removing duplicate entries
**/
inline HYPRE_Int
static inline HYPRE_Int
hypre_NonGalerkinIJBufferCompressRow( HYPRE_Int *ijbuf_cnt, /* See NonGalerkinIJBufferWrite for parameter descriptions */
HYPRE_Int ijbuf_rowcounter,
HYPRE_Real *ijbuf_data,
@ -667,7 +667,7 @@ hypre_NonGalerkinIJBufferCompressRow( HYPRE_Int *ijbuf_cnt, /* See Non
/**
* Compress the entire buffer, removing duplicate rows
**/
inline HYPRE_Int
static inline HYPRE_Int
hypre_NonGalerkinIJBufferCompress( HYPRE_Int ijbuf_size,
HYPRE_Int *ijbuf_cnt, /* See NonGalerkinIJBufferWrite for parameter descriptions */
HYPRE_Int *ijbuf_rowcounter,
@ -800,7 +800,7 @@ hypre_NonGalerkinIJBufferCompress( HYPRE_Int ijbuf_size,
* In effect, this buffers this operation
* A[row_to_write, col_to_write] += val_to_write
**/
inline HYPRE_Int
static inline HYPRE_Int
hypre_NonGalerkinIJBufferWrite( HYPRE_IJMatrix B, /* Unassembled matrix to add an entry to */
HYPRE_Int *ijbuf_cnt, /* current buffer size */
HYPRE_Int ijbuf_size, /* max buffer size */
@ -865,7 +865,7 @@ hypre_NonGalerkinIJBufferWrite( HYPRE_IJMatrix B, /* Unassembled
/**
* Empty the IJ Buffer with a final AddToValues.
**/
inline HYPRE_Int
static inline HYPRE_Int
hypre_NonGalerkinIJBufferEmpty(HYPRE_IJMatrix B, /* See NonGalerkinIJBufferWrite for parameter descriptions */
HYPRE_Int ijbuf_size,
HYPRE_Int *ijbuf_cnt,

View File

@ -2295,7 +2295,7 @@ HYPRE_Int hypre_BoomerAMG_LNExpandInterp( hypre_ParCSRMatrix *A,
{
/* keep and add to the q values (copy q)*/
value = aux_data[j_counter];
if ((is_q[j_counter] == (k+1)))
if (is_q[j_counter] == (k+1))
value += q_dist_value;
if (is_diag[j])

View File

@ -48,7 +48,7 @@ hypre_ParCSRBooleanMatrix *hypre_ParBooleanMatmul
hypre_ParCSRBooleanMatrix *C;
HYPRE_Int *col_map_offd_C;
HYPRE_Int *map_B_to_C;
HYPRE_Int *map_B_to_C=NULL;
hypre_CSRBooleanMatrix *C_diag;
HYPRE_Int *C_diag_i;

View File

@ -770,7 +770,7 @@ hypre_CSRBooleanMatrixToParCSRBooleanMatrix
HYPRE_Int *local_num_rows;
HYPRE_Int num_procs, my_id;
HYPRE_Int *local_num_nonzeros;
HYPRE_Int *local_num_nonzeros=NULL;
HYPRE_Int num_nonzeros;
HYPRE_Int *a_i;

View File

@ -353,7 +353,7 @@ hypre_ParCSRMatrix *hypre_ParMatmul( hypre_ParCSRMatrix *A,
hypre_ParCSRMatrix *C;
HYPRE_Int *col_map_offd_C;
HYPRE_Int *map_B_to_C;
HYPRE_Int *map_B_to_C=NULL;
hypre_CSRMatrix *C_diag;

View File

@ -1069,7 +1069,7 @@ hypre_CSRMatrixToParCSRMatrix( MPI_Comm comm,
HYPRE_Int *local_num_rows;
HYPRE_Int num_procs, my_id;
HYPRE_Int *local_num_nonzeros;
HYPRE_Int *local_num_nonzeros=NULL;
HYPRE_Int num_nonzeros;
HYPRE_Complex *a_data;

View File

@ -88,8 +88,8 @@ hypre_FacSetup2( void *fac_vdata,
/* coarsest grid solver */
HYPRE_Int csolver_type =(fac_data-> csolver_type);
HYPRE_SStructSolver crse_solver;
HYPRE_SStructSolver crse_precond;
HYPRE_SStructSolver crse_solver=NULL;
HYPRE_SStructSolver crse_precond=NULL;
HYPRE_Int max_level = hypre_FACDataMaxLevels(fac_data);
HYPRE_Int relax_type = fac_data -> relax_type;

View File

@ -139,7 +139,7 @@ hypre_MaxwellTV_Setup(void *maxwell_vdata,
hypre_BoxManager *node_boxman;
hypre_BoxManEntry *entry;
HYPRE_Int kstart, kend;
HYPRE_Int kstart=0, kend=0;
HYPRE_Int ilower, iupper;
HYPRE_Int jlower, jupper;
HYPRE_Int myproc;

View File

@ -98,7 +98,7 @@ hypre_Maxwell_Grad(hypre_SStructGrid *grid)
HYPRE_Int start_rank1, start_rank2, rank;
HYPRE_Int myproc;
HYPRE_Int ierr;
HYPRE_Int ierr=0;
hypre_BoxInit(&layer, ndim);
hypre_BoxInit(&interior_box, ndim);

View File

@ -307,7 +307,7 @@ hypre_SStructMatvecCompute( void *matvec_vdata,
hypre_SStructPMatvecCompute(pdata, alpha, pA, px, beta, py);
}
if ( (x_object_type == HYPRE_SSTRUCT) )
if (x_object_type == HYPRE_SSTRUCT)
{
/* do U-matrix computations */

View File

@ -37,7 +37,7 @@ hypre_PFMGCreateRAPOp( hypre_StructMatrix *R,
HYPRE_Int cdir,
HYPRE_Int rap_type )
{
hypre_StructMatrix *RAP;
hypre_StructMatrix *RAP=NULL;
hypre_StructStencil *stencil;
HYPRE_Int P_stored_as_transpose = 0;
HYPRE_Int constant_coefficient;

View File

@ -105,7 +105,7 @@ main( hypre_int argc,
HYPRE_Solver amg_solver;
HYPRE_Solver pcg_solver;
HYPRE_Solver pcg_precond, pcg_precond_gotten;
HYPRE_Solver pcg_precond=NULL, pcg_precond_gotten;
HYPRE_Int num_procs, myid;
HYPRE_Int local_row;
@ -4465,7 +4465,7 @@ BuildRhsParFromOneFile2(HYPRE_Int argc,
char *filename;
HYPRE_ParVector b;
HYPRE_Vector b_CSR;
HYPRE_Vector b_CSR=NULL;
HYPRE_Int myid;

View File

@ -54,8 +54,8 @@ main( hypre_int argc,
void *object;
HYPRE_IJMatrix ij_A;
HYPRE_IJVector ij_b;
HYPRE_IJVector ij_x;
HYPRE_IJVector ij_b=NULL;
HYPRE_IJVector ij_x=NULL;
HYPRE_IJVector ij_v;
HYPRE_ParCSRMatrix parcsr_A;
@ -1251,7 +1251,7 @@ BuildRhsParFromOneFile( HYPRE_Int argc,
char *filename;
HYPRE_ParVector b;
HYPRE_Vector b_CSR;
HYPRE_Vector b_CSR=NULL;
HYPRE_Int myid;

View File

@ -111,7 +111,7 @@ main( hypre_int argc,
HYPRE_Solver amg_solver;
HYPRE_Solver pcg_solver;
HYPRE_Solver pcg_precond, pcg_precond_gotten;
HYPRE_Solver pcg_precond=NULL, pcg_precond_gotten;
HYPRE_Int num_procs, myid;
HYPRE_Int num_threads;
@ -4874,7 +4874,7 @@ BuildRhsParFromOneFile( HYPRE_Int argc,
char *filename;
HYPRE_ParVector b;
HYPRE_Vector b_CSR;
HYPRE_Vector b_CSR=NULL;
HYPRE_Int myid;