From 56844001f57c1417938fd8a5a53b02ec3a334a63 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Mon, 6 Nov 2023 21:06:15 -0500 Subject: [PATCH] Replaced ancient K&R function declarations to be C23 compatible --- libdispatch/dcrc32.c | 5 +---- nc_perf/tst_ar4_4d.c | 3 +-- nc_perf/tst_utils.c | 3 +-- nctest/add.c | 31 +++++++------------------------ nctest/atttests.c | 24 +++++++++--------------- nctest/cdftests.c | 24 ++++++++---------------- nctest/dimtests.c | 12 ++++-------- nctest/emalloc.c | 7 ++----- nctest/rec.c | 38 +++++++++----------------------------- nctest/slabs.c | 23 +++++++++++------------ nctest/val.c | 34 +++++++++++++++++----------------- nctest/vardef.c | 3 +-- nctest/varget.c | 3 +-- nctest/vargetg.c | 3 +-- nctest/varput.c | 3 +-- nctest/varputg.c | 3 +-- nctest/vartests.c | 18 ++++++------------ nctest/vputget.c | 3 +-- nctest/vputgetg.c | 3 +-- 19 files changed, 83 insertions(+), 160 deletions(-) diff --git a/libdispatch/dcrc32.c b/libdispatch/dcrc32.c index d804774e3d..fb98a1b19d 100644 --- a/libdispatch/dcrc32.c +++ b/libdispatch/dcrc32.c @@ -260,10 +260,7 @@ local const z_crc_t FAR * ZEXPORT get_crc_table() #define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 /* ========================================================================= */ -local unsigned long ZEXPORT crc32_z(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - z_size_t len; +local unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, z_size_t len) { if (buf == Z_NULL) return 0UL; diff --git a/nc_perf/tst_ar4_4d.c b/nc_perf/tst_ar4_4d.c index 398686e608..85e1db4cd8 100644 --- a/nc_perf/tst_ar4_4d.c +++ b/nc_perf/tst_ar4_4d.c @@ -150,8 +150,7 @@ netcdf thetao_O1.SRESA1B_2.CCSM.ocnm.2000-01_cat_2099-12 { RESULT. Return 1 if the difference is negative, otherwise 0. This function from the GNU documentation. */ static int -timeval_subtract (result, x, y) - struct timeval *result, *x, *y; +timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y) { /* Perform the carry for the later subtraction by updating Y. */ if (x->tv_usec < y->tv_usec) { diff --git a/nc_perf/tst_utils.c b/nc_perf/tst_utils.c index 96a16294e8..b27f43373e 100644 --- a/nc_perf/tst_utils.c +++ b/nc_perf/tst_utils.c @@ -21,8 +21,7 @@ See \ref copyright file for more info. RESULT. Return 1 if the difference is negative, otherwise 0. This function from the GNU documentation. */ int -nc4_timeval_subtract (result, x, y) - struct timeval *result, *x, *y; +nc4_timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y) { /* Perform the carry for the later subtraction by updating Y. */ if (x->tv_usec < y->tv_usec) { diff --git a/nctest/add.c b/nctest/add.c index 5a6ee58d2a..0007baa139 100644 --- a/nctest/add.c +++ b/nctest/add.c @@ -23,9 +23,7 @@ struct netcdf test; /* */ void -add_dim (test, idim) /* add the dimension idim to the netcdf test */ - struct netcdf *test; - struct cdfdim *idim; +add_dim (struct netcdf *test, struct cdfdim *idim) /* add the dimension idim to the netcdf test */ { static char pname[] = "add_dim"; @@ -43,9 +41,7 @@ add_dim (test, idim) /* add the dimension idim to the netcdf test */ } void -add_var (test, ivar) /* add the variable ivar to the netcdf test */ - struct netcdf *test; - struct cdfvar *ivar; +add_var (struct netcdf *test, struct cdfvar *ivar) /* add the variable ivar to the netcdf test */ { static char pname[] = "add_var"; int i; @@ -68,10 +64,7 @@ add_var (test, ivar) /* add the variable ivar to the netcdf test */ } void -add_att (test, varid, iatt) /* add attribute iatt to the netcdf test */ - struct netcdf *test; - int varid; /* variable id */ - struct cdfatt *iatt; +add_att (struct netcdf *test, int varid, struct cdfatt *iatt) /* add attribute iatt to the netcdf test */ { static char pname[] = "add_att"; int ia; /* attribute number */ @@ -108,8 +101,7 @@ add_att (test, varid, iatt) /* add attribute iatt to the netcdf test */ void -add_reset(test) /* reset in-memory netcdf test to empty */ - struct netcdf *test; +add_reset(struct netcdf *test) /* reset in-memory netcdf test to empty */ { test->ndims = 0; test->nvars = 0; @@ -120,10 +112,7 @@ add_reset(test) /* reset in-memory netcdf test to empty */ void -del_att (test, varid, iatt) /* delete attribute iatt in the netcdf test */ - struct netcdf *test; - int varid; /* variable id */ - struct cdfatt *iatt; +del_att (struct netcdf *test, int varid, struct cdfatt *iatt) /* delete attribute iatt in the netcdf test */ { static char pname[] = "del_att"; int ia, ib; /* attribute number */ @@ -153,11 +142,7 @@ del_att (test, varid, iatt) /* delete attribute iatt in the netcdf test */ } void -add_data(test, varid, start, edges) /* keep max record written updated */ - struct netcdf *test; - int varid; - long start[]; - long edges[]; +add_data(struct netcdf *test, int varid, long start[], long edges[]) /* keep max record written updated */ { if (varid != test->xdimid) /* not a record variable */ return; @@ -167,9 +152,7 @@ add_data(test, varid, start, edges) /* keep max record written updated */ void -errvar(cdfp, varp) - struct netcdf *cdfp; - struct cdfvar *varp; +errvar(struct netcdf *cdfp, struct cdfvar *varp) { const char *types; int id; diff --git a/nctest/atttests.c b/nctest/atttests.c index f9d263ffeb..77079bb887 100644 --- a/nctest/atttests.c +++ b/nctest/atttests.c @@ -41,8 +41,7 @@ * try with bad netCDF handle, check error */ int -test_ncattput(path) - const char *path; /* name of writable netcdf file to open */ +test_ncattput(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncattput"; @@ -341,8 +340,7 @@ test_ncattput(path) * try with bad netCDF handle, check error */ int -test_ncattinq(path) - const char *path; /* name of writable netcdf file to open */ +test_ncattinq(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncattinq"; @@ -456,8 +454,7 @@ test_ncattinq(path) * try with bad netCDF handle, check error */ int -test_ncattget(path) - const char *path; /* name of writable netcdf file to open */ +test_ncattget(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; int cdfid; /* netcdf id */ @@ -627,10 +624,10 @@ test_ncattget(path) * try with bad source or target netCDF handles, check error * try with bad source or target variable handle, check error */ +/* path1: name of input netcdf file to open */ +/* path2: name of output netcdf file to create */ int -test_ncattcopy(path1, path2) - const char *path1; /* name of input netcdf file to open */ - const char *path2; /* name of output netcdf file to create */ +test_ncattcopy(const char *path1, const char *path2) { int nerrs = 0; static char pname[] = "test_ncattcopy"; @@ -905,8 +902,7 @@ test_ncattcopy(path1, path2) * try with bad attribute number, check error */ int -test_ncattname(path) - const char *path; /* name of writable netcdf file to open */ +test_ncattname(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncattname"; @@ -1091,8 +1087,7 @@ test_ncattname(path) * try with bad netCDF handle, check error */ int -test_ncattrename(path) - const char *path; /* name of writable netcdf file to open */ +test_ncattrename(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncattrename"; @@ -1234,8 +1229,7 @@ test_ncattrename(path) * try in data mode, check error */ int -test_ncattdel(path) - const char *path; /* name of writable netcdf file to open */ +test_ncattdel(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncattdel"; diff --git a/nctest/cdftests.c b/nctest/cdftests.c index 5f3a637cea..aaab75bafc 100644 --- a/nctest/cdftests.c +++ b/nctest/cdftests.c @@ -28,8 +28,7 @@ * Uses: nccreate, ncendef, ncclose, ncopen. */ int -test_nccreate(path) - const char *path; /* name of netCDF file to create */ +test_nccreate(const char *path) /* name of netCDF file to create */ { int nerrs = 0; static char pname[] = "test_nccreate"; @@ -94,8 +93,7 @@ test_nccreate(path) #define DATA_LEN 32 #define TEMP_FILE_NAME "temp.tmp" int -test_ncopen(path) - const char *path; /* name of writable netcdf file to open */ +test_ncopen(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncopen"; @@ -240,8 +238,7 @@ test_ncopen(path) * Uses: ncopen, ncredef, ncdimdef, ncvardef, ncattput, ncclose */ int -test_ncredef(path) - const char *path; /* name of writable netcdf file to open */ +test_ncredef(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncredef"; @@ -328,8 +325,7 @@ test_ncredef(path) * Uses: ncopen, ncredef, ncdimdef, ncvardef, ncattput, ncendef, ncclose */ int -test_ncendef(path) - const char *path; /* name of writable netcdf file to open */ +test_ncendef(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncendef"; @@ -422,8 +418,7 @@ test_ncendef(path) * On exit netcdf files are closed. */ int -test_ncclose(path) - const char *path; /* name of writable netcdf file to open */ +test_ncclose(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncclose"; @@ -476,8 +471,7 @@ test_ncclose(path) * On exit netcdf files are closed. */ int -test_ncinquire(path) - const char *path; /* name of writable netcdf file to open */ +test_ncinquire(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncinquire"; @@ -640,8 +634,7 @@ test_ncinquire(path) * On exit netcdf files are closed. */ int -test_ncsync(path) - const char *path; /* name of writable netcdf file to open */ +test_ncsync(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncsync"; @@ -781,8 +774,7 @@ test_ncsync(path) * On exit netcdf files are closed. */ int -test_ncabort(path) - const char *path; /* name of writable netcdf file to open */ +test_ncabort(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncabort"; diff --git a/nctest/dimtests.c b/nctest/dimtests.c index 26bce98d2b..4e3ae4187b 100644 --- a/nctest/dimtests.c +++ b/nctest/dimtests.c @@ -25,8 +25,7 @@ * try to define a second unlimited dimension, check error */ int -test_ncdimdef(path) - const char *path; /* name of writable netcdf to open */ +test_ncdimdef(const char *path) /* name of writable netcdf to open */ { int nerrs = 0; static char pname[] = "test_ncdimdef"; @@ -129,8 +128,7 @@ test_ncdimdef(path) * try with bad handle, check error */ int -test_ncdimid(path) - const char *path; /* name of writable netcdf file to open */ +test_ncdimid(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncdimid"; @@ -206,8 +204,7 @@ test_ncdimid(path) * try with bad netCDF handle, check error */ int -test_ncdiminq(path) - const char *path; /* name of writable netcdf file to open */ +test_ncdiminq(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncdiminq"; @@ -303,8 +300,7 @@ test_ncdiminq(path) * try with bad netCDF handle, check error */ int -test_ncdimrename(path) - const char *path; /* name of writable netcdf file to open */ +test_ncdimrename(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncdimrename"; diff --git a/nctest/emalloc.c b/nctest/emalloc.c index 05dc1c51c6..570a419a78 100644 --- a/nctest/emalloc.c +++ b/nctest/emalloc.c @@ -12,8 +12,7 @@ #include "emalloc.h" void * -emalloc (size) /* check return from malloc */ - size_t size; +emalloc (size_t size) /* check return from malloc */ { void *p; @@ -32,9 +31,7 @@ emalloc (size) /* check return from malloc */ } void * -erealloc (ptr, size) /* check return from realloc */ - void *ptr; - size_t size; +erealloc (void *ptr, size_t size) /* check return from realloc */ { void *p; diff --git a/nctest/rec.c b/nctest/rec.c index a56c6aafde..6dc1484b7a 100644 --- a/nctest/rec.c +++ b/nctest/rec.c @@ -20,9 +20,7 @@ * error. */ static int -numrecvars(ncid, recvarids) - int ncid; - int *recvarids; +numrecvars(int ncid, int *recvarids) { int ndims, iv, nvars; int nrecvars; @@ -52,9 +50,7 @@ numrecvars(ncid, recvarids) * variable id. Returns 0 if not a record variable. Returns -1 on error. */ static long -ncrecsize(ncid,vid) - int ncid; - int vid; +ncrecsize(int ncid,int vid) { int recdimid; nc_type type; @@ -87,11 +83,7 @@ ncrecsize(ncid,vid) * errors better. */ static int -recinq(ncid, nrecvars, recvarids, recsizes) - int ncid; - int *nrecvars; - int *recvarids; - long *recsizes; +recinq(int ncid, int *nrecvars, int *recvarids, long *recsizes) { int iv; int rvarids[MAX_NC_VARS]; @@ -119,8 +111,7 @@ recinq(ncid, nrecvars, recvarids, recsizes) * try with bad netCDF handle, check error */ int -test_ncrecinq(path) - const char *path; /* name of netcdf file to open */ +test_ncrecinq(const char *path) /* name of netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncrecinq"; @@ -225,10 +216,7 @@ test_ncrecinq(path) * an open netCDF file. Returns -1 on error. */ static int -dimsizes(ncid, varid, sizes) - int ncid; - int varid; - long *sizes; +dimsizes(int ncid, int varid, long *sizes) { int ndims; int id; @@ -251,10 +239,7 @@ dimsizes(ncid, varid, sizes) * better. */ static int -recput(ncid, recnum, datap) - int ncid; - long recnum; - void **datap; +recput(int ncid, long recnum, void **datap) { int iv; int rvids[MAX_NC_VARS]; @@ -288,10 +273,7 @@ recput(ncid, recnum, datap) * better. */ static int -recget(ncid, recnum, datap) - int ncid; - long recnum; - void **datap; +recget(int ncid, long recnum, void **datap) { int iv; int rvids[MAX_NC_VARS]; @@ -327,8 +309,7 @@ recget(ncid, recnum, datap) * try with bad netCDF handle, check error */ int -test_ncrecput(path) - const char *path; /* name of writable netcdf file to open */ +test_ncrecput(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncrecput"; @@ -485,8 +466,7 @@ test_ncrecput(path) * try with bad netCDF handle, check error */ int -test_ncrecget(path) - const char *path; /* name of netcdf file to open */ +test_ncrecget(const char *path) /* name of netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncrecget"; diff --git a/nctest/slabs.c b/nctest/slabs.c index 48b4d1de7e..f6992ca8e2 100644 --- a/nctest/slabs.c +++ b/nctest/slabs.c @@ -30,12 +30,12 @@ * * v[ii] = val; */ +/* type: netcdf type of v, NC_BYTE, ..., NC_DOUBLE */ +/* v: array of specified type */ +/* ii: it's v[ii] we want to store into */ +/* val: value to store */ static void -val_stuff(type, v, ii, val) /* v[ii] = val */ - nc_type type; /* netcdf type of v, NC_BYTE, ..., NC_DOUBLE */ - void *v; /* array of specified type */ - int ii; /* it's v[ii] we want to store into */ - long val; /* value to store */ +val_stuff(nc_type type, void *v, int ii, long val) /* v[ii] = val */ { static char pname[] = "val_stuff"; @@ -70,12 +70,12 @@ val_stuff(type, v, ii, val) /* v[ii] = val */ * returns 0 if equal, 1 if not equal */ +/* type: netcdf type of v, NC_BYTE, ..., NC_DOUBLE */ +/* v: array of specified type */ +/* ii: it's v[ii] we want to compare */ +/* val: value to compare with */ static int -val_diff(type, v, ii, val) /* v[ii] != val */ - nc_type type; /* netcdf type of v, NC_BYTE, ..., NC_DOUBLE */ - void *v; /* array of specified type */ - int ii; /* it's v[ii] we want to compare */ - long val; /* value to compare with */ +val_diff(nc_type type, void *v, int ii, long val) /* v[ii] != val */ { static char pname[] = "val_diff"; @@ -109,8 +109,7 @@ val_diff(type, v, ii, val) /* v[ii] != val */ */ int -test_slabs(cdfid) - int cdfid; /* handle of netcdf open and in data mode */ +test_slabs(int cdfid) /* handle of netcdf open and in data mode */ { int nerrs = 0; static char pname[] = "test_slabs"; diff --git a/nctest/val.c b/nctest/val.c index b7d27820d3..247f339959 100644 --- a/nctest/val.c +++ b/nctest/val.c @@ -13,11 +13,11 @@ /* fill typed value block with values of specified type */ +/* type: netcdf type, NC_BYTE, ..., NC_DOUBLE */ +/* len: number of elements to fill with */ +/* vals: start of first block of values */ void -val_fill(type, len, vals) - nc_type type; /* netcdf type, NC_BYTE, ..., NC_DOUBLE */ - long len; /* number of elements to fill with */ - void *vals; /* start of first block of values */ +val_fill(nc_type type, long len, void *vals) { static char pname[] = "val_fill"; long half = len/2; @@ -64,11 +64,11 @@ val_fill(type, len, vals) /* fill typed value block with zeros of specified type */ +/* type: netcdf type, NC_BYTE, ..., NC_DOUBLE */ +/* len: number of elements to fill with */ +/* vals: start of first block of values */ void -val_fill_zero(type, len, vals) - nc_type type; /* netcdf type, NC_BYTE, ..., NC_DOUBLE */ - long len; /* number of elements to fill with */ - void *vals; /* start of first block of values */ +val_fill_zero(nc_type type, long len, void *vals) { static char pname[] = "val_fill_zero"; int iel; @@ -118,12 +118,12 @@ val_fill_zero(type, len, vals) * compare two typed value blocks, return 0 if equal, 1+n otherwise, * where n is the index of the first differing element. */ +/* type: netcdf type, NC_BYTE, ..., NC_DOUBLE */ +/* len: number of elements of type to compare */ +/* v1: start of first block of values */ +/* v2: start of second block of values */ int -val_cmp (type, len, v1, v2) - nc_type type; /* netcdf type, NC_BYTE, ..., NC_DOUBLE */ - long len; /* number of elements of type to compare */ - void *v1; /* start of first block of values */ - void *v2; /* start of second block of values */ +val_cmp (nc_type type, long len, void *v1, void *v2) { static char pname[] = "val_cmp"; int iel; @@ -195,11 +195,11 @@ val_cmp (type, len, v1, v2) /* print typed value block with values of specified type */ +/* type: netcdf type, NC_BYTE, ..., NC_DOUBLE */ +/* len: number of elements to fill with */ +/* vals: start of first block of values */ void -val_out(type, len, vals) - nc_type type; /* netcdf type, NC_BYTE, ..., NC_DOUBLE */ - long len; /* number of elements to fill with */ - void *vals; /* start of first block of values */ +val_out(nc_type type, long len, void *vals) { static char pname[] = "val_oout"; int iel; diff --git a/nctest/vardef.c b/nctest/vardef.c index b02df5dfdc..64832f2a4a 100644 --- a/nctest/vardef.c +++ b/nctest/vardef.c @@ -105,8 +105,7 @@ init_epsilons() * try in data mode, check error */ int -test_ncvardef(path) - const char *path; /* name of writable netcdf file to open */ +test_ncvardef(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; int cdfid; /* netcdf id */ diff --git a/nctest/varget.c b/nctest/varget.c index 1f1ab41adf..01d511b5e0 100644 --- a/nctest/varget.c +++ b/nctest/varget.c @@ -24,8 +24,7 @@ * try with bad netCDF handle, check error */ int -test_ncvarget(path) - const char *path; /* name of writable netcdf file to open */ +test_ncvarget(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncvarget"; diff --git a/nctest/vargetg.c b/nctest/vargetg.c index b02f33b93b..faec7c2e0b 100644 --- a/nctest/vargetg.c +++ b/nctest/vargetg.c @@ -25,8 +25,7 @@ * try with bad netCDF handle, check error */ int -test_ncvargetg(path) - const char *path; /* name of writable netcdf file to open */ +test_ncvargetg(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncvargetg"; diff --git a/nctest/varput.c b/nctest/varput.c index b3ea893a78..bfce8aff69 100644 --- a/nctest/varput.c +++ b/nctest/varput.c @@ -25,8 +25,7 @@ * try with bad netCDF handle, check error */ int -test_ncvarput(path) - const char *path; /* name of writable netcdf file to open */ +test_ncvarput(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncvarput"; diff --git a/nctest/varputg.c b/nctest/varputg.c index 491121303e..344150354f 100644 --- a/nctest/varputg.c +++ b/nctest/varputg.c @@ -25,8 +25,7 @@ * try with bad netCDF handle, check error */ int -test_ncvarputg(path) - const char *path; /* name of writable netcdf file to open */ +test_ncvarputg(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncvarputg"; diff --git a/nctest/vartests.c b/nctest/vartests.c index 8fe35983c7..a6ca42b932 100644 --- a/nctest/vartests.c +++ b/nctest/vartests.c @@ -25,8 +25,7 @@ * try with bad handle, check error */ int -test_ncvarid(path) - const char *path; /* name of writable netcdf file to open */ +test_ncvarid(const char *path) /* name of writable netcdf file to open */ { static char pname[] = "test_ncvarid"; int cdfid; /* netcdf id */ @@ -104,8 +103,7 @@ test_ncvarid(path) * try with bad netCDF handle, check error */ int -test_ncvarinq(path) - const char *path; /* name of writable netcdf file to open */ +test_ncvarinq(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncvarinq"; @@ -249,8 +247,7 @@ struct cdfelm { /* coordinates and generic value */ * get values and compare with put values */ static int -test_varputget1(cdfid) - int cdfid; /* handle of netcdf open and in data mode */ +test_varputget1(int cdfid) /* handle of netcdf open and in data mode */ { int nerrs = 0; static char pname[] = "test_varputget1"; @@ -380,8 +377,7 @@ test_varputget1(cdfid) * try with bad netCDF handle, check error */ int -test_ncvarput1(path) - const char *path; /* name of writable netcdf file to open */ +test_ncvarput1(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncvarput1"; @@ -468,8 +464,7 @@ test_ncvarput1(path) * try with bad netCDF handle, check error */ int -test_ncvarget1(path) - const char *path; /* name of writable netcdf file to open */ +test_ncvarget1(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncvarget1"; @@ -556,8 +551,7 @@ test_ncvarget1(path) * try renaming to existing variable name, check error */ int -test_ncvarrename(path) - const char *path; /* name of writable netcdf file to open */ +test_ncvarrename(const char *path) /* name of writable netcdf file to open */ { int nerrs = 0; static char pname[] = "test_ncvarrename"; diff --git a/nctest/vputget.c b/nctest/vputget.c index 8c2ff2ee93..67b7abbd15 100644 --- a/nctest/vputget.c +++ b/nctest/vputget.c @@ -34,8 +34,7 @@ */ int -test_varputget(cdfid) - int cdfid; /* handle of netcdf open and in data mode */ +test_varputget(int cdfid) /* handle of netcdf open and in data mode */ { int nerrs = 0; static char pname[] = "test_varputget"; diff --git a/nctest/vputgetg.c b/nctest/vputgetg.c index c4b87b5370..ef4e3238e5 100644 --- a/nctest/vputgetg.c +++ b/nctest/vputgetg.c @@ -34,8 +34,7 @@ */ int -test_varputgetg(cdfid) - int cdfid; /* handle of netcdf open and in data mode */ +test_varputgetg(int cdfid) /* handle of netcdf open and in data mode */ { int nerrs = 0; static char pname[] = "test_varputgetg";