summaryrefslogtreecommitdiffstats
path: root/src/H5timer.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-07-18 00:18:42 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-07-18 00:18:42 (GMT)
commitbb19817c9fd5d46cdc1ab5a396f38f0561dfa167 (patch)
tree69498cabeabf6f68faa23b835e24cb7ef4f80563 /src/H5timer.c
parentc8f4641507bf4ca85c70c39c786c07f8ef4a24ed (diff)
downloadhdf5-bb19817c9fd5d46cdc1ab5a396f38f0561dfa167.zip
hdf5-bb19817c9fd5d46cdc1ab5a396f38f0561dfa167.tar.gz
hdf5-bb19817c9fd5d46cdc1ab5a396f38f0561dfa167.tar.bz2
[svn-r30189] Description:
Clean up more warnings: drop the warning count from ~1310 down to ~940, with only 31 types of warnings in 148 files (down from 38 types in 167 files). Tested on: MacOSX/64 10.11.5 (amazon) w/serial & parallel (h5committest forthcoming)
Diffstat (limited to 'src/H5timer.c')
-rw-r--r--src/H5timer.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/H5timer.c b/src/H5timer.c
index d9be6bb..f36681e 100644
--- a/src/H5timer.c
+++ b/src/H5timer.c
@@ -127,16 +127,16 @@ H5_timer_begin (H5_timer_t *timer)
#ifdef H5_HAVE_GETRUSAGE
HDgetrusage (RUSAGE_SELF, &rusage);
timer->utime = (double)rusage.ru_utime.tv_sec +
- ((double)rusage.ru_utime.tv_usec / 1e6F);
+ ((double)rusage.ru_utime.tv_usec / (double)1e6F);
timer->stime = (double)rusage.ru_stime.tv_sec +
- ((double)rusage.ru_stime.tv_usec / 1e6F);
+ ((double)rusage.ru_stime.tv_usec / (double)1e6F);
#else
timer->utime = 0.0F;
timer->stime = 0.0F;
#endif
#ifdef H5_HAVE_GETTIMEOFDAY
HDgettimeofday (&etime, NULL);
- timer->etime = (double)etime.tv_sec + ((double)etime.tv_usec / 1e6F);
+ timer->etime = (double)etime.tv_sec + ((double)etime.tv_usec / (double)1e6F);
#else
timer->etime = 0.0F;
#endif
@@ -166,9 +166,9 @@ H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/)
HDassert(timer);
H5_timer_begin(&now);
- timer->utime = MAX(0.0F, now.utime - timer->utime);
- timer->stime = MAX(0.0F, now.stime - timer->stime);
- timer->etime = MAX(0.0F, now.etime - timer->etime);
+ timer->utime = MAX((double)0.0F, now.utime - timer->utime);
+ timer->stime = MAX((double)0.0F, now.stime - timer->stime);
+ timer->etime = MAX((double)0.0F, now.etime - timer->etime);
if (sum) {
sum->utime += timer->utime;
@@ -208,28 +208,28 @@ H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds)
{
double bw;
- if(nseconds <= 0.0F)
+ if(nseconds <= (double)0.0F)
HDstrcpy(buf, " NaN");
else {
bw = nbytes/nseconds;
- if(H5_DBL_ABS_EQUAL(bw, 0.0F))
- HDstrcpy(buf, "0.000 B/s");
- else if(bw < 1.0F)
+ if(H5_DBL_ABS_EQUAL(bw, (double)0.0F))
+ HDstrcpy(buf, "0.000 B/s");
+ else if(bw < (double)1.0F)
sprintf(buf, "%10.4e", bw);
- else if(bw < H5_KB) {
+ else if(bw < (double)H5_KB) {
sprintf(buf, "%05.4f", bw);
HDstrcpy(buf+5, " B/s");
- } else if(bw < H5_MB) {
- sprintf(buf, "%05.4f", bw / H5_KB);
+ } else if(bw < (double)H5_MB) {
+ sprintf(buf, "%05.4f", bw / (double)H5_KB);
HDstrcpy(buf+5, " kB/s");
- } else if(bw < H5_GB) {
- sprintf(buf, "%05.4f", bw / H5_MB);
+ } else if(bw < (double)H5_GB) {
+ sprintf(buf, "%05.4f", bw / (double)H5_MB);
HDstrcpy(buf+5, " MB/s");
- } else if(bw < H5_TB) {
- sprintf(buf, "%05.4f", bw / H5_GB);
+ } else if(bw < (double)H5_TB) {
+ sprintf(buf, "%05.4f", bw / (double)H5_GB);
HDstrcpy(buf+5, " GB/s");
- } else if(bw < H5_PB) {
- sprintf(buf, "%05.4f", bw / H5_TB);
+ } else if(bw < (double)H5_PB) {
+ sprintf(buf, "%05.4f", bw / (double)H5_TB);
HDstrcpy(buf+5, " TB/s");
} else {
sprintf(buf, "%10.4e", bw);