Skip to content

Commit

Permalink
Merge branch 'hdf_test_warning_fixes' of https://github.com/derobins/…
Browse files Browse the repository at this point in the history
…hdf4 into hdf_test_warning_fixes
  • Loading branch information
derobins committed Oct 7, 2024
2 parents d5eb31e + 669e8fc commit 972fd47
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 53 deletions.
16 changes: 8 additions & 8 deletions hdf/test/comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ static int32 *inbuf_int32;
static uint32 *inbuf_uint32;

/* local function prototypes */
static void init_model_info(comp_model_t m_type, model_info *m_info, int32 test_ntype);
static void init_coder_info(comp_coder_t c_type, comp_info *c_info, int32 test_ntype);
static void allocate_buffers(void);
static void init_buffers(void);
static void free_buffers(void);
static void init_model_info(comp_model_t m_type, model_info *m_info, int32 test_ntype);
static void init_coder_info(comp_coder_t c_type, comp_info *c_info, int32 test_ntype);
static void allocate_buffers(void);
static void init_buffers(void);
static void free_buffers(void);
static int write_data(int32 fid, comp_model_t m_type, model_info *m_info, comp_coder_t c_type,
comp_info *c_info, int test_num, int32 ntype);
static void read_data(int32 fid, uint16 ref_num, int test_num, int32 ntype);
comp_info *c_info, int test_num, int32 ntype);
static void read_data(int32 fid, uint16 ref_num, int test_num, int32 ntype);

static void
init_model_info(comp_model_t m_type, model_info *m_info, int32 test_ntype)
Expand Down Expand Up @@ -404,7 +404,7 @@ test_comp(void)
init_coder_info(test_coders[coder_num], &c_info, test_ntypes[ntype_num]);

