Blob Blame History Raw
From 9e94a4349186f7353e0d7b536b46bfa4df2483d0 Mon Sep 17 00:00:00 2001
From: Ming-Hung Tsai <mtsai@redhat.com>
Date: Wed, 2 Jun 2021 14:59:29 +0800
Subject: [PATCH 10/10] [all] Remove unreachable code

---
 block-cache/io_engine.cc | 3 ---
 caching/hint_array.cc    | 6 ------
 2 files changed, 9 deletions(-)

diff --git a/block-cache/io_engine.cc b/block-cache/io_engine.cc
index 2fe4082..0158723 100644
--- a/block-cache/io_engine.cc
+++ b/block-cache/io_engine.cc
@@ -174,9 +174,6 @@ aio_engine::wait_(timespec *ts)
 		cbs_.free(cb);
 		return optional<wait_result>(make_pair(false, context));
 	}
-
-	// shouldn't get here
-	return optional<wait_result>(make_pair(false, 0));
 }
 
 struct timespec
diff --git a/caching/hint_array.cc b/caching/hint_array.cc
index 6514968..e133c5c 100644
--- a/caching/hint_array.cc
+++ b/caching/hint_array.cc
@@ -56,9 +56,6 @@ namespace {
 		default:
 			throw runtime_error("invalid hint width");
 		}
-
-		// never get here
-		return std::shared_ptr<array_base>();
 	}
 
 	//--------------------------------
@@ -93,9 +90,6 @@ namespace {
 		default:
 			throw runtime_error("invalid hint width");
 		}
-
-		// never get here
-		return std::shared_ptr<array_base>();
 	}
 
 	//--------------------------------
-- 
1.8.3.1