diff mbox series

Place stray return inside if

Message ID q5s5qo9p-qor2-4395-1883-p6sp91s0950@fhfr.qr
State New
Headers show
Series Place stray return inside if | expand

Commit Message

Richard Biener Nov. 29, 2021, 1:27 p.m. UTC
This avoids a -Wunreachable-code-return diagnostic about
two consecutive returns by placing the return in the appropriate
conditional block.

OK?

Thanks,
Richard.

2021-11-29  Richard Biener  <rguenther@suse.de>

libstd++-v3/
	* src/c++17/fs_ops.cc (fs::equivalent): Move return stmt inside #else.
---
 libstdc++-v3/src/c++17/fs_ops.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libstdc++-v3/src/c++17/fs_ops.cc b/libstdc++-v3/src/c++17/fs_ops.cc
index 5b7f7edd1c9..cc8e4683900 100644
--- a/libstdc++-v3/src/c++17/fs_ops.cc
+++ b/libstdc++-v3/src/c++17/fs_ops.cc
@@ -898,8 +898,8 @@  fs::equivalent(const path& p1, const path& p2, error_code& ec) noexcept
   return false;
 #else
   ec = std::make_error_code(std::errc::function_not_supported);
-#endif
   return false;
+#endif
 }
 
 std::uintmax_t