diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2013-08-20 21:52:41 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2013-08-20 21:52:41 (GMT) |
commit | d283a83a49a7e44a941268feb08eba241b571831 (patch) | |
tree | 03af2edb000b167a0785f7f1c32aa5ebd95e67d4 /perform | |
parent | a33303139e4241e158ad4a0c3cac6b699546c082 (diff) | |
download | hdf5-d283a83a49a7e44a941268feb08eba241b571831.zip hdf5-d283a83a49a7e44a941268feb08eba241b571831.tar.gz hdf5-d283a83a49a7e44a941268feb08eba241b571831.tar.bz2 |
[svn-r24039] Purpose:
Warning fixes (Jonathan and Peter) from coverity fix.
merge from r23986 trunk.
Tested:
jam-pp (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE)
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 4b037df..8539f75 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 */ |