]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
store_test.cc: fix unchecked return value
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 1 Mar 2014 00:24:37 +0000 (01:24 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sat, 1 Mar 2014 00:24:37 +0000 (01:24 +0100)
CID 1188126 (#1 of 1): Unchecked return value (CHECKED_RETURN)
 2. check_return: Calling function "ObjectStore::stat(coll_t,
    ghobject_t const &, stat *, bool)" without checking return value
    (as is done elsewhere 8 out of 9 times).
 3. unchecked_value: No check of the return value of "this->store->stat(
    coll_t(this->cid), hoid, &buf, false)".

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/objectstore/store_test.cc

index b9c74abaf2eed1c6ca6e04660e1017725e717acb..8133d4dc0e7779fb77a1df466a965b5a51b1dffa 100644 (file)
@@ -561,7 +561,8 @@ public:
       ++in_flight;
     }
     struct stat buf;
-    store->stat(cid, hoid, &buf);
+    int r = store->stat(cid, hoid, &buf);
+    ASSERT_EQ(0, r);
     ASSERT_TRUE(buf.st_size == contents[hoid].length());
     {
       Mutex::Locker locker(lock);