diff options
author | Peter Cao <xcao@hdfgroup.org> | 2013-08-09 21:34:58 (GMT) |
---|---|---|
committer | Peter Cao <xcao@hdfgroup.org> | 2013-08-09 21:34:58 (GMT) |
commit | ef73979a41232e2b5bac533923bff66fb90b511f (patch) | |
tree | 5ca349625a0c3b202495378e188f5c3015ceed7f /perform | |
parent | 345e57b0b11b5f63bb99f28bb9013ce0955c9cc1 (diff) | |
parent | cb41664db2fdfb7da5cc754a0119364741d0dae4 (diff) | |
download | hdf5-ef73979a41232e2b5bac533923bff66fb90b511f.zip hdf5-ef73979a41232e2b5bac533923bff66fb90b511f.tar.gz hdf5-ef73979a41232e2b5bac533923bff66fb90b511f.tar.bz2 |
[svn-r23986] merge warning fixes from Jonathan and Peter
Diffstat (limited to 'perform')
-rw-r--r-- | perform/overhead.c | 10 | ||||
-rw-r--r-- | perform/sio_engine.c | 72 | ||||
-rw-r--r-- | perform/sio_perf.c | 5 |
3 files changed, 80 insertions, 7 deletions
diff --git a/perform/overhead.c b/perform/overhead.c index 0b40721..9341e64 100644 --- a/perform/overhead.c +++ b/perform/overhead.c @@ -250,6 +250,11 @@ test(fill_t fill_style, const double splits[], break; case FILL_ALL: abort(); + default: + /* unknown request */ + HDfprintf(stderr, "Unknown fill style\n"); + goto error; + break; } /* Write the chunk */ @@ -305,6 +310,11 @@ test(fill_t fill_style, const double splits[], break; case FILL_ALL: abort(); + default: + /* unknown request */ + HDfprintf(stderr, "Unknown fill style\n"); + goto error; + break; } if (HDfstat(fd, &sb) < 0) goto error; diff --git a/perform/sio_engine.c b/perform/sio_engine.c index 541a9b0..0953507 100644 --- a/perform/sio_engine.c +++ b/perform/sio_engine.c @@ -180,7 +180,7 @@ do_sio(parameters param) break; default: /* unknown request */ - fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); GOTOERROR(FAIL); } @@ -285,6 +285,10 @@ done: case HDF5: if (fd.h5fd != -1) hrc = do_fclose(iot, &fd); + break; + default: + /* unknown request */ + HDassert(0 && "Unknown IO type"); break; } @@ -331,6 +335,11 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si else if (vfd == multi) suffix = NULL; break; + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); + HDassert(0 && "Unknown IO type"); + break; } /* First use the environment variable and then try the constant */ @@ -506,6 +515,11 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) } break; + + default: + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + GOTOERROR(FAIL); + break; } /* end switch */ @@ -546,7 +560,12 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) HDfprintf(stderr, "HDF5 Property List Close failed\n"); GOTOERROR(FAIL); } + break; + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + GOTOERROR(FAIL); break; } @@ -685,6 +704,12 @@ static herr_t dset_write(int local_dim, file_descr *fd, parameters *parms, void VRFY((hrc >= 0), "H5Dwrite"); break; + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + HDassert(0 && "Unknown IO type"); + break; } /* switch (parms->io_type) */ } } @@ -832,7 +857,12 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer) fprintf(stderr, "HDF5 Property List Create failed\n"); GOTOERROR(FAIL); } + break; + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + GOTOERROR(FAIL); break; } /* end switch */ @@ -849,9 +879,13 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer) HDfprintf(stderr, "HDF5 Dataset open failed\n"); GOTOERROR(FAIL); } - break; - + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + GOTOERROR(FAIL); + break; } /* end switch */ /* Start "raw data" read timer */ @@ -974,6 +1008,12 @@ static herr_t dset_read(int local_dim, file_descr *fd, parameters *parms, } #endif break; + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type); + HDassert(0 && "Unknown IO type"); + break; } /* switch (parms->io_type) */ } } @@ -1086,6 +1126,12 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags) GOTOERROR(FAIL); } break; + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)param->io_type); + GOTOERROR(FAIL); + break; } done: @@ -1208,6 +1254,12 @@ do_fclose(iotype iot, file_descr *fd /*out*/) fd->h5fd = -1; break; + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); + GOTOERROR(FAIL); + break; } done: @@ -1234,7 +1286,7 @@ do_cleanupfile(iotype iot, char *filename) if (clean_file_g){ - switch (iot) { + switch (iot) { case POSIXIO: HDremove(filename); break; @@ -1273,9 +1325,15 @@ do_cleanupfile(iotype iot, char *filename) HDremove(filename); } H5Pclose(fapl); - break; - } -} + break; + + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); + HDassert(0 && "Unknown IO type"); + break; + } + } } #ifdef H5_HAVE_GPFS diff --git a/perform/sio_perf.c b/perform/sio_perf.c index 5c09e84..7df9337 100644 --- a/perform/sio_perf.c +++ b/perform/sio_perf.c @@ -482,6 +482,11 @@ run_test(iotype iot, parameters parms, struct options *opts) case HDF5: output_report("HDF5\n"); break; + default: + /* unknown request */ + HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); + HDassert(0 && "Unknown IO tpe"); + break; } /* allocate space for tables minmax and that it is sufficient */ |