diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2013-07-03 22:33:25 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2013-07-03 22:33:25 (GMT) |
commit | dad8a4ddefcd970854c2e27c6c10364bb3f7a625 (patch) | |
tree | f96815bc3dfaf641473ff56f12685c9d4f458960 | |
parent | a4dc3ff34d2dec4db339851df381b67970853f2a (diff) | |
download | hdf5-dad8a4ddefcd970854c2e27c6c10364bb3f7a625.zip hdf5-dad8a4ddefcd970854c2e27c6c10364bb3f7a625.tar.gz hdf5-dad8a4ddefcd970854c2e27c6c10364bb3f7a625.tar.bz2 |
[svn-r23863] Remove compile warnings due to missing switch defaults
-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 df2e21e..4d6afd8 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 16e1750..985f3c4 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 */ |