From patchwork Mon Nov 29 13:27:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 48252 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 45FB73858407 for ; Mon, 29 Nov 2021 13:29:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45FB73858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1638192556; bh=9Rs2EkFZbRV4KrxTeiFsNtTR+qq3PsbWymLPCyDUMxk=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=Wt7z9Zs2XgsMsalsc597r0QIiDWbg1Uf6yFzOm2407fGmMA9jWm6UtSVKHoo45lxv xQhNNDnBGlTVuRlpcTpHEp+MoMlx1sT6pXxeqCAwJiPHNuvZvlI3q0vc2l7U3377Lf l8dUxJiVIjqv9K9ifs6dITe6mRld5MZwUPZ7Z4Is= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 852F3387743E for ; Mon, 29 Nov 2021 13:27:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 852F3387743E Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8729B212C9; Mon, 29 Nov 2021 13:27:36 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6244613ABC; Mon, 29 Nov 2021 13:27:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WhyqFkjVpGFxVAAAMHmgww (envelope-from ); Mon, 29 Nov 2021 13:27:36 +0000 Date: Mon, 29 Nov 2021 14:27:36 +0100 (CET) To: gcc-patches@gcc.gnu.org Subject: [PATCH] Place stray return inside if Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Cc: libstd++@gcc.gnu.org Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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 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 --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