summaryrefslogtreecommitdiffstats
path: root/src/H5trace.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-13 20:51:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-15 13:09:48 (GMT)
commit48d171b04730aff7beade684e9afd164f0204b0c (patch)
tree81bb97f196a1f35bc94624ab5f1b8e9fbbccaa81 /src/H5trace.c
parent1ce4c8dd7ddaa344ad041514b1d3aa4979497275 (diff)
downloadhdf5-48d171b04730aff7beade684e9afd164f0204b0c.zip
hdf5-48d171b04730aff7beade684e9afd164f0204b0c.tar.gz
hdf5-48d171b04730aff7beade684e9afd164f0204b0c.tar.bz2
Merge from 1.10
Comments, whitespace Simple init and if block brackets. Minimal code changes limited to return value and spelling
Diffstat (limited to 'src/H5trace.c')
-rw-r--r--src/H5trace.c354
1 files changed, 173 insertions, 181 deletions
diff --git a/src/H5trace.c b/src/H5trace.c
index 3d8dc4a..deb5776 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -13,11 +13,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5trace.c
- * Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Created: H5trace.c
+ * Aug 21 2006
+ * Quincey Koziol
*
- * Purpose: Internal code for tracing API calls
+ * Purpose: Internal code for tracing API calls
*
*-------------------------------------------------------------------------
*/
@@ -30,12 +30,12 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5Ipkg.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5Ipkg.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
#ifdef H5_HAVE_PARALLEL
/* datatypes of predefined drivers needed by H5_trace() */
@@ -71,36 +71,36 @@
/*******************/
/*-------------------------------------------------------------------------
- * Function: H5_trace
+ * Function: H5_trace
*
- * Purpose: This function is called whenever an API function is called
- * and tracing is turned on. If RETURNING is non-zero then
- * the caller is about to return and RETURNING points to the
+ * Purpose: This function is called whenever an API function is called
+ * and tracing is turned on. If RETURNING is non-zero then
+ * the caller is about to return and RETURNING points to the
* time for the corresponding function call event. Otherwise
* we print the function name and the arguments.
*
- * The TYPE argument is a string which gives the type of each of
- * the following argument pairs. Each type is zero or more
- * asterisks (one for each level of indirection, although some
- * types have one level of indirection already implied) followed
- * by either one letter (lower case) or two letters (first one
- * uppercase).
+ * The TYPE argument is a string which gives the type of each of
+ * the following argument pairs. Each type is zero or more
+ * asterisks (one for each level of indirection, although some
+ * types have one level of indirection already implied) followed
+ * by either one letter (lower case) or two letters (first one
+ * uppercase).
*
- * The variable argument list consists of pairs of values. Each
- * pair is a string which is the formal argument name in the
- * calling function, followed by the argument value. The type
- * of the argument value is given by the TYPE string.
+ * The variable argument list consists of pairs of values. Each
+ * pair is a string which is the formal argument name in the
+ * calling function, followed by the argument value. The type
+ * of the argument value is given by the TYPE string.
*
- * Note: The TYPE string is meant to be terse and is generated by a
- * separate perl script.
+ * Note: The TYPE string is meant to be terse and is generated by a
+ * separate perl script.
*
- * WARNING: DO NOT CALL ANY HDF5 FUNCTION THAT CALLS FUNC_ENTER(). DOING
- * SO MAY CAUSE H5_trace() TO BE INVOKED RECURSIVELY OR MAY
- * CAUSE LIBRARY INITIALIZATIONS THAT ARE NOT DESIRED.
+ * WARNING: DO NOT CALL ANY HDF5 FUNCTION THAT CALLS FUNC_ENTER(). DOING
+ * SO MAY CAUSE H5_trace() TO BE INVOKED RECURSIVELY OR MAY
+ * CAUSE LIBRARY INITIALIZATIONS THAT ARE NOT DESIRED.
*
- * Return: Execution time for an API call
+ * Return: Execution time for an API call
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, June 16, 1998
*
*-------------------------------------------------------------------------
@@ -125,7 +125,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
if (!out)
return 0.0F; /*tracing is off*/
- va_start(ap, type);
+ HDva_start(ap, type);
if (H5_debug_g.ttop) {
if (returning) {
@@ -164,7 +164,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
if (current_depth < last_call_depth) {
/* We are at the beginning of a line */
if (H5_debug_g.ttimes) {
- char tmp[128];
+ char tmp[320];
HDsprintf(tmp, "%.6f", event_time.etime - first_time.etime);
HDfprintf(out, " %*s ", (int)HDstrlen(tmp), "");
@@ -219,10 +219,9 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
* name is the null pointer then don't print the argument or the
* following `='. This is used for return values.
*/
- argname = va_arg(ap, char *); /*lint !e64 Type mismatch not really occuring */
+ argname = HDva_arg(ap, char *);
if (argname) {
- unsigned n = (unsigned)MAX(0, (int)HDstrlen(argname) -
- 3); /*lint !e666 Allow expression with side effects */
+ unsigned n = (unsigned)MAX(0, (int)HDstrlen(argname) - 3);
if (!HDstrcmp(argname + n, "_id")) {
HDstrncpy(buf, argname, (size_t)MIN((int)sizeof(buf) - 1, n));
@@ -236,17 +235,17 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
/* The value */
if (ptr)
- vp = va_arg(ap, void *); /*lint !e64 Type mismatch not really occuring */
+ vp = HDva_arg(ap, void *);
switch (type[0]) {
case 'a':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- haddr_t addr = va_arg(ap, haddr_t); /*lint !e732 Loss of sign not really occuring */
+ haddr_t addr = HDva_arg(ap, haddr_t);
HDfprintf(out, "%a", addr);
} /* end else */
@@ -255,13 +254,13 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'b':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- hbool_t bool_var = va_arg(ap, hbool_t); /*lint !e732 Loss of sign not really occuring */
-
+ /* Can't pass hbool_t to HDva_arg() */
+ hbool_t bool_var = (hbool_t)HDva_arg(ap, int);
if (TRUE == bool_var)
HDfprintf(out, "TRUE");
else if (!bool_var)
@@ -274,12 +273,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'd':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- double dbl = va_arg(ap, double);
+ double dbl = HDva_arg(ap, double);
HDfprintf(out, "%g", dbl);
} /* end else */
@@ -290,12 +289,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'a':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)va_arg(ap, int);
+ H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)HDva_arg(ap, int);
switch (alloc_time) {
case H5D_ALLOC_TIME_ERROR:
@@ -328,12 +327,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'c':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)va_arg(ap, int);
+ H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)HDva_arg(ap, int);
switch (opt) {
case H5FD_MPIO_COLLECTIVE_IO:
@@ -354,12 +353,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'f':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_fill_time_t fill_time = (H5D_fill_time_t)va_arg(ap, int);
+ H5D_fill_time_t fill_time = (H5D_fill_time_t)HDva_arg(ap, int);
switch (fill_time) {
case H5D_FILL_TIME_ERROR:
@@ -388,12 +387,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'F':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_fill_value_t fill_value = (H5D_fill_value_t)va_arg(ap, int);
+ H5D_fill_value_t fill_value = (H5D_fill_value_t)HDva_arg(ap, int);
switch (fill_value) {
case H5D_FILL_VALUE_ERROR:
@@ -422,12 +421,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'h':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)va_arg(ap, int);
+ H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)HDva_arg(ap, int);
switch (opt) {
case H5FD_MPIO_CHUNK_DEFAULT:
@@ -452,13 +451,13 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'i':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
H5D_mpio_actual_io_mode_t actual_io_mode =
- (H5D_mpio_actual_io_mode_t)va_arg(ap, int);
+ (H5D_mpio_actual_io_mode_t)HDva_arg(ap, int);
switch (actual_io_mode) {
case H5D_MPIO_NO_COLLECTIVE:
@@ -491,12 +490,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'l':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_layout_t layout = (H5D_layout_t)va_arg(ap, int);
+ H5D_layout_t layout = (H5D_layout_t)HDva_arg(ap, int);
switch (layout) {
case H5D_LAYOUT_ERROR:
@@ -529,13 +528,13 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'n':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
H5D_mpio_no_collective_cause_t nocol_cause_mode =
- (H5D_mpio_no_collective_cause_t)va_arg(ap, int);
+ (H5D_mpio_no_collective_cause_t)HDva_arg(ap, int);
hbool_t flag_already_displayed = FALSE;
/* Check for all bit-flags which might be set */
@@ -587,13 +586,13 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'o':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
H5D_mpio_actual_chunk_opt_mode_t chunk_opt_mode =
- (H5D_mpio_actual_chunk_opt_mode_t)va_arg(ap, int);
+ (H5D_mpio_actual_chunk_opt_mode_t)HDva_arg(ap, int);
switch (chunk_opt_mode) {
case H5D_MPIO_NO_CHUNK_OPTIMIZATION:
@@ -618,12 +617,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_space_status_t space_status = (H5D_space_status_t)va_arg(ap, int);
+ H5D_space_status_t space_status = (H5D_space_status_t)HDva_arg(ap, int);
switch (space_status) {
case H5D_SPACE_STATUS_NOT_ALLOCATED:
@@ -652,12 +651,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 't':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)va_arg(ap, int);
+ H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)HDva_arg(ap, int);
switch (transfer) {
case H5FD_MPIO_INDEPENDENT:
@@ -684,12 +683,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'e':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- herr_t status = va_arg(ap, herr_t);
+ herr_t status = HDva_arg(ap, herr_t);
if (status >= 0)
HDfprintf(out, "SUCCEED");
@@ -703,12 +702,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'd':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5E_direction_t direction = (H5E_direction_t)va_arg(ap, int);
+ H5E_direction_t direction = (H5E_direction_t)HDva_arg(ap, int);
switch (direction) {
case H5E_WALK_UPWARD:
@@ -729,27 +728,26 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'e':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5E_error2_t *error =
- va_arg(ap, H5E_error2_t *); /*lint !e64 Type mismatch not really occuring */
+ H5E_error2_t *error = HDva_arg(ap, H5E_error2_t *);
- HDfprintf(out, "0x%lx", (unsigned long)error);
+ HDfprintf(out, "0x%p", error);
} /* end else */
break;
case 't':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5E_type_t etype = (H5E_type_t)va_arg(ap, int);
+ H5E_type_t etype = (H5E_type_t)HDva_arg(ap, int);
switch (etype) {
case H5E_MAJOR:
@@ -778,12 +776,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'd':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5F_close_degree_t degree = (H5F_close_degree_t)va_arg(ap, int);
+ H5F_close_degree_t degree = (H5F_close_degree_t)HDva_arg(ap, int);
switch (degree) {
case H5F_CLOSE_DEFAULT:
@@ -812,12 +810,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'm':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5F_mem_t mem_type = (H5F_mem_t)va_arg(ap, int);
+ H5F_mem_t mem_type = (H5F_mem_t)HDva_arg(ap, int);
switch (mem_type) {
case H5FD_MEM_NOLIST:
@@ -863,12 +861,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5F_scope_t scope = (H5F_scope_t)va_arg(ap, int);
+ H5F_scope_t scope = (H5F_scope_t)HDva_arg(ap, int);
switch (scope) {
case H5F_SCOPE_LOCAL:
@@ -889,12 +887,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'v':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5F_libver_t libver_vers = (H5F_libver_t)va_arg(ap, int);
+ H5F_libver_t libver_vers = (H5F_libver_t)HDva_arg(ap, int);
switch (libver_vers) {
case H5F_LIBVER_EARLIEST:
@@ -924,12 +922,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'o':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5G_obj_t obj_type = (H5G_obj_t)va_arg(ap, int);
+ H5G_obj_t obj_type = (H5G_obj_t)HDva_arg(ap, int);
switch (obj_type) {
case H5G_UNKNOWN:
@@ -972,15 +970,14 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5G_stat_t *statbuf =
- va_arg(ap, H5G_stat_t *); /*lint !e64 Type mismatch not really occuring */
+ H5G_stat_t *statbuf = HDva_arg(ap, H5G_stat_t *);
- HDfprintf(out, "0x%lx", (unsigned long)statbuf);
+ HDfprintf(out, "0x%p", statbuf);
}
break;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -994,7 +991,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'h':
if (ptr) {
if (vp) {
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
if (asize_idx >= 0 && asize[asize_idx] >= 0) {
hsize_t *p = (hsize_t *)vp;
@@ -1012,7 +1009,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- hsize_t hsize = va_arg(ap, hsize_t); /*lint !e732 Loss of sign not really occuring */
+ hsize_t hsize = HDva_arg(ap, hsize_t);
if (H5S_UNLIMITED == hsize)
HDfprintf(out, "H5S_UNLIMITED");
@@ -1028,7 +1025,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if (ptr) {
if (vp) {
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
if (asize_idx >= 0 && asize[asize_idx] >= 0) {
hssize_t *p = (hssize_t *)vp;
@@ -1042,7 +1039,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- hssize_t hssize = va_arg(ap, hssize_t);
+ hssize_t hssize = HDva_arg(ap, hssize_t);
HDfprintf(out, "%Hd", hssize);
asize[argno] = (hssize_t)hssize;
@@ -1058,12 +1055,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'i':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- hid_t obj = va_arg(ap, hid_t);
+ hid_t obj = HDva_arg(ap, hid_t);
if (H5P_DEFAULT == obj)
HDfprintf(out, "H5P_DEFAULT");
@@ -1246,12 +1243,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'i':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5_index_t idx_type = (H5_index_t)va_arg(ap, int);
+ H5_index_t idx_type = (H5_index_t)HDva_arg(ap, int);
switch (idx_type) {
case H5_INDEX_UNKNOWN:
@@ -1280,12 +1277,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'o':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5_iter_order_t order = (H5_iter_order_t)va_arg(ap, int);
+ H5_iter_order_t order = (H5_iter_order_t)HDva_arg(ap, int);
switch (order) {
case H5_ITER_UNKNOWN:
@@ -1318,7 +1315,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if (ptr) {
if (vp) {
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
if (asize_idx >= 0 && asize[asize_idx] >= 0) {
int *p = (int *)vp;
@@ -1332,7 +1329,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- int is = va_arg(ap, int);
+ int is = HDva_arg(ap, int);
HDfprintf(out, "%d", is);
asize[argno] = is;
@@ -1342,12 +1339,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 't':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5I_type_t id_type = (H5I_type_t)va_arg(ap, int);
+ H5I_type_t id_type = (H5I_type_t)HDva_arg(ap, int);
switch (id_type) {
case H5I_UNINIT:
@@ -1424,7 +1421,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'u':
if (ptr) {
if (vp) {
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
if (asize_idx >= 0 && asize[asize_idx] >= 0) {
unsigned *p = (unsigned *)vp;
@@ -1438,8 +1435,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- unsigned iu =
- va_arg(ap, unsigned); /*lint !e732 Loss of sign not really occuring */
+ unsigned iu = HDva_arg(ap, unsigned);
HDfprintf(out, "%u", iu);
asize[argno] = iu;
@@ -1457,12 +1453,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'l':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5L_type_t link_type = (H5L_type_t)va_arg(ap, int);
+ H5L_type_t link_type = (H5L_type_t)HDva_arg(ap, int);
switch (link_type) {
case H5L_TYPE_ERROR:
@@ -1503,13 +1499,13 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'c':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
#ifdef H5_HAVE_PARALLEL
else {
- MPI_Comm comm = va_arg(ap, MPI_Comm);
+ MPI_Comm comm = HDva_arg(ap, MPI_Comm);
HDfprintf(out, "%ld", (long)comm);
} /* end else */
@@ -1519,13 +1515,13 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'i':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
#ifdef H5_HAVE_PARALLEL
else {
- MPI_Info info = va_arg(ap, MPI_Info);
+ MPI_Info info = HDva_arg(ap, MPI_Info);
HDfprintf(out, "%ld", (long)info);
} /* end else */
@@ -1535,12 +1531,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 't':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5FD_mem_t mt = (H5FD_mem_t)va_arg(ap, int);
+ H5FD_mem_t mt = (H5FD_mem_t)HDva_arg(ap, int);
switch (mt) {
case H5FD_MEM_NOLIST:
@@ -1594,12 +1590,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'o':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- off_t offset = va_arg(ap, off_t);
+ off_t offset = HDva_arg(ap, off_t);
HDfprintf(out, "%ld", (long)offset);
} /* end else */
@@ -1610,12 +1606,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 't':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5O_type_t objtype = (H5O_type_t)va_arg(ap, int);
+ H5O_type_t objtype = (H5O_type_t)HDva_arg(ap, int);
switch (objtype) {
case H5O_TYPE_UNKNOWN:
@@ -1635,7 +1631,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
break;
case H5O_TYPE_NTYPES:
- HDfprintf(out, "H5O_TYPE_TYPES");
+ HDfprintf(out, "H5O_TYPE_NTYPES");
break;
default:
@@ -1654,12 +1650,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'p':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- hid_t pclass_id = va_arg(ap, hid_t);
+ hid_t pclass_id = HDva_arg(ap, hid_t);
char * class_name = NULL;
H5P_genclass_t *pclass;
@@ -1678,12 +1674,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'r':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- hobj_ref_t ref = va_arg(ap, hobj_ref_t); /*lint !e732 Loss of sign not really occuring */
+ hobj_ref_t ref = HDva_arg(ap, hobj_ref_t);
HDfprintf(out, "Reference Object=%a", ref);
} /* end else */
@@ -1694,12 +1690,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 't':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5R_type_t reftype = (H5R_type_t)va_arg(ap, int);
+ H5R_type_t reftype = (H5R_type_t)HDva_arg(ap, int);
switch (reftype) {
case H5R_BADTYPE:
@@ -1736,12 +1732,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'c':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5S_class_t cls = (H5S_class_t)va_arg(ap, int);
+ H5S_class_t cls = (H5S_class_t)HDva_arg(ap, int);
switch (cls) {
case H5S_NO_CLASS:
@@ -1770,12 +1766,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5S_seloper_t so = (H5S_seloper_t)va_arg(ap, int);
+ H5S_seloper_t so = (H5S_seloper_t)HDva_arg(ap, int);
switch (so) {
case H5S_SELECT_NOOP:
@@ -1828,12 +1824,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 't':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5S_sel_type st = (H5S_sel_type)va_arg(ap, int);
+ H5S_sel_type st = (H5S_sel_type)HDva_arg(ap, int);
switch (st) {
case H5S_SEL_ERROR:
@@ -1876,13 +1872,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- const char *str =
- va_arg(ap, const char *); /*lint !e64 Type mismatch not really occuring */
+ const char *str = HDva_arg(ap, const char *);
HDfprintf(out, "\"%s\"", str);
} /* end else */
@@ -1893,12 +1888,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'c':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_cset_t cset = (H5T_cset_t)va_arg(ap, int);
+ H5T_cset_t cset = (H5T_cset_t)HDva_arg(ap, int);
switch (cset) {
case H5T_CSET_ERROR:
@@ -1940,12 +1935,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'd':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_direction_t direct = (H5T_direction_t)va_arg(ap, int);
+ H5T_direction_t direct = (H5T_direction_t)HDva_arg(ap, int);
switch (direct) {
case H5T_DIR_DEFAULT:
@@ -1970,12 +1965,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'e':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_pers_t pers = (H5T_pers_t)va_arg(ap, int);
+ H5T_pers_t pers = (H5T_pers_t)HDva_arg(ap, int);
switch (pers) {
case H5T_PERS_DONTCARE:
@@ -2000,12 +1995,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'n':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_norm_t norm = (H5T_norm_t)va_arg(ap, int);
+ H5T_norm_t norm = (H5T_norm_t)HDva_arg(ap, int);
switch (norm) {
case H5T_NORM_ERROR:
@@ -2034,12 +2029,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'o':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_order_t order = (H5T_order_t)va_arg(ap, int);
+ H5T_order_t order = (H5T_order_t)HDva_arg(ap, int);
switch (order) {
case H5T_ORDER_ERROR:
@@ -2076,12 +2071,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'p':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_pad_t pad = (H5T_pad_t)va_arg(ap, int);
+ H5T_pad_t pad = (H5T_pad_t)HDva_arg(ap, int);
switch (pad) {
case H5T_PAD_ERROR:
@@ -2114,12 +2109,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_sign_t sign = (H5T_sign_t)va_arg(ap, int);
+ H5T_sign_t sign = (H5T_sign_t)HDva_arg(ap, int);
switch (sign) {
case H5T_SGN_ERROR:
@@ -2148,12 +2143,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 't':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_class_t type_class = (H5T_class_t)va_arg(ap, int);
+ H5T_class_t type_class = (H5T_class_t)HDva_arg(ap, int);
switch (type_class) {
case H5T_NO_CLASS:
@@ -2218,12 +2213,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'z':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_str_t str = (H5T_str_t)va_arg(ap, int);
+ H5T_str_t str = (H5T_str_t)HDva_arg(ap, int);
switch (str) {
case H5T_STR_ERROR:
@@ -2274,12 +2269,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 't':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- htri_t tri_var = va_arg(ap, htri_t);
+ htri_t tri_var = HDva_arg(ap, htri_t);
if (tri_var > 0)
HDfprintf(out, "TRUE");
@@ -2295,7 +2290,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'l':
if (ptr) {
if (vp) {
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
if (asize_idx >= 0 && asize[asize_idx] >= 0) {
unsigned long *p = (unsigned long *)vp;
@@ -2309,18 +2304,17 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- unsigned long iul =
- va_arg(ap, unsigned long); /*lint !e732 Loss of sign not really occuring */
+ unsigned long iul = HDva_arg(ap, unsigned long);
HDfprintf(out, "%lu", iul);
- asize[argno] = iul;
+ asize[argno] = (hssize_t)iul;
} /* end else */
break;
case 'L':
if (ptr) {
if (vp) {
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
if (asize_idx >= 0 && asize[asize_idx] >= 0) {
unsigned long long *p = (unsigned long long *)vp;
@@ -2334,11 +2328,10 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- unsigned long long iull = va_arg(
- ap, unsigned long long); /*lint !e732 Loss of sign not really occuring */
+ unsigned long long iull = HDva_arg(ap, unsigned long long);
HDfprintf(out, "%llu", iull);
- asize[argno] = iull;
+ asize[argno] = (hssize_t)iull;
} /* end else */
break;
@@ -2351,14 +2344,14 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'x':
if (ptr) {
if (vp) {
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
if (asize_idx >= 0 && asize[asize_idx] >= 0) {
void **p = (void **)vp;
HDfprintf(out, " {");
for (i = 0; i < asize[asize_idx]; i++) {
if (p[i])
- HDfprintf(out, "%s0x%lx", (i ? ", " : ""), (unsigned long)(p[i]));
+ HDfprintf(out, "%s0x%p", (i ? ", " : ""), p[i]);
else
HDfprintf(out, "%sNULL", (i ? ", " : ""));
} /* end for */
@@ -2369,10 +2362,10 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- vp = va_arg(ap, void *); /*lint !e64 Type mismatch not really occuring */
+ vp = HDva_arg(ap, void *);
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end else */
@@ -2381,7 +2374,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'z':
if (ptr) {
if (vp) {
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
if (asize_idx >= 0 && asize[asize_idx] >= 0) {
size_t *p = (size_t *)vp;
@@ -2395,7 +2388,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- size_t size = va_arg(ap, size_t); /*lint !e732 Loss of sign not really occuring */
+ size_t size = HDva_arg(ap, size_t);
HDfprintf(out, "%Zu", size);
asize[argno] = (hssize_t)size;
@@ -2407,12 +2400,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'a':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)va_arg(ap, int);
+ H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)HDva_arg(ap, int);
switch (scale_type) {
case H5Z_SO_FLOAT_DSCALE:
@@ -2442,22 +2435,21 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5Z_class2_t *filter =
- va_arg(ap, H5Z_class2_t *); /*lint !e64 Type mismatch not really occuring */
+ H5Z_class2_t *filter = HDva_arg(ap, H5Z_class2_t *);
- HDfprintf(out, "0x%lx", (unsigned long)filter);
+ HDfprintf(out, "0x%p", filter);
} /* end else */
break;
case 'e':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5Z_EDC_t edc = (H5Z_EDC_t)va_arg(ap, int);
+ H5Z_EDC_t edc = (H5Z_EDC_t)HDva_arg(ap, int);
if (H5Z_DISABLE_EDC == edc)
HDfprintf(out, "H5Z_DISABLE_EDC");
@@ -2471,12 +2463,12 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 'f':
if (ptr) {
if (vp)
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
else
HDfprintf(out, "NULL");
} /* end if */
else {
- H5Z_filter_t id = va_arg(ap, H5Z_filter_t);
+ H5Z_filter_t id = HDva_arg(ap, H5Z_filter_t);
if (H5Z_FILTER_DEFLATE == id)
HDfprintf(out, "H5Z_FILTER_DEFLATE");
@@ -2488,7 +2480,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case 's':
if (ptr) {
if (vp) {
- HDfprintf(out, "0x%lx", (unsigned long)vp);
+ HDfprintf(out, "0x%p", vp);
if (asize_idx >= 0 && asize[asize_idx] >= 0) {
ssize_t *p = (ssize_t *)vp;
@@ -2502,7 +2494,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- ssize_t ssize = va_arg(ap, ssize_t);
+ ssize_t ssize = HDva_arg(ap, ssize_t);
HDfprintf(out, "%Zd", ssize);
asize[argno] = (hssize_t)ssize;
@@ -2530,7 +2522,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
(event_time.etime - *returning));
error:
- va_end(ap);
+ HDva_end(ap);
if (returning)
HDfprintf(out, ";\n");
else {