summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/warnhist25
-rw-r--r--src/H5FDfamily.c18
-rw-r--r--src/H5FDmulti.c2
-rw-r--r--src/H5Fint.c4
-rw-r--r--src/H5PLpath.c2
-rw-r--r--src/H5Pint.c2
-rw-r--r--src/H5system.c4
-rw-r--r--test/big.c9
-rw-r--r--test/error_test.c9
-rw-r--r--test/fheap.c9
-rw-r--r--test/file_image.c9
-rw-r--r--test/h5test.c21
-rw-r--r--test/use_disable_mdc_flushes.c8
-rw-r--r--test/vfd.c27
-rw-r--r--tools/lib/h5diff_array.c2
-rw-r--r--tools/lib/h5trav.c2
-rw-r--r--tools/src/h5repack/h5repack_refs.c2
-rw-r--r--tools/test/perform/pio_engine.c1
-rw-r--r--tools/test/perform/sio_engine.c37
19 files changed, 156 insertions, 37 deletions
diff --git a/bin/warnhist b/bin/warnhist
index 90f8601..7e56246 100755
--- a/bin/warnhist
+++ b/bin/warnhist
@@ -252,8 +252,18 @@ while (<>) {
print "Line is a null string! Input line #$. is: '$_'";
next
}
+ # Check for non-GCC warning (Solaris/Oracle?)
+ } elsif($_ =~ /^\".*, line [0-9]+: *[Ww]arning:.*/) {
+ ($name, $toss, $warning, $extra, $extra2) = split /\:/, $_;
+ ($name, $line) = split /\,/, $name;
+ $name =~ s/^\"//g;
+ $name =~ s/\"$//g;
+ $line =~ s/^\s*line\s*//g;
+# print "name:'", $name, "'-'", $line, "'\n";
+# print "warning:'", $warning, "'\n";
} else {
# Check for 'character offset' field appended to file & line #
+ # (This is probably specific to GCC)
if($_ =~ /^.*[0-9]+\:[0-9]+\:/) {
($name, $line, $offset, $toss, $warning, $extra, $extra2) = split /\:/, $_;
} else {
@@ -339,9 +349,10 @@ while (<>) {
$warning =~ s/\s(\{|\()aka '?[A-Za-z_0-9\(\)\*\,\[\]\.\<\>\&\:\+\#]+[A-Za-z_0-9\(\)\*\,\[\]\.\<\>\&\:\+\#\ ]*'?(\}|\))//g;
}
- # Genericize C/C++ '<some type>' and printf format '%<some format>' into '-'
- if($warning =~ /'[A-Za-z_0-9\(\)\*\,\[\]\.\<\>\&\:\+\#]+[A-Za-z_0-9\(\)\*\,\[\]\.\<\>\&\:\+\#\ ]*'/) {
- $warning =~ s/'[A-Za-z_0-9\(\)\*\,\[\]\.\<\>\&\:\+\#]+[A-Za-z_0-9\(\)\*\,\[\]\.\<\>\&\:\+\#\ ]*'/'-'/g;
+ # Genericize C/C++ '<some type>', printf format '%<some format>', and
+ # "unknown warning group" into '-'
+ if($warning =~ /'[A-Za-z_0-9\(\)\*\,\[\]\.\<\>\&\:\+\#\-\=]+[A-Za-z_0-9\(\)\*\,\[\]\.\<\>\&\:\+\#\-\=\ ]*'/) {
+ $warning =~ s/'[A-Za-z_0-9\(\)\*\,\[\]\.\<\>\&\:\+\#\-\=]+[A-Za-z_0-9\(\)\*\,\[\]\.\<\>\&\:\+\#\-\=\ ]*'/'-'/g;
}
if($warning =~ /'%[\#0\-\ \+]*[,;\:_]?[0-9\*]*\.?[0-9\*]*[hjltzL]*[aAcdeEfFgGinosuxX]'/) {
$warning =~ s/'%[\#0\-\ \+]*[,;\:_]?[0-9\*]*\.?[0-9\*]*[hjltzL]*[aAcdeEfFgGinosuxX]'/'-'/g;
@@ -370,8 +381,8 @@ while (<>) {
}
# Genericize standalone numbers in warnings
- if($warning =~ /\s-?[0-9]+\s/) {
- $warning =~ s/\s-?[0-9]+\s/\ -\ /g;
+ if($warning =~ /(\s|')-?[0-9]+(\s|')/) {
+ $warning =~ s/-?[0-9]+/-/g;
}
# Genericize unusual GCC/G++/GFORTRAN warnings that aren't handled above
@@ -442,7 +453,7 @@ for my $x (sort {$warn_count{$b} <=> $warn_count{$a}} keys(%warn_count)) {
for my $y (sort {$warn_file{$x}{$b} <=> $warn_file{$x}{$a}} keys(%{$warn_file{$x}})) {
printf ("\t%4d - %s\n", $warn_file{$x}{$y}, $y);
if(exists $options{l}) {
- my $lines = join ", ", sort {$a <=> $b} keys $warn_file_line{$x}{$y};
+ my $lines = join ", ", sort {$a <=> $b} keys %{$warn_file_line{$x}{$y}};
printf("\t\tLines: $lines \n");
}
}
@@ -480,7 +491,7 @@ for my $x (sort {$file_count{$b} <=> $file_count{$a}} keys(%file_count)) {
for my $y (sort {$file_warn{$x}{$b} <=> $file_warn{$x}{$a}} keys(%{$file_warn{$x}})) {
printf ("\t%4d - %s\n", $file_warn{$x}{$y}, $y);
if(exists $options{l}) {
- my $lines = join ", ", sort {$a <=> $b} keys $file_warn_line{$x}{$y};
+ my $lines = join ", ", sort {$a <=> $b} keys %{$file_warn_line{$x}{$y}};
printf("\t\tLines: $lines \n");
}
}
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index c8893f9..bc00403 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -613,6 +613,14 @@ done:
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * memb_name & temp in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static H5FD_t *
H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr)
@@ -763,6 +771,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_open() */
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
@@ -942,6 +951,14 @@ H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() call with
+ * memb_name in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static herr_t
H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
{
@@ -1008,6 +1025,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index b1d3430..acd128c 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -771,7 +771,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
buf += nseen*2*8;
if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HADDR, nseen*2, x, NULL, H5P_DEFAULT)<0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
- ap = (haddr_t*)((void *)x);
+ ap = (haddr_t*)((void *)x); /* Extra (void *) cast to quiet "cast to create alignment" warning - 2019/07/05, QAK */
UNIQUE_MEMBERS(map, mt) {
memb_addr[_unmapped] = *ap++;
memb_eoa[_unmapped] = *ap++;
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 6879d46..758900b 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -572,11 +572,11 @@ H5F__build_name(const char *prefix, const char *file_name, char **full_name/*out
fname_len = HDstrlen(file_name);
/* Allocate a buffer to hold the filename + prefix + possibly the delimiter + terminating null byte */
- if(NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 4)))
+ if(NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 2 + 2))) /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate filename buffer")
/* Compose the full file name */
- HDsnprintf(*full_name, (prefix_len + fname_len + 4), "%s%s%s", prefix,
+ HDsnprintf(*full_name, (prefix_len + fname_len + 2 + 2), "%s%s%s", prefix, /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
((prefix_len == 0 || H5_CHECK_DELIMITER(prefix[prefix_len - 1])) ? "" : H5_DIR_SEPS), file_name);
done:
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index 5125839..44d9cb9 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -673,7 +673,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
size_t len;
/* Allocate & initialize the path name */
- len = HDstrlen(dir) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(dp->d_name) + 5 /*\0*/;
+ len = HDstrlen(dir) + HDstrlen(H5PL_PATH_SEPARATOR) + HDstrlen(dp->d_name) + 1 /*\0*/ + 4; /* Extra "+4" to quiet GCC warning - 2019/07/05, QAK */
if (NULL == (path = (char *)H5MM_calloc(len)))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path")
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 911a126..a9dc363 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -5235,7 +5235,7 @@ H5P__get_class_path(H5P_genclass_t *pclass)
/* Allocate enough space for the parent class's path, plus the '/'
* separator, this class's name and the string terminator
*/
- ret_str_len = HDstrlen(par_path) + HDstrlen(pclass->name) + 3 + 1;
+ ret_str_len = HDstrlen(par_path) + HDstrlen(pclass->name) + 1 + 3; /* Extra "+3" to quiet GCC warning - 2019/07/05, QAK */
if(NULL == (ret_value = (char *)H5MM_malloc(ret_str_len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for class name")
diff --git a/src/H5system.c b/src/H5system.c
index bd5f9c5..1d47d13 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -1301,11 +1301,11 @@ H5_combine_path(const char* path1, const char* path2, char **full_name /*out*/)
* Allocate a buffer to hold path1 + path2 + possibly the delimiter
* + terminating null byte
*/
- if(NULL == (*full_name = (char *)H5MM_malloc(path1_len + path2_len + 4)))
+ if(NULL == (*full_name = (char *)H5MM_malloc(path1_len + path2_len + 2 + 2))) /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate filename buffer")
/* Compose the full file name */
- HDsnprintf(*full_name, (path1_len + path2_len + 4), "%s%s%s", path1,
+ HDsnprintf(*full_name, (path1_len + path2_len + 2 + 2), "%s%s%s", path1, /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
(H5_CHECK_DELIMITER(path1[path1_len - 1]) ? "" : H5_DIR_SEPS), path2);
} /* end else */
diff --git a/test/big.c b/test/big.c
index b3105eb..46acc5e 100644
--- a/test/big.c
+++ b/test/big.c
@@ -275,6 +275,14 @@ error:
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * 'name' in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static int
enough_room(hid_t fapl)
{
@@ -315,6 +323,7 @@ done:
return ret_value;
}
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
diff --git a/test/error_test.c b/test/error_test.c
index 5356fa7..44f6210 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -320,6 +320,14 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * 'full_desc' in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static herr_t
test_long_desc(void)
{
@@ -374,6 +382,7 @@ error:
return -1;
} /* end test_long_desc() */
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
diff --git a/test/fheap.c b/test/fheap.c
index 1ad5c11..ef47d94 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -539,6 +539,14 @@ get_fill_size(const fheap_test_param_t *tparam)
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * test_desc in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static int
begin_test(fheap_test_param_t *tparam, const char *base_desc,
fheap_heap_ids_t *keep_ids, size_t *fill_size)
@@ -567,6 +575,7 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc,
/* Success */
return(0);
} /* end begin_test() */
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
diff --git a/test/file_image.c b/test/file_image.c
index 86dd13e..ddbec80 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -672,6 +672,14 @@ error:
*
******************************************************************************
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * 'member_file_name' in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static int
test_get_file_image(const char * test_banner,
const int file_name_num,
@@ -938,6 +946,7 @@ test_get_file_image(const char * test_banner,
error:
return 1;
} /* end test_get_file_image() */
+#pragma GCC diagnostic pop
/******************************************************************************
diff --git a/test/h5test.c b/test/h5test.c
index 99b2010..d83c6e7 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -190,6 +190,14 @@ h5_clean_files(const char *base_name[], hid_t fapl)
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * sub_filename in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
void
h5_delete_test_file(const char *base_name, hid_t fapl)
{
@@ -239,6 +247,7 @@ h5_delete_test_file(const char *base_name, hid_t fapl)
return;
} /* end h5_delete_test_file() */
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
@@ -1344,6 +1353,14 @@ h5_dump_info_object(MPI_Info info)
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * temp in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
h5_stat_size_t
h5_get_file_size(const char *filename, hid_t fapl)
{
@@ -1445,12 +1462,14 @@ h5_get_file_size(const char *filename, hid_t fapl)
return(-1);
} /* end get_file_size() */
+#pragma GCC diagnostic pop
/*
* This routine is designed to provide equivalent functionality to 'printf'
* and allow easy replacement for environments which don't have stdin/stdout
* available. (i.e. Windows & the Mac)
*/
+H5_ATTR_FORMAT(printf, 1, 2)
int
print_func(const char *format, ...)
{
@@ -2016,7 +2035,7 @@ error:
*
*-------------------------------------------------------------------------
*/
-const char *
+H5_ATTR_PURE const char *
h5_get_version_string(H5F_libver_t libver)
{
return(LIBVER_NAMES[libver]);
diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c
index 340f578..67e2226 100644
--- a/test/use_disable_mdc_flushes.c
+++ b/test/use_disable_mdc_flushes.c
@@ -108,28 +108,28 @@ parse_option(int argc, char * const argv[])
filename_g = optarg;
break;
case 'n': /* number of planes to write/read */
- if ((nplanes_g = atoi(optarg)) <= 0){
+ if ((nplanes_g = HDatoi(optarg)) <= 0){
fprintf(stderr, "bad number of planes %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case 's': /* use swmr file open mode */
- if ((use_swmr_g = atoi(optarg)) < 0){
+ if ((use_swmr_g = HDatoi(optarg)) < 0){
fprintf(stderr, "swmr value should be 0(no) or 1(yes)\n");
usage(progname_g);
Hgoto_error(-1);
};
break;
case 'y': /* Number of planes per chunk */
- if ((chunkplanes_g = atoi(optarg)) <= 0){
+ if ((chunkplanes_g = HDatoi(optarg)) <= 0){
fprintf(stderr, "bad number of planes per chunk %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case 'z': /* size of chunk=(z,z) */
- if ((chunksize_g = atoi(optarg)) <= 0){
+ if ((chunksize_g = HDatoi(optarg)) <= 0){
fprintf(stderr, "bad chunksize %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
diff --git a/test/vfd.c b/test/vfd.c
index 2305593..b196406 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -769,6 +769,14 @@ error:
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * 'first_name' in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static herr_t
test_family_opens(char *fname, hid_t fa_pl)
{
@@ -825,6 +833,7 @@ test_family_opens(char *fname, hid_t fa_pl)
error:
return -1;
} /* end test_family_opens() */
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
@@ -1027,6 +1036,14 @@ error:
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * 'newname_individual', etc. in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static herr_t
test_family_compat(void)
{
@@ -1110,6 +1127,7 @@ error:
return -1;
} /* end test_family_compat() */
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
@@ -1125,6 +1143,14 @@ error:
*
*-------------------------------------------------------------------------
*/
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * 'sf_name' in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static herr_t
test_multi_opens(char *fname)
{
@@ -1142,6 +1168,7 @@ test_multi_opens(char *fname)
return(fid >= 0 ? FAIL : SUCCEED);
} /* end test_multi_opens() */
+#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index a9a87c9..2a45913 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -831,7 +831,7 @@ static hsize_t diff_datum(
nelmts = ((hvl_t *)((void *)mem1))->len;
for (j = 0; j < nelmts; j++)
- nfound += diff_datum(((char *) (((hvl_t *)((void *)mem1))->p)) + j * size, ((char *) (((hvl_t *)((void *)mem2))->p)) + j * size, memb_type, index,
+ nfound += diff_datum(((char *) (((hvl_t *)((void *)mem1))->p)) + j * size, ((char *) (((hvl_t *)((void *)mem2))->p)) + j * size, memb_type, index, /* Extra (void *) cast to quiet "cast to create alignment" warning - 2019/07/05, QAK */
rank, dims, acc, pos, opts, obj1, obj2, container1_id, container2_id, ph, members);
H5Tclose(memb_type);
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index ecc1fae..5519437 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -184,7 +184,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo,
if(udata->is_absolute) {
size_t base_len = HDstrlen(udata->base_grp_name);
size_t add_slash = base_len ? ((udata->base_grp_name)[base_len - 1] != '/') : 1;
- size_t new_name_len = base_len + add_slash + HDstrlen(path) + 4;
+ size_t new_name_len = base_len + add_slash + HDstrlen(path) + 1 + 3; /* Extra "+3" to quiet GCC warning - 2019/07/05, QAK */
if(NULL == (new_name = (char*)HDmalloc(new_name_len)))
return(H5_ITER_ERROR);
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index 610c21c..f5846ba 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -692,7 +692,7 @@ static int copy_refs_attr(hid_t loc_in,
size_t idx = (i * msize) + H5Tget_member_offset(mtype_id, ref_comp_index[j]);
hobj_ref_t ref_out;
- if (update_ref_value(attr_id, H5R_OBJECT, (hobj_ref_t *)((void *)(((char *)buf)+idx)), fidout, &ref_out, travt)<0)
+ if (update_ref_value(attr_id, H5R_OBJECT, (hobj_ref_t *)((void *)(((char *)buf)+idx)), fidout, &ref_out, travt) < 0) /* Extra (void *) cast to quiet "cast to create alignment" warning - 2019/07/05, QAK */
continue;
HDmemcpy(((char *)buf)+idx, &ref_out, ref_comp_size[j]);
} /* if */
diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c
index 43a0f64..d47cd43 100644
--- a/tools/test/perform/pio_engine.c
+++ b/tools/test/perform/pio_engine.c
@@ -318,7 +318,6 @@ do_pio(parameters param)
set_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS, TSTART);
hrc = do_write(&res, &fd, &param, ndsets, nbytes, buf_size, buffer);
- hrc == SUCCESS;
set_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS, TSTOP);
VRFY((hrc == SUCCESS), "do_write failed");
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index 11de229..ed15fa5 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -1262,7 +1262,15 @@ done:
* Programmer: Albert Cheng 2001/12/12
* Modifications: Support for file drivers. Christian Chilan, April, 2008
*/
- static void
+/* Disable warning for "format not a string literal" here -QAK */
+/*
+ * This pragma only needs to surround the snprintf() calls with
+ * 'temp' in the code below, but early (4.4.7, at least) gcc only
+ * allows diagnostic pragmas to be toggled outside of functions.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+static void
do_cleanupfile(iotype iot, char *filename)
{
char temp[2048];
@@ -1275,12 +1283,12 @@ do_cleanupfile(iotype iot, char *filename)
if (clean_file_g){
switch (iot) {
- case POSIXIO:
- HDremove(filename);
- break;
+ case POSIXIO:
+ HDremove(filename);
+ break;
- case HDF5:
- driver = H5Pget_driver(fapl);
+ case HDF5:
+ driver = H5Pget_driver(fapl);
if (driver == H5FD_FAMILY) {
for (j = 0; /*void*/; j++) {
@@ -1313,14 +1321,15 @@ do_cleanupfile(iotype iot, char *filename)
HDremove(filename);
}
H5Pclose(fapl);
- break;
-
- default:
- /* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
- HDassert(0 && "Unknown IO type");
- break;
- }
+ break;
+
+ default:
+ /* unknown request */
+ HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ HDassert(0 && "Unknown IO type");
+ break;
+ }
}
}
+#pragma GCC diagnostic pop