summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ttsafe_error.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index b9b8b0b..3915d2e 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -9,11 +9,13 @@
* entry.
*
* Temporary files generated:
- * ttsafe_error.h5
+ *
+ * ttsafe_error.h5
*
* HDF5 APIs exercised in thread:
- * H5Screate_simple, H5Tcopy, H5Tset_order, H5Dcreate, H5Dclose,
- * H5Tclose, H5Sclose.
+ *
+ * H5Screate_simple, H5Tcopy, H5Tset_order, H5Dcreate, H5Dclose,
+ * H5Tclose, H5Sclose.
*
* Created: Apr 28 2000
* Programmer: Chee Wai LEE
@@ -33,21 +35,19 @@
static int dummy; /* just to create a non-empty object file */
#else
-#define NUM_THREAD 16
-#define FILENAME "ttsafe_error.h5"
+#define NUM_THREAD 16
+#define FILENAME "ttsafe_error.h5"
/* Having a common dataset name is an error */
#define DATASETNAME "commonname"
#define EXPECTED_ERROR_DEPTH 3
#define WRITE_NUMBER 37
-/* Global variables */
-extern int num_errs;
-extern int Verbosity;
+static herr_t error_callback(void *);
+static herr_t walk_error_callback(int, H5E_error_t *, void *);
+static void *tts_error_thread(void *);
-herr_t error_callback(void *);
-herr_t walk_error_callback(int, H5E_error_t *, void *);
-void *tts_error_thread(void *);
+/* Global variables */
hid_t error_file;
typedef struct err_num_struct {
@@ -58,7 +58,7 @@ typedef struct err_num_struct {
err_num_t expected[] = {
{15, 23},
{15, 23},
- {10, 32}
+ {10, 34}
};
int error_flag = 0;
@@ -127,6 +127,7 @@ void tts_error(void)
H5Eset_auto(old_error_cb, old_error_client_data);
}
+static
void *tts_error_thread(void *arg)
{
hid_t dataspace, datatype, dataset;
@@ -153,17 +154,21 @@ void *tts_error_thread(void *arg)
H5Tclose(datatype);
H5Sclose(dataspace);
- return (NULL);
+ arg = arg; /* gets rid of annoying warning message */
+ return NULL;
}
+static
herr_t error_callback(void *client_data)
{
pthread_mutex_lock(&error_mutex);
error_count++;
pthread_mutex_unlock(&error_mutex);
+ client_data = client_data; /* gets rid of annoying warning message */
return H5Ewalk(H5E_WALK_DOWNWARD, walk_error_callback, NULL);
}
+static
herr_t walk_error_callback(int n, H5E_error_t *err_desc, void *client_data)
{
int maj_num, min_num;
@@ -178,6 +183,7 @@ herr_t walk_error_callback(int n, H5E_error_t *err_desc, void *client_data)
}
error_flag = -1;
+ client_data = client_data; /* gets rid of annoying warning message */
return SUCCEED;
}