1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00

Clang identifies some functions as "noreturn" + one noexcept(false)

(cherry picked from commit 7b54dde3a6)

Source commit: e6fd24a871e574ed762797210a5ce126deeab1f3
This commit is contained in:
Martin Prikryl
2025-03-14 12:52:21 +00:00
parent 23f7ce72d8
commit 5dc46ec23f
18 changed files with 36 additions and 29 deletions

View File

@@ -663,7 +663,7 @@ void __fastcall TSCPFileSystem::ReadCommandOutput(int Params, const UnicodeStrin
}
}
//---------------------------------------------------------------------------
void TSCPFileSystem::InvalidOutputError(const UnicodeString & Command)
NORETURN void TSCPFileSystem::InvalidOutputError(const UnicodeString & Command)
{
FTerminal->TerminalError(FMTLOAD(INVALID_OUTPUT_ERROR, (Command, Output->Text)));
}
@@ -2536,7 +2536,7 @@ void __fastcall TSCPFileSystem::SCPSink(const UnicodeString TargetDir,
case 2:
// Fatal error, terminate copying
FTerminal->TerminalError(Line);
return; // Unreachable
UNREACHABLE_AFTER_NORETURN(return);
case L'E': // Exit
FSecureShell->SendNull();
@@ -2713,7 +2713,7 @@ void __fastcall TSCPFileSystem::SCPSink(const UnicodeString TargetDir,
{
// In this step we can still cancel transfer, so we do it
SCPError(E.Message, false);
throw;
UNREACHABLE_AFTER_NORETURN(throw);
}
// We succeeded, so we confirm transfer to remote side