diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-03-09 11:27:46 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-03-09 11:27:46 (GMT) |
commit | ab19d0636a2d490c34a3b40a39f14286b9557127 (patch) | |
tree | dcc2f31ca029891e9c808e628ffab1dd66a55764 /src/H5trace.c | |
parent | 85beb272c5038ffa2e2dfe95f60474e8ca616720 (diff) | |
download | hdf5-ab19d0636a2d490c34a3b40a39f14286b9557127.zip hdf5-ab19d0636a2d490c34a3b40a39f14286b9557127.tar.gz hdf5-ab19d0636a2d490c34a3b40a39f14286b9557127.tar.bz2 |
[svn-r26398] Merges r26333 from trunk
Eliminates gcc warnings due to -Wunsuffixed-float-constants.
- Adds 'F' suffixes for most float constants.
- A few constants MUST be of type double. These now receive the long
double L suffix and are then cast to double. I do this via a new
H5_DOUBLE() macro which was added to H5private.h.
- Additionally, some 1.8-specific float suffixes were added.
Fixes: HDFFV-9148
Tested on: h5committest
Diffstat (limited to 'src/H5trace.c')
-rw-r--r-- | src/H5trace.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5trace.c b/src/H5trace.c index 5e90ff6..2ee6367 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -110,7 +110,7 @@ * SO MAY CAUSE H5_trace() TO BE INVOKED RECURSIVELY OR MAY * CAUSE LIBRARY INITIALIZATIONS THAT ARE NOT DESIRED. * - * Return: void + * Return: Execution time for an API call * * Programmer: Robb Matzke * Tuesday, June 16, 1998 @@ -129,34 +129,34 @@ H5_trace(const double *returning, const char *func, const char *type, ...) void *vp = NULL; FILE *out = H5_debug_g.trace; H5_timer_t event_time; - static H5_timer_t first_time = {0.0, 0.0, 0.0}; + static H5_timer_t first_time = {0.0F, 0.0F, 0.0F}; static int current_depth = 0; static int last_call_depth = 0; /* FUNC_ENTER() should not be called */ if(!out) - return 0.0; /*tracing is off*/ + return 0.0F; /*tracing is off*/ va_start(ap, type); if(H5_debug_g.ttop) { if(returning) { if(current_depth > 1) { --current_depth; - return 0.0; + return 0.0F; } /* end if */ } /* end if */ else { if(current_depth > 0) { /*do not update last_call_depth*/ current_depth++; - return 0.0; + return 0.0F; } /* end if */ } /* end else */ } /* end if */ - /* Get tim for event */ - if(HDfabs(first_time.etime) < 0.0000000001) + /* Get time for event */ + if(HDfabs(first_time.etime) < 0.0000000001F) /* That is == 0.0, but direct comparison between floats is bad */ H5_timer_begin(&first_time); if(H5_debug_g.ttimes) |