ref_num = (uint16)write_data(fid, test_models[model_num], &m_info, test_coders[coder_num],
&c_info, test_num, test_ntypes[ntype_num]);
&c_info, test_num, test_ntypes[ntype_num]);
read_data(fid, ref_num, test_num, test_ntypes[ntype_num]);
MESSAGE(6, {
int32 aid;
Expand Down
2 changes: 1 addition & 1 deletion hdf/test/mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4195,7 +4195,7 @@ test_mgr_chunkwr_pixelone()
index, i;
int32 start[2], stride[2], edge[2];
int16 data_out[3 * Y_LENGTH * X_LENGTH];
const char *image_name[] = {"Image_NO", "Image_RL", "Image_Sk", "Image_DF"};
const char *image_name[] = {"Image_NO", "Image_RL", "Image_Sk", "Image_DF"};
HDF_CHUNK_DEF chunk_def;
int16 chunk_buf[18];

Expand Down
88 changes: 44 additions & 44 deletions hdf/test/tvset.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,23 +554,23 @@ read_vset_stuff(void)
int32 *ibuf = NULL; /* integer buffer */
float32 *fbuf = NULL; /* floating point buffer */
char *gbuf = NULL; /* generic buffer */
int32 list[50];
int32 tags[100], refs[100], tag, ref;
char vsname[512], vsclass[512], fields[512];
char *vgname, *vgclass;
char *p;
int32 fid;
int32 vg1;
int32 vs1;
int32 status, num, i, count, intr, sz;
float32 fl_expected;
int32 in_expected;
char8 c_expected;
uint16 name_len;

ibuf = (int32 *)malloc(sizeof(float32) * 2000);
fbuf = (float32 *)malloc(sizeof(float32) * 2000);
gbuf = (char *)malloc(sizeof(char) * 2000);
int32 list[50];
int32 tags[100], refs[100], tag, ref;
char vsname[512], vsclass[512], fields[512];
char *vgname, *vgclass;
char *p;
int32 fid;
int32 vg1;
int32 vs1;
int32 status, num, i, count, intr, sz;
float32 fl_expected;
int32 in_expected;
char8 c_expected;
uint16 name_len;

ibuf = (int32 *)malloc(sizeof(float32) * 2000);
fbuf = (float32 *)malloc(sizeof(float32) * 2000);
gbuf = (char *)malloc(sizeof(char) * 2000);
CHECK_ALLOC(ibuf, "ibuf", "write_vset_stuff");
CHECK_ALLOC(fbuf, "fbuf", "write_vset_stuff");
CHECK_ALLOC(gbuf, "gbuf", "write_vset_stuff");
Expand Down Expand Up @@ -1613,8 +1613,8 @@ test_emptyvdata(void)
int32 fid; /* File ID */
int32 vs1; /* Vdata ID */
int32 ref; /* Vdata ref */
char *vsname = NULL;
char *fields = NULL;
char *vsname = NULL;
char *fields = NULL;

vsname = (char *)malloc(sizeof(char) * VSNAMELENMAX);
fields = (char *)malloc(sizeof(char) * FIELDNAMELENMAX * VSFIELDMAX);
Expand Down Expand Up @@ -1938,15 +1938,15 @@ test_getvgroups(void)
{
int32 fid; /* File ID */
int32 vgroup_id, vgroup0_id, vgroup1_id, vgroup2_id, vgroup3_id, vgroup4_id,
vgroup5_id; /* Various vgroup IDs */
int32 vgroup_ref; /* Vgroup ref */
int n_vgs = 0;
uint16 *refarray;
int32 ref_list[NUM_VGROUPS];
char vgclass[20];
int ii;
int32 status; /* Status values from routines */
int status_n; /* returned status for functions returning an int */
vgroup5_id; /* Various vgroup IDs */
int32 vgroup_ref; /* Vgroup ref */
int n_vgs = 0;
uint16 *refarray;
int32 ref_list[NUM_VGROUPS];
char vgclass[20];
int ii;
int32 status; /* Status values from routines */
int status_n; /* returned status for functions returning an int */

/* Create HDF file and initialize the interface. */
fid = Hopen(USERVGROUPS, DFACC_CREATE, 0);
Expand Down Expand Up @@ -2238,13 +2238,13 @@ test_getvgroups(void)
int
check_vgs(int32 id, unsigned start_vg, unsigned n_vgs,
const char *ident_text, /* just for debugging, remove when done */
int resultcount, /* expected number of vgroups */
int resultcount, /* expected number of vgroups */
uint16 *resultarray) /* array containing expected values */
{
uint16 *refarray = NULL;
int count = 0, ii;
char message[30];
int ret_value = SUCCEED;
uint16 *refarray = NULL;
int count = 0, ii;
char message[30];
int ret_value = SUCCEED;

strcpy(message, "Vgetvgroups: ");
strcat(message, ident_text);
Expand Down Expand Up @@ -2279,13 +2279,13 @@ check_vgs(int32 id, unsigned start_vg, unsigned n_vgs,
static int
check_vds(int32 id, unsigned start_vd, unsigned n_vds,
const char *ident_text, /* just for debugging, remove when done */
int resultcount, /* expected number of vdatas */
int resultcount, /* expected number of vdatas */
uint16 *resultarray) /* array containing expected values */
{
uint16 *refarray = NULL;
int count = 0, ii;
char message[30];
int ret_value = SUCCEED;
uint16 *refarray = NULL;
int count = 0, ii;
char message[30];
int ret_value = SUCCEED;

strcpy(message, "VSgetvdatas: ");
strcat(message, ident_text);
Expand Down Expand Up @@ -2330,12 +2330,12 @@ test_getvdatas(void)
int32 vgroup0_id, vgroup1_id, vgroup2_id, vgroup4_id, vgroup6_id, vgroup7_id,
vgroup9_id; /* Various vgroup IDs */
int32 vdata1_id, vdata2_id, vdata3_id, vdata4_id, vdata5_id, vdata6_id, vdata7_id; /* Various vdata IDs */
int n_vgs = 0;
int32 ref_list[NUM_VGROUPS], vdref_list[NUM_VDATAS];
char vgclass[20];
int ii;
int32 status; /* Status values from routines */
int status_n; /* returned status for functions returning an int */
int n_vgs = 0;
int32 ref_list[NUM_VGROUPS], vdref_list[NUM_VDATAS];
char vgclass[20];
int ii;
int32 status; /* Status values from routines */
int status_n; /* returned status for functions returning an int */

/* Create HDF file and initialize the interface. */
fid = Hopen(USERVDATAS, DFACC_CREATE, 0);
Expand Down

0 comments on commit 972fd47

Please sign in to comment.