From 282c81fe3a2533659c48275a260b5e393011da2b Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Sat, 25 Jan 2025 01:48:15 -0800 Subject: [PATCH] filesys: replace goto by #else to avoid compiler warning --- src/filesys.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/filesys.cpp b/src/filesys.cpp index 3597e019a8..be1751c0b6 100644 --- a/src/filesys.cpp +++ b/src/filesys.cpp @@ -506,15 +506,10 @@ bool CopyFileContents(const std::string &source, const std::string &target) // fallback to normal copy, but no need to reopen the files sourcefile.reset(fdopen(srcfd, "rb")); targetfile.reset(fdopen(tgtfd, "wb")); - goto fallback; - -#endif - +#else sourcefile.reset(fopen(source.c_str(), "rb")); targetfile.reset(fopen(target.c_str(), "wb")); - -fallback: - +#endif if (!sourcefile) { errorstream << source << ": can't open for reading: " << strerror(errno) << std::endl;