Commit 1593bde8 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

removed unused func variables

parent a3f439ff
......@@ -108,7 +108,6 @@ void intlinarr(int nxm, double *ym, double *xm, int nx, double *y, double *x)
void intgrid(field_t *field1, field_t *field2)
{
static const char *func = "intgrid";
int nlonIn, nlatIn;
int nlonOut, nlatOut;
int ilat, ilon;
......@@ -225,7 +224,6 @@ void intgrid(field_t *field1, field_t *field2)
void intarea(field_t *field1, field_t *field2)
{
static const char *func = "intarea";
int gridsize_i, gridsize_o;
int gridIDi;
double *arrayIn;
......@@ -468,7 +466,6 @@ C
/* source code from pingo */
void interpolate(field_t *field1, field_t *field2)
{
static const char *func = "interpolate";
int i;
double *lono_array, *lato_array, *lono, *lato;
double *lon_array, *lat_array, *lon, *lat;
......@@ -974,8 +971,6 @@ void interpolate(field_t *field1, field_t *field2)
/* source code from pingo */
void contrast(void)
{
static const char *func = "contrast";
int rec = 1;
int nlat, nlon;
int i, j, size = 0;
......
......@@ -56,8 +56,6 @@ LIST *listNew(int type)
void listDelete(LIST *list)
{
static const char *func = "listDelete";
if ( list )
{
if ( list->array ) free(list->array);
......@@ -74,8 +72,6 @@ void *listArrayPtr(LIST *list)
static void listCheck(LIST *list, int num)
{
static const char *func = "listCheck";
while ( list->nalloc < (num+1) )
{
list->nalloc += list->allinc;
......
......@@ -54,8 +54,6 @@ void sort_par(long num_links, double *restrict add1, int parent, int par_depth)
sub-array within the original array
*/
const char func[] = "sort_par";
const int nsplit = 2; /* (only 2 allowed) number of segments to split
the data */
int nl[nsplit]; /* number of links in each sub-array */
......
......@@ -71,7 +71,6 @@ static void histBinValue(HISTOGRAM *hist, double value)
static void histBin(HISTOGRAM *hist)
{
static const char *func = "histBin";
int i;
double *values;
......@@ -237,7 +236,6 @@ void hsetCreateVarLevels(HISTOGRAM_SET *hset, int varID, int nlevels, int grid)
void hsetDestroy(HISTOGRAM_SET *hset)
{
static const char *func = "hsetDestroy";
int varID, levelID, histID, nhists;
if ( hset != NULL )
......
......@@ -36,7 +36,6 @@ static int PipeDebug = 0;
static
void pipe_init(pipe_t *pipe)
{
static const char *func = "pipe_init";
pthread_mutexattr_t m_attr;
pthread_condattr_t c_attr;
......@@ -118,7 +117,6 @@ void pipe_init(pipe_t *pipe)
pipe_t *pipeNew()
{
static const char *func = "pipeNew";
pipe_t *pipe;
pipe = (pipe_t *) malloc(sizeof(pipe_t));
......@@ -131,8 +129,6 @@ pipe_t *pipeNew()
void pipeDelete(pipe_t *pipe)
{
static const char *func = "pipeDelete";
if ( pipe )
{
if ( pipe->mutex ) free(pipe->mutex);
......
......@@ -126,9 +126,9 @@ void printFiletype(int streamID, int vlistID)
}
static void printGridInfo(int vlistID)
static
void printGridInfo(int vlistID)
{
static const char *func = "printGridInfo";
int ngrids, index;
int gridID, gridtype, trunc, gridsize, xsize, ysize;
int nbyte0;
......
......@@ -175,7 +175,6 @@ int processNums(void)
void processAddNvals(off_t nvals)
{
static const char *func = "processAddNvals";
int processID = processSelf();
Process[processID].nvals += nvals;
......@@ -184,7 +183,6 @@ void processAddNvals(off_t nvals)
off_t processInqNvals(int processID)
{
static const char *func = "processInqNvals";
off_t nvals = 0;
nvals = Process[processID].nvals;
......@@ -336,7 +334,6 @@ const char *processOperator(void)
static
char *getOperatorArg(const char *xoperator)
{
static const char *func = "getOperatorArg";
char *commapos;
char *operatorArg = NULL;
size_t len;
......@@ -459,7 +456,6 @@ int getStreamCnt(int argc, char *argv[])
static
void setStreamNames(int argc, char *argv[])
{
static const char *func = "setStreamNames";
int processID = processSelf();
int i;
int globArgc = 1;
......@@ -727,7 +723,6 @@ void operatorCheckArgc(int numargs)
void operatorInputArg(const char *enter)
{
static const char *func = "operatorInputArg";
char line[1024];
char *pline = line;
int processID = processSelf();
......
......@@ -98,8 +98,6 @@ static pstreamPtrToIdx *_pstreamAvail = NULL;
static
void pstream_list_new(void)
{
static const char *func = "pstream_list_new";
assert(_pstreamList == NULL);
_pstreamList = (pstreamPtrToIdx *) malloc(_pstream_max*sizeof(pstreamPtrToIdx));
......@@ -108,8 +106,6 @@ void pstream_list_new(void)
static
void pstream_list_delete(void)
{
static const char *func = "pstream_list_delete";
if ( _pstreamList ) free(_pstreamList);
}
......@@ -215,7 +211,6 @@ void pstream_init_entry(pstream_t *pstreamptr)
static
pstream_t *pstream_new_entry(void)
{
static const char *func = "pstream_new_entry";
pstream_t *pstreamptr;
pstreamptr = (pstream_t *) malloc(sizeof(pstream_t));
......@@ -946,7 +941,6 @@ const char *cdoComment(void)
static
void pstreamDefVarlist(pstream_t *pstreamptr, int vlistID)
{
static const char *func = "pstreamDefVarlist";
int varID, nvars;
int laddoffset, lscalefactor;
int datatype, filetype;
......
......@@ -356,7 +356,6 @@ void remapGridInitPointer(remapgrid_t *rg)
void remapGridRealloc(int map_type, remapgrid_t *rg)
{
static const char *func = "remapGridRealloc";
long nalloc;
if ( rg->grid1_nvgp )
......@@ -611,7 +610,6 @@ void check_lat_boundbox_range(long nlats, restr_t *restrict bound_box, double *r
void remapGridInit(int map_type, int lextrapolate, int gridID1, int gridID2, remapgrid_t *rg)
{
static const char *func = "remapGridInit";
char units[128];
int nbins;
long i4;
......@@ -1279,7 +1277,6 @@ void remapGridInit(int map_type, int lextrapolate, int gridID1, int gridID2, rem
*/
void remapVarsInit(int map_type, remapgrid_t *rg, remapvars_t *rv)
{
static const char *func = "remapVarsInit";
long i;
/* Initialize all pointer */
......@@ -1338,7 +1335,6 @@ void remapVarsInit(int map_type, remapgrid_t *rg, remapvars_t *rv)
*/
void resize_remap_vars(remapvars_t *rv, int increment)
{
static const char *func = "resize_remap_vars";
/*
Input variables:
int increment ! the number of links to add(subtract) to arrays
......@@ -1472,7 +1468,6 @@ void remap(double *restrict dst_array, double missval, long dst_size, long num_l
long get_max_add(long num_links, long size, const int *restrict add)
{
static const char *func = "get_max_add";
long n, i;
long max_add;
int *isum;
......@@ -1515,7 +1510,6 @@ void remap_laf(double *restrict dst_array, double missval, long dst_size, long n
*/
/* Local variables */
static const char *func = "remap_laf";
long i, n, k, ncls, imax;
long max_cls;
double wts;
......@@ -1673,7 +1667,6 @@ void remap_sum(double *restrict dst_array, double missval, long dst_size, long n
double *dst_array ! array for remapped field on destination grid
*/
/* Local variables */
static const char *func = "remap_sum";
long n;
for ( n = 0; n < dst_size; n++ ) dst_array[n] = missval;
......@@ -2649,8 +2642,6 @@ void store_link_nbr(remapvars_t *rv, int add1, int add2, double weights)
*/
void remap_distwgt(remapgrid_t *rg, remapvars_t *rv)
{
static const char *func = "remap_distwgt";
/* Local variables */
long grid1_size;
......@@ -2945,7 +2936,6 @@ void store_link_nbr1(remapvars_t *rv, int add1, int add2, double weights)
*/
void remap_distwgt1(remapgrid_t *rg, remapvars_t *rv)
{
static const char *func = "remap_distwgt";
/* Local variables */
long grid1_size;
......@@ -3074,7 +3064,6 @@ void pole_intersection(long *location, double *intrsct_lat, double *intrsct_lon,
int *luse_last, double *intrsct_x, double *intrsct_y,
int *avoid_pole_count, double *avoid_pole_offset)
{
static const char *func = "pole_intersection";
/*
Intent(in):
double beglat, beglon, ! beginning lat/lon endpoints for segment
......@@ -4030,7 +4019,6 @@ void line_integral(double *weights, int num_wts, double in_phi1, double in_phi2,
static
void grid_store_init(grid_store_t *grid_store, long gridsize)
{
const char func[] = "grid_store_init";
long iblk;
long blksize[] = {128, 256, 512, 1024, 2048, 4096, 8192};
long nblks = sizeof(blksize)/sizeof(long);
......@@ -4075,7 +4063,6 @@ void grid_store_init(grid_store_t *grid_store, long gridsize)
static
void store_link_cnsrv_fast(remapvars_t *rv, long add1, long add2, double *weights, grid_store_t *grid_store)
{
static const char *func = "store_link_cnsrv_fast";
/*
Input variables:
int add1 ! address on grid1
......@@ -4288,8 +4275,6 @@ void store_link_cnsrv(remapvars_t *rv, long add1, long add2, double *restrict we
*/
void remap_conserv(remapgrid_t *rg, remapvars_t *rv)
{
static const char *func = "remap_conserv";
/* local variables */
int lcheck = TRUE;
......@@ -4452,7 +4437,7 @@ void remap_conserv(remapgrid_t *rg, remapvars_t *rv)
shared(ompNumThreads, cdoTimer, nbins, grid1_centroid_lon, grid1_centroid_lat, \
grid_store, link_add1, link_add2, \
rv, cdoVerbose, max_subseg, \
grid1_corners, srch_corners, rg, grid2_size, grid1_size, func, srch_add2, lwarn) \
grid1_corners, srch_corners, rg, grid2_size, grid1_size, srch_add2, lwarn) \
private(ompthID, lmask, srch_add, min_add, max_add, n, n2, k, num_srch_cells, max_srch_cells, \
grid1_add, grid2_add, grid1_addm4, grid2_addm4, ioffset, nsrch_corners, corner, next_corn, beglat, beglon, \
endlat, endlon, lrevers, begseg, lbegin, num_subseg, srch_corner_lat, srch_corner_lon, \
......@@ -4724,7 +4709,7 @@ void remap_conserv(remapgrid_t *rg, remapvars_t *rv)
shared(ompNumThreads, cdoTimer, nbins, grid2_centroid_lon, grid2_centroid_lat, \
grid_store, link_add1, link_add2, \
rv, cdoVerbose, max_subseg, \
grid2_corners, srch_corners, rg, grid2_size, grid1_size, func, srch_add2, lwarn) \
grid2_corners, srch_corners, rg, grid2_size, grid1_size, srch_add2, lwarn) \
private(ompthID, lmask, srch_add, min_add, max_add, n, n2, k, num_srch_cells, max_srch_cells, grid1_addm4, grid2_addm4, \
grid1_add, grid2_add, ioffset, nsrch_corners, corner, next_corn, beglat, beglon, \
endlat, endlon, lrevers, begseg, lbegin, num_subseg, srch_corner_lat, srch_corner_lon, \
......@@ -5362,7 +5347,6 @@ void remap_conserv(remapgrid_t *rg, remapvars_t *rv)
void remap_stat(int remap_order, remapgrid_t rg, remapvars_t rv, const double *restrict array1,
const double *restrict array2, double missval)
{
static const char *func = "remap_stat";
long n, ns, i;
long idiff, imax, imin, icount;
int *grid2_count;
......@@ -5489,7 +5473,6 @@ void remap_stat(int remap_order, remapgrid_t rg, remapvars_t rv, const double *r
void remap_gradients(remapgrid_t rg, const double *restrict array, double *restrict grad1_lat,
double *restrict grad1_lon, double *restrict grad1_latlon)
{
static const char *func = "remap_gradients";
long n, nx, ny, grid1_size;
long i, j, ip1, im1, jp1, jm1, in, is, ie, iw, ine, inw, ise, isw;
double delew, delns;
......@@ -5687,7 +5670,6 @@ void remap_gradients(remapgrid_t rg, const double *restrict array, double *restr
void sort_add_test(long num_links, long num_wts, int *restrict add1, int *restrict add2, double *restrict *restrict weights)
{
static char *func = "sort_add_test";
/*
This routine sorts address and weight arrays based on the
destination address with the source address as a secondary
......@@ -6128,7 +6110,6 @@ void sort_add(long num_links, long num_wts, int *restrict add1, int *restrict ad
void reorder_links(remapvars_t *rv)
{
static const char *func = "reorder_links";
long j, nval = 0, num_blks = 0;
long lastval;
long nlinks;
......@@ -6586,7 +6567,6 @@ void read_remap_scrip(const char *interp_file, int gridID1, int gridID2, int *ma
/* Local variables */
static const char *func = "read_remap_scrip";
int status;
int nc_file_id; /* id for netCDF file */
int nc_srcgrdsize_id; /* id for source grid size */
......@@ -7058,8 +7038,6 @@ void sort_par(long num_links, long num_wts, int *restrict add1, int *restrict ad
*/
static const char *func = "sort_par";
const int nsplit = 2; /* (only 2 allowed) number of segments to split the data */
int nl[nsplit]; /* number of links in each sub-array */
int who_am_i,depth,my_depth; /* current depth, depth of children and index
......
......@@ -48,7 +48,6 @@ void geninx(long ntr, double *f, double *g)
void legini_old(int ntr, int nlat, double *poli, double *pold,
double *pol2, double *pol3, double *coslat, double *rcoslat, int flag)
{
static const char *func = "legini_old";
int waves, dimsp;
int jgl, jm, jn;
int jsp;
......@@ -122,7 +121,6 @@ void legini_old(int ntr, int nlat, double *poli, double *pold,
void legini(int ntr, int nlat, double *poli, double *pold, double *rcoslat)
{
static const char *func = "legini";
int waves, dimsp, dimpnm;
int jgl, jm, jn, is;
int isp, latn, lats;
......@@ -178,7 +176,6 @@ void legini(int ntr, int nlat, double *poli, double *pold, double *rcoslat)
void grid2spec(SPTRANS *sptrans, int gridIDin, double *arrayIn, int gridIDout, double *arrayOut)
{
static const char *func = "grid2spec";
int ntr, nlat, nlon, nfc;
int nlev = 1;
int waves;
......@@ -202,7 +199,6 @@ void grid2spec(SPTRANS *sptrans, int gridIDin, double *arrayIn, int gridIDout, d
void spec2grid(SPTRANS *sptrans, int gridIDin, double *arrayIn, int gridIDout, double *arrayOut)
{
static const char *func = "spec2grid";
int ntr, nlat, nlon, nfc;
int nlev = 1;
int waves;
......@@ -247,7 +243,6 @@ void speccut(int gridIDin, double *arrayIn, double *arrayOut, int *waves)
SPTRANS *sptrans_new(int nlon, int nlat, int ntr, int flag)
{
static const char *func = "sptrans_new";
SPTRANS *sptrans;
int dimsp;
......@@ -291,8 +286,6 @@ SPTRANS *sptrans_new(int nlon, int nlat, int ntr, int flag)
void sptrans_delete(SPTRANS *sptrans)
{
static const char *func = "sptrans_delete";
if ( sptrans )
{
if ( sptrans->trig ) { free(sptrans->trig); sptrans->trig = NULL; }
......@@ -310,7 +303,6 @@ void sptrans_delete(SPTRANS *sptrans)
DVTRANS *dvtrans_new(int ntr)
{
static const char *func = "dvtrans_new";
DVTRANS *dvtrans;
int dimsp;
......@@ -332,8 +324,6 @@ DVTRANS *dvtrans_new(int ntr)
void dvtrans_delete(DVTRANS *dvtrans)
{
static const char *func = "dvtrans_delete";
if ( dvtrans )
{
if ( dvtrans->f1 ) { free(dvtrans->f1); dvtrans->f1 = NULL; }
......
......@@ -66,7 +66,6 @@ void eigen_solution_of_symmetric_matrix (double **a, double *eig_val,
int n, int n_eig, const char *prompt)
/* After return the rows (!!!) of a are the eigenvectors */
{
static const char *func = "eigen_solution_of_symmetric_matrix";
double *e;
int i, j;
double temp;
......@@ -360,7 +359,6 @@ void eigen_solution_of_triangular_matrix (double *d, double *e, int n,
int solution_of_linear_equation (double **a, double *b, int n)
{
static const char *func = "solution_of_linear_equation";
int *index;
int sign;
int not_singular;
......@@ -380,7 +378,6 @@ int solution_of_linear_equation (double **a, double *b, int n)
int inverse_of_matrix (double **a, double **b, int n)
{
static const char *func = "inverse_of_matrix";
int *index;
int sign;
int i, j;
......@@ -413,7 +410,6 @@ int inverse_of_matrix (double **a, double **b, int n)
int lu_decomposition (double **a, int n, int *index, int *sign)
{
static const char *func = "decomposition";
int i, imax = 0, j, k;
double big, sum, temp;
double *v;
......@@ -568,7 +564,6 @@ void fft (double *real, double *imag, int n, int sign)
void ft (double *real, double *imag, int n, int sign)
{ /* sign should be 1 (FT) or -1 (reverse FT) */
static const char *func = "ft";
int j, k;
static double *work_r = 0, *work_i = 0;
double sum_r, sum_i, norm;
......@@ -1280,7 +1275,6 @@ void annihilate_1side(double **M, int i, int j, int k, int n)
double tk, ck, sk, alpha=0, beta=0, gamma=0, zeta=0;
double tmp, *mi=NULL, *mj=NULL;
const char func[] = "annihilate_1side";
int first_annihilation = 0;
int r;
......@@ -1339,10 +1333,9 @@ void annihilate_1side(double **M, int i, int j, int k, int n)
return;
}
int jacobi_1side(double **M, double *A, int n)
{
const char func[] = "jacobi_1side";
{
int i,j,k,m,r,i_ann,j_ann;
int n_iter = 0;
int idx;
......
......@@ -43,7 +43,6 @@ char *getProgname(char *string)
char *getOperator(const char *argument)
{
static const char *func = "getOperator";
char *operatorArg = NULL;
char *blankpos;
size_t len;
......@@ -70,7 +69,6 @@ char *operatorAlias(char *operatorName);
char *getOperatorName(const char *operatorArg)
{
static const char *func = "getOperatorName";
char *commapos;
char *operatorName = NULL;
size_t len;
......@@ -99,7 +97,6 @@ char *getOperatorName(const char *operatorArg)
char *makeArgument(int argc, char *argv[])
{
static const char *func = "makeArgument";
char *argument = NULL;
int iarg;
size_t len, pos = 0, off = 0;
......@@ -124,7 +121,6 @@ char *makeArgument(int argc, char *argv[])
char *getFileArg(char *argument)
{
static const char *func = "getFileArg";
char *fileArg = NULL;
char *parg;
char *blankpos;
......
Supports Markdown
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