From 679775ae2d5bda73e4b973cf2dcebce6df33dca4 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 28 May 2013 14:08:09 +0200 Subject: [PATCH] small_io_bench_fs.cc: check return value of FileStore::mkfs/mount() CID 743398 (#1 of 1): Unchecked return value (CHECKED_RETURN) check_return: Calling function "FileStore::mount()" without checking return value (as is done elsewhere 4 out of 5 times). unchecked_value: No check of the return value of "fs.FileStore::mount()" Signed-off-by: Danny Al-Gaaf --- src/test/bench/small_io_bench_fs.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/test/bench/small_io_bench_fs.cc b/src/test/bench/small_io_bench_fs.cc index 4a3adc9e5dd1..61fbacc5570c 100644 --- a/src/test/bench/small_io_bench_fs.cc +++ b/src/test/bench/small_io_bench_fs.cc @@ -125,8 +125,16 @@ int main(int argc, char **argv) FileStore fs(vm["filestore-path"].as(), vm["journal-path"].as()); - fs.mkfs(); - fs.mount(); + + if (fs.mkfs() < 0) { + cout << "mkfs failed" << std::endl; + return 1; + } + + if (fs.mount() < 0) { + cout << "mount failed" << std::endl; + return 1; + } ostream *detailed_ops = 0; ofstream myfile; -- 2.47.3