Commit 893c4954 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

removed unused func variables

parent 6c49ed03
......@@ -27,10 +27,10 @@ extern void Free (const char *caller, const char *file, int line, void *ptr
#endif
#if defined WITH_CALLER_NAME
# define realloc(p, s) Realloc(func, __FILE__, __LINE__, p, (size_t)s)
# define calloc(n, s) Calloc(func, __FILE__, __LINE__, n, (size_t)s)
# define malloc(s) Malloc(func, __FILE__, __LINE__, (size_t)s)
# define free(p) Free(func, __FILE__, __LINE__, p)
# define realloc(p, s) Realloc(__func__, __FILE__, __LINE__, p, (size_t)s)
# define calloc(n, s) Calloc(__func__, __FILE__, __LINE__, n, (size_t)s)
# define malloc(s) Malloc(__func__, __FILE__, __LINE__, (size_t)s)
# define free(p) Free(__func__, __FILE__, __LINE__, p)
#else
# define realloc(p, s) Realloc((void *) NULL, __FILE__, __LINE__, p, (size_t)s)
# define calloc(n, s) Calloc((void *) NULL, __FILE__, __LINE__, n, (size_t)s)
......
......@@ -119,7 +119,6 @@ void gauaw(int kn, double *pl, double *pw)
* Belousov, Swarztrauber, and ECHAM use zfn(0,0) = sqrt(2)
* IFS normalisation chosen to be 0.5*Integral(Pnm**2) = 1 (zfn(0,0) = 2.0)
*/
static const char *func = "gauaw";
double *zfn, *zfnlat;
double z, zfnn;
......
......@@ -38,7 +38,6 @@ const char *gribapiLibraryVersion(void)
void gribapiDefHandles(int streamID)
{
static const char *func = "gribapiDefHandles";
stream_t *streamptr = NULL;
int vlistID, ngrids, nzaxis, i;
......
......@@ -82,8 +82,6 @@ static gridPtrToIdx *_gridAvail = NULL;
static
void grid_list_new(void)
{
static const char *func = "grid_list_new";
assert(_gridList == NULL);
_gridList = (gridPtrToIdx *) malloc(_grid_max*sizeof(gridPtrToIdx));
......@@ -92,8 +90,6 @@ void grid_list_new(void)
static
void grid_list_delete(void)
{
static const char *func = "grid_list_delete";
if ( _gridList ) free(_gridList);
}
......@@ -237,7 +233,6 @@ void grid_init_entry(grid_t *gridptr)
static
grid_t *grid_new_entry(void)
{
static const char *func = "grid_new_entry";
grid_t *gridptr;
gridptr = (grid_t *) malloc(sizeof(grid_t));
......@@ -355,7 +350,6 @@ void gridGenXvals(int xsize, double xfirst, double xlast, double xinc, double *x
static
void calc_gaussgrid(double *yvals, int ysize, double yfirst, double ylast)
{
static const char *func = "calc_gaussgrid";
double *yw;
long yhsize;
long i;
......@@ -628,7 +622,6 @@ int gridCreate(int gridtype, int size)
*/
void gridDestroy(int gridID)
{
static const char *func = "gridDestroy";
grid_t *gridptr;
gridptr = grid_to_pointer(gridID);
......@@ -1341,7 +1334,6 @@ int gridInqYsize(int gridID)
*/
void gridDefRowlon(int gridID, int nrowlon, const int *rowlon)
{
static const char *func = "gridDefRowlon";
grid_t *gridptr;
gridptr = grid_to_pointer(gridID);
......@@ -2264,7 +2256,6 @@ int gridIsRotated(int gridID)
static
void compareXYvals(int gridID, long xsize, long ysize, double *xvals0, double *yvals0, int *differ)
{
static const char *func = "compareXYvals";
long i;
if ( gridInqXvals(gridID, NULL) )
......@@ -2635,7 +2626,6 @@ The function @func{gridDuplicate} duplicates a horizontal Grid.
*/
int gridDuplicate(int gridID)
{
static const char *func = "gridDuplicate";
int gridIDnew;
int gridtype, gridsize;
int nrowlon;
......@@ -3134,7 +3124,6 @@ double *gridInqYboundsPtr(int gridID)
void gridPrint(int gridID, int opt)
{
static const char *func = "gridPrint";
FILE *fp = stdout;
int type;
int gridsize, xsize, ysize, xdim, ydim;
......
......@@ -166,7 +166,6 @@ int institutInq(int center, int subcenter, const char *name, const char *longnam
int institutDef(int center, int subcenter, const char *name, const char *longname)
{
static const char *func = "institutDef";
int instID;
if ( ! InstitutsInit ) institutsInit();
......
......@@ -67,8 +67,6 @@ static modelPtrToIdx *_modelAvail = NULL;
static void model_list_new(void)
{
static const char *func = "model_list_new";
assert(_modelList == NULL);
_modelList = (modelPtrToIdx *) malloc(_model_max*sizeof(modelPtrToIdx));
......@@ -77,8 +75,6 @@ static void model_list_new(void)
static void model_list_delete(void)
{
static const char *func = "model_list_delete";
if ( _modelList ) free(_modelList);
}
......@@ -170,7 +166,6 @@ static void model_init_entry(MODEL *modelptr)
static MODEL *model_new_entry(void)
{
static const char *func = "model_new_entry";
MODEL *modelptr;
modelptr = (MODEL *) malloc(sizeof(MODEL));
......
......@@ -973,7 +973,6 @@ if ( streamID < 0 ) handle_error(streamID);
*/
int streamOpenRead(const char *filenames)
{
static const char *func = "streamOpenRead";
int filetype, byteorder;
int streamID;
int num_fnames;
......
......@@ -136,7 +136,6 @@ int get_timeunit(int len, char *ptu)
static
int isTimeUnits(const char *timeunits)
{
static const char *func = "isTimeUnits";
int len, i;
char *ptu, *tu;
int timetype = -1;
......@@ -289,7 +288,6 @@ int splitBasetime(const char *timeunits, taxis_t *taxis)
static
void cdfGetAttInt(int fileID, int ncvarid, char *attname, int attlen, int *attint)
{
static const char *func = "cdfGetAttInt";
size_t nc_attlen;
int *pintatt;
......@@ -313,7 +311,6 @@ void cdfGetAttInt(int fileID, int ncvarid, char *attname, int attlen, int *attin
#if defined (HAVE_LIBNETCDF)
static void cdfGetAttDouble(int fileID, int ncvarid, char *attname, int attlen, double *attdouble)
{
static const char *func = "cdfGetAttDouble";
size_t nc_attlen;
double *pdoubleatt;
......
......@@ -2370,7 +2370,6 @@ void gribapiDefLevel(grib_handle *gh, int param, int zaxisID, int levelID)
void *gribHandleNew()
{
static const char *func = "gribHandleNew";
void *gh = NULL;
#if defined (HAVE_LIBGRIB_API)
......
......@@ -10,7 +10,6 @@
void streamDefHistory(int streamID, int length, const char *history)
{
static const char *func = "streamDefHistory";
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
......
......@@ -257,8 +257,6 @@ static int _streamAvail = -1;
static
void stream_list_new(void)
{
static const char *func = "stream_list_new";
assert(_streamList == NULL);
_streamList = (streamPtrToIdx *) malloc(_stream_min*sizeof(streamPtrToIdx));
......@@ -441,7 +439,6 @@ void stream_init_entry(stream_t *streamptr)
stream_t *stream_new_entry(void)
{
static const char *func = "stream_new_entry";
stream_t *streamptr;
cdiInitialize(); /* ***************** make MT version !!! */
......
......@@ -101,7 +101,6 @@ int recordNewEntry(int streamID, int tsID)
void cdiInitRecord(int streamID)
{
static const char *func = "cdiInitRecord";
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
......
......@@ -44,7 +44,6 @@ void tableDefNum(int tableID, int tablenum);
void tableDefEntry(int tableID, int id, const char *name,
const char *longname, const char *units)
{
static const char *func = "tableDefEntry";
int item;
item = parTable[tableID].npars++;
......@@ -91,7 +90,6 @@ void parTableInitEntry(int tableID)
void tableGetPath(void)
{
static const char *func = "tableGetPath";
char *path;
path = getenv("TABLEPATH");
......@@ -337,7 +335,6 @@ int tableRead(const char *tablefile)
int tableFromEnv(int modelID, int tablenum)
{
static const char *func = "tableFromEnv";
int tableID = UNDEFID;
char tablename[256] = {'\0'};
int tablenamefound = 0;
......@@ -488,7 +485,6 @@ int tableInq(int modelID, int tablenum, const char *tablename)
int tableDef(int modelID, int tablenum, const char *tablename)
{
static const char *func = "tableDef";
int tableID = UNDEFID;
if ( ! ParTableInit ) parTableInit();
......
......@@ -118,8 +118,6 @@ static int _taxisAvail = -1;
static
void taxis_list_new(void)
{
static const char *func = "taxis_list_new";
assert(_taxisList == NULL);
_taxisList = (taxisPtrToIdx *) malloc(_taxis_min*sizeof(taxisPtrToIdx));
......@@ -128,8 +126,6 @@ void taxis_list_new(void)
static
void taxis_list_delete(void)
{
static const char *func = "taxis_list_delete";
if ( _taxisList ) free(_taxisList);
}
......@@ -271,7 +267,6 @@ void taxis_init_entry(taxis_t *taxisptr)
static
taxis_t *taxis_new_entry(void)
{
static const char *func = "taxis_new_entry";
taxis_t *taxisptr;
taxisptr = (taxis_t *) malloc(sizeof(taxis_t));
......
......@@ -107,7 +107,6 @@ int varGetEntry(int param, int zaxistype, int ltype)
void varFree(void)
{
static const char *func = "varFree";
int varID;
for ( varID = 0; varID < nvars; varID++ )
......@@ -613,8 +612,6 @@ void cdiGenVars(int streamID)
void varDefVCT(size_t vctsize, double *vctptr)
{
static const char *func = "varDefVCT";
if ( Vct == NULL && vctptr != NULL && vctsize > 0 )
{
Vctsize = vctsize;
......
......@@ -51,8 +51,6 @@ static int _vlistAvail = -1;
static
void vlist_list_new(void)
{
static const char *func = "vlist_list_new";
assert(_vlistList == NULL);
_vlistList = (vlistPtrToIdx *) malloc(_vlist_min*sizeof(vlistPtrToIdx));
......@@ -61,8 +59,6 @@ void vlist_list_new(void)
static
void vlist_list_delete(void)
{
static const char *func = "vlist_list_delete";
if ( _vlistList ) free(_vlistList);
}
......@@ -194,7 +190,6 @@ void vlist_init_entry(vlist_t *vlistptr)
static
vlist_t *vlist_new_entry(void)
{
static const char *func = "vlist_new_entry";
vlist_t *vlistptr;
vlistptr = (vlist_t *) malloc(sizeof(vlist_t));
......
......@@ -57,7 +57,6 @@ cdi_att_t *find_att(cdi_atts_t *attsp, const char *name)
static
cdi_att_t *new_att(cdi_atts_t *attsp, const char *name)
{
static const char *func = "new_att";
cdi_att_t *attp;
size_t slen;
......@@ -82,8 +81,6 @@ cdi_att_t *new_att(cdi_atts_t *attsp, const char *name)
static
void fill_att(cdi_att_t *attp, int indtype, int exdtype, size_t nelems, size_t xsz, const void *xvalue)
{
static const char *func = "fill_att";
assert(attp != NULL);
attp->xsz = xsz;
......@@ -185,7 +182,6 @@ int vlistInqAtt(int vlistID, int varID, int attnum, char *name, int *typep, int
int vlistDelAtts(int vlistID, int varID)
{
static const char *func = "vlistDelAtts";
int status = CDI_NOERR;
vlist_t *vlistptr;
cdi_att_t *attp = NULL;
......
......@@ -1230,7 +1230,6 @@ int vlistInqVarTimaccu(int vlistID, int varID)
void vlistDestroyVarName(int vlistID, int varID)
{
static const char *func = "vlistDestroyVarName";
vlist_t *vlistptr;
vlistptr = vlist_to_pointer(vlistID);
......@@ -1245,7 +1244,6 @@ void vlistDestroyVarName(int vlistID, int varID)
void vlistDestroyVarLongname(int vlistID, int varID)
{
static const char *func = "vlistDestroyVarLongname";
vlist_t *vlistptr;
vlistptr = vlist_to_pointer(vlistID);
......@@ -1260,7 +1258,6 @@ void vlistDestroyVarLongname(int vlistID, int varID)
void vlistDestroyVarStdname(int vlistID, int varID)
{
static const char *func = "vlistDestroyVarStdname";
vlist_t *vlistptr;
vlistptr = vlist_to_pointer(vlistID);
......@@ -1275,7 +1272,6 @@ void vlistDestroyVarStdname(int vlistID, int varID)
void vlistDestroyVarUnits(int vlistID, int varID)
{
static const char *func = "vlistDestroyVarUnits";
vlist_t *vlistptr;
vlistptr = vlist_to_pointer(vlistID);
......
......@@ -101,8 +101,6 @@ static zaxisPtrToIdx *_zaxisAvail = NULL;
static
void zaxis_list_new(void)
{
static const char *func = "zaxis_list_new";
assert(_zaxisList == NULL);
_zaxisList = (zaxisPtrToIdx *) malloc(_zaxis_max*sizeof(zaxisPtrToIdx));
......@@ -111,8 +109,6 @@ void zaxis_list_new(void)
static
void zaxis_list_delete(void)
{
static const char *func = "zaxis_list_delete";
if ( _zaxisList ) free(_zaxisList);
}
......@@ -213,7 +209,6 @@ void zaxis_init_entry(zaxis_t *zaxisptr)
static
zaxis_t *zaxis_new_entry(void)
{
static const char *func = "zaxis_new_entry";
zaxis_t *zaxisptr;
zaxisptr = (zaxis_t *) malloc(sizeof(zaxis_t));
......@@ -1142,7 +1137,6 @@ void zaxisChangeType(int zaxisID, int zaxistype)
void zaxisResize(int zaxisID, int size)
{
static const char *func = "zaxisResize";
zaxis_t *zaxisptr;
zaxisptr = zaxis_to_pointer(zaxisID);
......@@ -1158,7 +1152,6 @@ void zaxisResize(int zaxisID, int size)
int zaxisDuplicate(int zaxisID)
{
static const char *func = "zaxisDuplicate";
int zaxisIDnew;
int zaxistype, zaxissize;
int size;
......
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