Blame SOURCES/0010-all-Remove-unreachable-code.patch

49e81a
From 9e94a4349186f7353e0d7b536b46bfa4df2483d0 Mon Sep 17 00:00:00 2001
49e81a
From: Ming-Hung Tsai <mtsai@redhat.com>
49e81a
Date: Wed, 2 Jun 2021 14:59:29 +0800
49e81a
Subject: [PATCH 10/10] [all] Remove unreachable code
49e81a
49e81a
---
49e81a
 block-cache/io_engine.cc | 3 ---
49e81a
 caching/hint_array.cc    | 6 ------
49e81a
 2 files changed, 9 deletions(-)
49e81a
49e81a
diff --git a/block-cache/io_engine.cc b/block-cache/io_engine.cc
49e81a
index 2fe4082..0158723 100644
49e81a
--- a/block-cache/io_engine.cc
49e81a
+++ b/block-cache/io_engine.cc
49e81a
@@ -174,9 +174,6 @@ aio_engine::wait_(timespec *ts)
49e81a
 		cbs_.free(cb);
49e81a
 		return optional<wait_result>(make_pair(false, context));
49e81a
 	}
49e81a
-
49e81a
-	// shouldn't get here
49e81a
-	return optional<wait_result>(make_pair(false, 0));
49e81a
 }
49e81a
 
49e81a
 struct timespec
49e81a
diff --git a/caching/hint_array.cc b/caching/hint_array.cc
49e81a
index 6514968..e133c5c 100644
49e81a
--- a/caching/hint_array.cc
49e81a
+++ b/caching/hint_array.cc
49e81a
@@ -56,9 +56,6 @@ namespace {
49e81a
 		default:
49e81a
 			throw runtime_error("invalid hint width");
49e81a
 		}
49e81a
-
49e81a
-		// never get here
49e81a
-		return std::shared_ptr<array_base>();
49e81a
 	}
49e81a
 
49e81a
 	//--------------------------------
49e81a
@@ -93,9 +90,6 @@ namespace {
49e81a
 		default:
49e81a
 			throw runtime_error("invalid hint width");
49e81a
 		}
49e81a
-
49e81a
-		// never get here
49e81a
-		return std::shared_ptr<array_base>();
49e81a
 	}
49e81a
 
49e81a
 	//--------------------------------
49e81a
-- 
49e81a
1.8.3.1
49e81a