filesys: replace goto by #else to avoid compiler warning

This commit is contained in:
Stefan Beller 2025-01-25 01:48:15 -08:00 committed by GitHub
parent b861f0c5c5
commit 282c81fe3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;