]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: fix a warning in PG::with_lock_obc(). 38210/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 20 Nov 2020 11:52:01 +0000 (12:52 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 20 Nov 2020 11:54:12 +0000 (12:54 +0100)
Without the fix, on a build with `NDEBUG` set,
GCC complains:

```
crimson/osd/pg.cc:869:35: warning: control reaches end of non-void function [-Wreturn-type]
  869 |   const hobject_t oid = get_oid(*m);
```

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/pg.cc

index 5c78a5d115b60e4c7196978147a967f63f0a2090..b1bf7b9c19a986fc5a7f844e6d27aaf42a4725b3 100644 (file)
@@ -887,7 +887,7 @@ PG::with_locked_obc(Ref<MOSDOp> &m, const OpInfo &op_info,
       return with_clone_obc<RWState::RWWRITE>(oid, std::move(f));
     }
   default:
-    assert(0);
+    ceph_abort();
   };
 }