summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-08-25 04:05:23 (GMT)
committerGitHub <noreply@github.com>2021-08-25 04:05:23 (GMT)
commit131402a92de9bbd5df60d5859c37c4820c60d6b9 (patch)
tree06e3f4cd947ece0c9d65e82020a7b993c1ce2848 /src
parente9765e6c09de2e278e2821faef656b6d61854196 (diff)
downloadhdf5-131402a92de9bbd5df60d5859c37c4820c60d6b9.zip
hdf5-131402a92de9bbd5df60d5859c37c4820c60d6b9.tar.gz
hdf5-131402a92de9bbd5df60d5859c37c4820c60d6b9.tar.bz2
More various warnings (#958)
* Committing clang-format changes * Fixed various -Wdouble-promotion warnings * Fixed -Wshadow warning for `optopt` conflict On macOS at least, there is a global various named `optopt` in unistd.h. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/H5ACprivate.h16
-rw-r--r--src/H5Cquery.c2
-rw-r--r--src/H5Pdxpl.c2
-rw-r--r--src/H5system.c24
4 files changed, 22 insertions, 22 deletions
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index b14194b..e9b8a47 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -275,24 +275,24 @@ typedef struct H5AC_proxy_entry_t {
/* size_t min_size = */ ( 1 * 1024 * 1024), \
/* long int epoch_length = */ 50000, \
/* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \
- /* double lower_hr_threshold = */ 0.9f, \
- /* double increment = */ 2.0f, \
+ /* double lower_hr_threshold = */ 0.9, \
+ /* double increment = */ 2.0, \
/* hbool_t apply_max_increment = */ TRUE, \
/* size_t max_increment = */ (4 * 1024 * 1024), \
/* enum H5C_cache_flash_incr_mode */ \
/* flash_incr_mode = */ H5C_flash_incr__add_space, \
- /* double flash_multiple = */ 1.4f, \
- /* double flash_threshold = */ 0.25f, \
+ /* double flash_multiple = */ 1.4, \
+ /* double flash_threshold = */ 0.25, \
/* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,\
- /* double upper_hr_threshold = */ 0.999f, \
- /* double decrement = */ 0.9f, \
+ /* double upper_hr_threshold = */ 0.999, \
+ /* double decrement = */ 0.9, \
/* hbool_t apply_max_decrement = */ TRUE, \
/* size_t max_decrement = */ (1 * 1024 * 1024), \
/* int epochs_before_eviction = */ 3, \
/* hbool_t apply_empty_reserve = */ TRUE, \
- /* double empty_reserve = */ 0.1f, \
+ /* double empty_reserve = */ 0.1, \
/* size_t dirty_bytes_threshold = */ (256 * 1024), \
- /* int metadata_write_strategy = */ \
+ /* int metadata_write_strategy = */ \
H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
}
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Cquery.c b/src/H5Cquery.c
index 6cf8ffc..710ce2a 100644
--- a/src/H5Cquery.c
+++ b/src/H5Cquery.c
@@ -201,7 +201,7 @@ H5C_get_cache_hit_rate(const H5C_t *cache_ptr, double *hit_rate_ptr)
if (cache_ptr->cache_accesses > 0)
*hit_rate_ptr = ((double)(cache_ptr->cache_hits)) / ((double)(cache_ptr->cache_accesses));
else
- *hit_rate_ptr = 0.0f;
+ *hit_rate_ptr = 0.0;
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 5f83a1d..a0c38f8 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -68,7 +68,7 @@
#define H5D_XFER_BTREE_SPLIT_RATIO_SIZE sizeof(double[3])
#define H5D_XFER_BTREE_SPLIT_RATIO_DEF \
{ \
- 0.1f, 0.5f, 0.9f \
+ 0.1, 0.5, 0.9 \
}
#define H5D_XFER_BTREE_SPLIT_RATIO_ENC H5P__dxfr_btree_split_ratio_enc
#define H5D_XFER_BTREE_SPLIT_RATIO_DEC H5P__dxfr_btree_split_ratio_dec
diff --git a/src/H5system.c b/src/H5system.c
index eba8341..fe379ad 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -958,8 +958,8 @@ const char *H5_optarg; /* Flag argument (or value) */
int
H5_get_option(int argc, const char **argv, const char *opts, const struct h5_long_options *l_opts)
{
- static int sp = 1; /* character index in current token */
- int optopt = '?'; /* option character passed back to user */
+ static int sp = 1; /* character index in current token */
+ int optchar = '?'; /* option character passed back to user */
if (sp == 1) {
/* check for more flag-like tokens */
@@ -990,7 +990,7 @@ H5_get_option(int argc, const char **argv, const char *opts, const struct h5_lon
for (i = 0; l_opts && l_opts[i].name; i++) {
if (HDstrcmp(arg, l_opts[i].name) == 0) {
/* we've found a matching long command line flag */
- optopt = l_opts[i].shortval;
+ optchar = l_opts[i].shortval;
if (l_opts[i].has_arg != no_arg) {
if (H5_optarg == NULL) {
@@ -1003,7 +1003,7 @@ H5_get_option(int argc, const char **argv, const char *opts, const struct h5_lon
if (H5_opterr)
HDfprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg);
- optopt = '?';
+ optchar = '?';
}
}
}
@@ -1012,7 +1012,7 @@ H5_get_option(int argc, const char **argv, const char *opts, const struct h5_lon
if (H5_opterr)
HDfprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg);
- optopt = '?';
+ optchar = '?';
}
}
break;
@@ -1024,7 +1024,7 @@ H5_get_option(int argc, const char **argv, const char *opts, const struct h5_lon
if (H5_opterr)
HDfprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg);
- optopt = '?';
+ optchar = '?';
}
H5_optind++;
@@ -1036,11 +1036,11 @@ H5_get_option(int argc, const char **argv, const char *opts, const struct h5_lon
register char *cp; /* pointer into current token */
/* short command line option */
- optopt = argv[H5_optind][sp];
+ optchar = argv[H5_optind][sp];
- if (optopt == ':' || (cp = HDstrchr(opts, optopt)) == 0) {
+ if (optchar == ':' || (cp = HDstrchr(opts, optchar)) == 0) {
if (H5_opterr)
- HDfprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], optopt);
+ HDfprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], optchar);
/* if no chars left in this token, move to next token */
if (argv[H5_optind][++sp] == '\0') {
@@ -1058,9 +1058,9 @@ H5_get_option(int argc, const char **argv, const char *opts, const struct h5_lon
}
else if (++H5_optind >= argc) {
if (H5_opterr)
- HDfprintf(stderr, "%s: value expected for option \"%c\"\n", argv[0], optopt);
+ HDfprintf(stderr, "%s: value expected for option \"%c\"\n", argv[0], optchar);
- optopt = '?';
+ optchar = '?';
}
else {
/* flag value is next token */
@@ -1098,5 +1098,5 @@ H5_get_option(int argc, const char **argv, const char *opts, const struct h5_lon
}
/* return the current flag character found */
- return optopt;
+ return optchar;
}