summaryrefslogtreecommitdiffstats
path: root/tools/test/perform/sio_engine.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2019-07-10 03:15:36 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2019-07-10 03:15:36 (GMT)
commitdb7c43d375f6997dfc44d6153e7b015da571a8c9 (patch)
tree4f2c1e23d42540d4ea86870c29f11c217e2e566e /tools/test/perform/sio_engine.c
parent78e13fe8b09f4398519f58552d42651712284c76 (diff)
downloadhdf5-db7c43d375f6997dfc44d6153e7b015da571a8c9.zip
hdf5-db7c43d375f6997dfc44d6153e7b015da571a8c9.tar.gz
hdf5-db7c43d375f6997dfc44d6153e7b015da571a8c9.tar.bz2
Updates to warnhist script, along with a few cleanups, and add some comments
to warning cleanups that are a bit obscure.
Diffstat (limited to 'tools/test/perform/sio_engine.c')
-rw-r--r--tools/test/perform/sio_engine.c37
1 files changed, 23 insertions, 14 deletions
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