1
0
Эх сурвалжийг харах

Function call-line syntax for DebugFail + Replacing all DebugAssert(false) with DebugFail

Source commit: 358df59fa46a04bd1b2a141b826fa5c499303ae6
Martin Prikryl 10 жил өмнө
parent
commit
b55e9565da
57 өөрчлөгдсөн 211 нэмэгдсэн , 211 устгасан
  1. 2 2
      source/components/UnixDirView.cpp
  2. 1 1
      source/core/Common.cpp
  3. 2 2
      source/core/CopyParam.cpp
  4. 3 3
      source/core/FileBuffer.cpp
  5. 22 22
      source/core/FtpFileSystem.cpp
  6. 2 2
      source/core/Global.h
  7. 1 1
      source/core/HierarchicalStorage.cpp
  8. 1 1
      source/core/KeyGen.cpp
  9. 1 1
      source/core/NeonIntf.cpp
  10. 1 1
      source/core/Option.cpp
  11. 7 7
      source/core/PuttyIntf.cpp
  12. 3 3
      source/core/Queue.cpp
  13. 2 2
      source/core/RemoteFiles.cpp
  14. 8 8
      source/core/ScpFileSystem.cpp
  15. 2 2
      source/core/Script.cpp
  16. 7 7
      source/core/SecureShell.cpp
  17. 9 9
      source/core/SessionData.cpp
  18. 2 2
      source/core/SessionInfo.cpp
  19. 8 8
      source/core/SftpFileSystem.cpp
  20. 5 5
      source/core/Terminal.cpp
  21. 13 13
      source/core/WebDAVFileSystem.cpp
  22. 1 1
      source/filezilla/AsyncProxySocketLayer.cpp
  23. 1 1
      source/filezilla/FileZillaIntern.cpp
  24. 2 2
      source/filezilla/FileZillaIntf.cpp
  25. 14 14
      source/filezilla/FtpControlSocket.cpp
  26. 10 10
      source/filezilla/ServerPath.cpp
  27. 1 1
      source/filezilla/TransferSocket.cpp
  28. 1 1
      source/filezilla/stdafx.h
  29. 1 1
      source/forms/Cleanup.cpp
  30. 12 12
      source/forms/CustomScpExplorer.cpp
  31. 3 3
      source/forms/Editor.cpp
  32. 2 2
      source/forms/FileFind.cpp
  33. 2 2
      source/forms/FullSynchronize.cpp
  34. 2 2
      source/forms/GenerateUrl.cpp
  35. 1 1
      source/forms/LocationProfiles.cpp
  36. 3 3
      source/forms/Login.cpp
  37. 2 2
      source/forms/MessageDlg.cpp
  38. 5 5
      source/forms/NonVisual.cpp
  39. 1 1
      source/forms/OpenDirectory.cpp
  40. 5 5
      source/forms/Preferences.cpp
  41. 1 1
      source/forms/Progress.cpp
  42. 1 1
      source/forms/Rights.cpp
  43. 1 1
      source/forms/ScpCommander.cpp
  44. 1 1
      source/forms/ScpExplorer.cpp
  45. 3 3
      source/forms/SiteAdvanced.cpp
  46. 4 4
      source/forms/SynchronizeChecklist.cpp
  47. 8 8
      source/windows/ConsoleRunner.cpp
  48. 2 2
      source/windows/GUIConfiguration.cpp
  49. 2 2
      source/windows/QueueController.cpp
  50. 1 1
      source/windows/Setup.cpp
  51. 2 2
      source/windows/SynchronizeController.cpp
  52. 5 5
      source/windows/Tools.cpp
  53. 2 2
      source/windows/UserInterface.cpp
  54. 4 4
      source/windows/VCLCommon.cpp
  55. 1 1
      source/windows/WinConfiguration.cpp
  56. 1 1
      source/windows/WinInterface.cpp
  57. 1 1
      source/windows/WinMain.cpp

+ 2 - 2
source/components/UnixDirView.cpp

@@ -384,7 +384,7 @@ void __fastcall TUnixDirView::GetDisplayInfo(TListItem * Item, tagLVITEMW &DispI
         case uvExt: Value = File->Extension; break;
         case uvLinkTarget: Value = File->LinkTo; break;
         case uvType: Value = File->TypeName; break;
-        default: DebugFail;
+        default: DebugFail();
       }
       StrPLCopy(DispInfo.pszText, Value, DispInfo.cchTextMax);
     }
@@ -711,7 +711,7 @@ int __stdcall CompareFile(TListItem * Item1, TListItem * Item2, TUnixDirView * D
         break;
 
       default:
-        DebugFail;
+        DebugFail();
     }
 
     if (Result == 0)

+ 1 - 1
source/core/Common.cpp

@@ -2158,7 +2158,7 @@ unsigned int __fastcall CancelAnswer(unsigned int Answers)
   }
   else
   {
-    DebugFail;
+    DebugFail();
     Result = qaCancel;
   }
   return Result;

+ 2 - 2
source/core/CopyParam.cpp

@@ -454,7 +454,7 @@ bool __fastcall TCopyParamType::UseAsciiTransfer(UnicodeString FileName,
     case tmAscii: return true;
     case tmAutomatic: return AsciiFileMask.Matches(FileName, (Side == osLocal),
       false, &Params);
-    default: DebugFail; return false;
+    default: DebugFail(); return false;
   }
 }
 //---------------------------------------------------------------------------
@@ -519,7 +519,7 @@ bool __fastcall TCopyParamType::AllowResume(__int64 Size) const
     case rsOn: return true;
     case rsOff: return false;
     case rsSmart: return (Size >= ResumeThreshold);
-    default: DebugFail; return false;
+    default: DebugFail(); return false;
   }
 }
 //---------------------------------------------------------------------------

+ 3 - 3
source/core/FileBuffer.cpp

@@ -15,7 +15,7 @@ char * __fastcall EOLToStr(TEOLType EOLType)
     case eolLF: return "\n";
     case eolCRLF: return "\r\n";
     case eolCR: return "\r";
-    default: DebugFail; return "";
+    default: DebugFail(); return "";
   }
 }
 //---------------------------------------------------------------------------
@@ -262,7 +262,7 @@ int __fastcall TSafeHandleStream::Write(const void * Buffer, int Count)
 //---------------------------------------------------------------------------
 int __fastcall TSafeHandleStream::Read(System::DynamicArray<System::Byte> Buffer, int Offset, int Count)
 {
-  DebugFail; // untested
+  DebugFail(); // untested
   int Result = FileRead(FHandle, Buffer, Offset, Count);
   if (Result == -1)
   {
@@ -273,7 +273,7 @@ int __fastcall TSafeHandleStream::Read(System::DynamicArray<System::Byte> Buffer
 //---------------------------------------------------------------------------
 int __fastcall TSafeHandleStream::Write(const System::DynamicArray<System::Byte> Buffer, int Offset, int Count)
 {
-  DebugFail; // untested
+  DebugFail(); // untested
   int Result = FileWrite(FHandle, Buffer, Offset, Count);
   if (Result == -1)
   {

+ 22 - 22
source/core/FtpFileSystem.cpp

@@ -391,7 +391,7 @@ void __fastcall TFTPFileSystem::Open()
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
 
@@ -567,7 +567,7 @@ void __fastcall TFTPFileSystem::CollectUsage()
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
 
@@ -1008,7 +1008,7 @@ void __fastcall TFTPFileSystem::ChangeFileProperties(const UnicodeString AFileNa
 //---------------------------------------------------------------------------
 bool __fastcall TFTPFileSystem::LoadFilesProperties(TStrings * /*FileList*/)
 {
-  DebugFail;
+  DebugFail();
   return false;
 }
 //---------------------------------------------------------------------------
@@ -1029,7 +1029,7 @@ UnicodeString __fastcall TFTPFileSystem::DoCalculateFileChecksum(
     int Index = FChecksumAlgs->IndexOf(Alg);
     if (Index < 0)
     {
-      DebugFail;
+      DebugFail();
       EXCEPTION;
     }
     else
@@ -1381,7 +1381,7 @@ bool __fastcall TFTPFileSystem::ConfirmOverwrite(
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       Result = false;
       break;
   }
@@ -2213,7 +2213,7 @@ void __fastcall TFTPFileSystem::CustomCommandOnFile(const UnicodeString /*FileNa
 {
   // if ever implemented, do not forget to add EnsureLocation,
   // see AnyCommand for a reason why
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TFTPFileSystem::DoStartup()
@@ -2303,14 +2303,14 @@ bool __fastcall TFTPFileSystem::IsCapable(int Capability) const
       return false;
 
     default:
-      DebugFail;
+      DebugFail();
       return false;
   }
 }
 //---------------------------------------------------------------------------
 void __fastcall TFTPFileSystem::LookupUsersGroups()
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TFTPFileSystem::ReadCurrentDirectory()
@@ -2885,7 +2885,7 @@ const wchar_t * __fastcall TFTPFileSystem::GetOption(int OptionID) const
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       FOptionScratch = L"";
   }
 
@@ -2921,7 +2921,7 @@ int __fastcall TFTPFileSystem::GetOptionVal(int OptionID) const
         case pmTelnet:
         case pmCmd:
         default:
-          DebugFail;
+          DebugFail();
           Result = 0; // PROXYTYPE_NOPROXY;
           break;
       }
@@ -2950,7 +2950,7 @@ int __fastcall TFTPFileSystem::GetOptionVal(int OptionID) const
 
     case OPTION_PASV:
       // should never get here t_server.nPasv being nonzero
-      DebugFail;
+      DebugFail();
       Result = FALSE;
       break;
 
@@ -2966,7 +2966,7 @@ int __fastcall TFTPFileSystem::GetOptionVal(int OptionID) const
     case OPTION_PORTRANGELOW:
     case OPTION_PORTRANGEHIGH:
       // should never get here OPTION_LIMITPORTRANGE being zero
-      DebugFail;
+      DebugFail();
       Result = 0;
       break;
 
@@ -3038,7 +3038,7 @@ int __fastcall TFTPFileSystem::GetOptionVal(int OptionID) const
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       Result = FALSE;
       break;
   }
@@ -3237,7 +3237,7 @@ unsigned int __fastcall TFTPFileSystem::WaitForCommandReply(bool WantLastCode)
 void __fastcall TFTPFileSystem::WaitForFatalNonCommandReply()
 {
   WaitForReply(false, false);
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TFTPFileSystem::ResetReply()
@@ -3257,7 +3257,7 @@ void __fastcall TFTPFileSystem::GotNonCommandReply(unsigned int Reply)
   DebugAssert(FLAGSET(Reply, TFileZillaIntf::REPLY_DISCONNECTED));
   GotReply(Reply);
   // should never get here as GotReply should raise fatal exception
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 UnicodeString __fastcall TFTPFileSystem::GotReply(unsigned int Reply, unsigned int Flags,
@@ -3776,7 +3776,7 @@ bool __fastcall TFTPFileSystem::HandleStatus(const wchar_t * AStatus, int Type)
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
 
@@ -3907,7 +3907,7 @@ bool __fastcall TFTPFileSystem::HandleAsynchRequestOverwrite(
             break;
 
           default:
-            DebugFail;
+            DebugFail();
             RequestResult = TFileZillaIntf::FILEEXISTS_OVERWRITE;
             break;
         }
@@ -4273,7 +4273,7 @@ bool __fastcall TFTPFileSystem::HandleAsynchRequestVerifyCertificate(
           break;
 
         default:
-          DebugFail;
+          DebugFail();
           RequestResult = 0;
           break;
       }
@@ -4561,7 +4561,7 @@ bool __fastcall TFTPFileSystem::CheckError(int ReturnCode, const wchar_t * Conte
   {
     FTerminal->FatalError(NULL,
       FMTLOAD(INTERNAL_ERROR, (FORMAT(L"fz#%s", (Context)), IntToHex(ReturnCode, 4))));
-    DebugFail;
+    DebugFail();
   }
 
   return false;
@@ -4595,7 +4595,7 @@ bool __fastcall TFTPFileSystem::Unquote(UnicodeString & Str)
         }
         else
         {
-          DebugFail;
+          DebugFail();
           // no quoted string
           Str.SetLength(0);
         }
@@ -4728,12 +4728,12 @@ bool __fastcall TFTPFileSystem::SupportsCommand(const UnicodeString & Command) c
 //---------------------------------------------------------------------------
 void __fastcall TFTPFileSystem::LockFile(const UnicodeString & /*FileName*/, const TRemoteFile * /*File*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TFTPFileSystem::UnlockFile(const UnicodeString & /*FileName*/, const TRemoteFile * /*File*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TFTPFileSystem::UpdateFromMain(TCustomFileSystem * /*MainFileSystem*/)

+ 2 - 2
source/core/Global.h

@@ -37,12 +37,12 @@ private:
 #if !defined(_DEBUG) || defined(DESIGN_ONLY)
 #define DebugAssert(p)   ((void)0)
 #define DebugCheck(p) (p)
-#define DebugFail
+#define DebugFail()
 #else // if !defined(_DEBUG) || defined(DESIGN_ONLY)
 void __fastcall DoAssert(wchar_t * Message, wchar_t * Filename, int LineNumber);
 #define DebugAssert(p) ((p) ? (void)0 : DoAssert(TEXT(#p), TEXT(__FILE__), __LINE__))
 #define DebugCheck(p) { bool __CHECK_RESULT__ = (p); DebugAssert(__CHECK_RESULT__); }
-#define DebugFail DebugAssert(false)
+#define DebugFail() DebugAssert(false)
 #endif // if !defined(_DEBUG) || defined(DESIGN_ONLY)
 //---------------------------------------------------------------------------
 #define DebugAlwaysTrue(p) (p)

+ 1 - 1
source/core/HierarchicalStorage.cpp

@@ -1354,7 +1354,7 @@ bool __fastcall TOptionsIniFile::AllowWrite()
       return false;
 
     default:
-      DebugFail;
+      DebugFail();
       return false;
   }
 }

+ 1 - 1
source/core/KeyGen.cpp

@@ -379,7 +379,7 @@ void __fastcall TKeyGenerator::SaveKey(const AnsiString FileName,
         break;
 
       default:
-        DebugFail;
+        DebugFail();
     }
   }
   else

+ 1 - 1
source/core/NeonIntf.cpp

@@ -177,7 +177,7 @@ void CheckNeonStatus(ne_session * Session, int NeonStatus,
         case NE_FAILED: // never used by neon as of 0.30.0
         case NE_RETRY: // not sure if this is a public API
         default:
-          DebugFail;
+          DebugFail();
           Error = FORMAT(L"Unexpected neon error %d", (NeonStatus));
           break;
       }

+ 1 - 1
source/core/Option.cpp

@@ -352,7 +352,7 @@ void __fastcall TOptions::LogOptions(TLogOptionEvent OnLogOption)
         break;
 
       default:
-        DebugFail;
+        DebugFail();
         break;
     }
     OnLogOption(LogStr);

+ 7 - 7
source/core/PuttyIntf.cpp

@@ -203,7 +203,7 @@ int get_userpass_input(prompts_t * p, unsigned char * /*in*/, int /*inlen*/)
 char * get_ttymode(void * /*frontend*/, const char * /*mode*/)
 {
   // should never happen when Config.nopty == TRUE
-  DebugFail;
+  DebugFail();
   return NULL;
 }
 //---------------------------------------------------------------------------
@@ -307,7 +307,7 @@ int askappend(void * /*frontend*/, Filename * /*filename*/,
   void (*/*callback*/)(void * ctx, int result), void * /*ctx*/)
 {
   // this is called from logging.c of putty, which is never used with WinSCP
-  DebugFail;
+  DebugFail();
   return 0;
 }
 //---------------------------------------------------------------------------
@@ -324,7 +324,7 @@ void ldisc_send(void * /*handle*/, char * /*buf*/, int len, int /*interactive*/)
 void agent_schedule_callback(void (* /*callback*/)(void *, void *, int),
   void * /*callback_ctx*/, void * /*data*/, int /*len*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void notify_remote_exit(void * /*frontend*/)
@@ -460,7 +460,7 @@ long reg_query_winscp_value_ex(HKEY Key, const char * ValueName, unsigned long *
     }
     else
     {
-      DebugFail;
+      DebugFail();
       R = ERROR_READ_FAULT;
     }
   }
@@ -550,7 +550,7 @@ bool IsKeyEncrypted(TKeyType KeyType, const UnicodeString & FileName, UnicodeStr
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       Result = false;
       break;
   }
@@ -589,7 +589,7 @@ TPrivateKey * LoadKey(TKeyType KeyType, const UnicodeString & FileName, const Un
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
 
@@ -639,7 +639,7 @@ void SaveKey(TKeyType KeyType, const UnicodeString & FileName,
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
 }

+ 3 - 3
source/core/Queue.cpp

@@ -273,7 +273,7 @@ int __fastcall TSimpleThread::ThreadProc(void * Thread)
   catch(...)
   {
     // we do not expect thread to be terminated with exception
-    DebugFail;
+    DebugFail();
   }
   SimpleThread->FFinished = true;
   SimpleThread->Finished();
@@ -1436,7 +1436,7 @@ void __fastcall TTerminalItem::TerminalPromptUser(TTerminal * Terminal,
   if (FItem == NULL)
   {
     // sanity, should not occur
-    DebugFail;
+    DebugFail();
     Result = false;
   }
   else
@@ -2468,7 +2468,7 @@ void __fastcall TTerminalThread::TerminalInitializeLog(TObject * Sender)
   if (FOnInitializeLog != NULL)
   {
     // never used, so not tested either
-    DebugFail;
+    DebugFail();
     TNotifyAction Action(FOnInitializeLog);
     Action.Sender = Sender;
 

+ 2 - 2
source/core/RemoteFiles.cpp

@@ -391,7 +391,7 @@ TDateTime __fastcall ReduceDateTimePrecision(TDateTime DateTime,
         break;
 
       default:
-        DebugFail;
+        DebugFail();
     }
 
     DateTime = EncodeDateVerbose(Y, M, D) + EncodeTimeVerbose(H, N, S, MS);
@@ -441,7 +441,7 @@ UnicodeString __fastcall ModificationStr(TDateTime DateTime,
         (EngShortMonthNames[Month-1], Day, Hour, Min));
 
     default:
-      DebugFail;
+      DebugFail();
       // fall thru
 
     case mfFull:

+ 8 - 8
source/core/ScpFileSystem.cpp

@@ -464,7 +464,7 @@ bool __fastcall TSCPFileSystem::IsCapable(int Capability) const
       return false;
 
     default:
-      DebugFail;
+      DebugFail();
       return false;
   }
 }
@@ -732,7 +732,7 @@ void __fastcall TSCPFileSystem::DetectUtf()
       break;
 
     default:
-      DebugFail;
+      DebugFail();
     case asAuto:
       FSecureShell->UtfStrings = false; // noop
       try
@@ -1272,7 +1272,7 @@ void __fastcall TSCPFileSystem::ChangeFileProperties(const UnicodeString FileNam
 //---------------------------------------------------------------------------
 bool __fastcall TSCPFileSystem::LoadFilesProperties(TStrings * /*FileList*/ )
 {
-  DebugFail;
+  DebugFail();
   return false;
 }
 //---------------------------------------------------------------------------
@@ -1280,7 +1280,7 @@ void __fastcall TSCPFileSystem::CalculateFilesChecksum(const UnicodeString & /*A
   TStrings * /*FileList*/, TStrings * /*Checksums*/,
   TCalculatedChecksumEvent /*OnCalculatedChecksum*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TSCPFileSystem::CustomCommandOnFile(const UnicodeString FileName,
@@ -1355,7 +1355,7 @@ TStrings * __fastcall TSCPFileSystem::GetFixedPaths()
 void __fastcall TSCPFileSystem::SpaceAvailable(const UnicodeString Path,
   TSpaceAvailable & /*ASpaceAvailable*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 // transfer protocol
@@ -1564,7 +1564,7 @@ void __fastcall TSCPFileSystem::CopyToRemote(TStrings * FilesToCopy,
               break;
 
             default:
-              DebugFail;
+              DebugFail();
               break;
           }
         }
@@ -2675,12 +2675,12 @@ void __fastcall TSCPFileSystem::GetSupportedChecksumAlgs(TStrings * /*Algs*/)
 //---------------------------------------------------------------------------
 void __fastcall TSCPFileSystem::LockFile(const UnicodeString & /*FileName*/, const TRemoteFile * /*File*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TSCPFileSystem::UnlockFile(const UnicodeString & /*FileName*/, const TRemoteFile * /*File*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TSCPFileSystem::UpdateFromMain(TCustomFileSystem * /*MainFileSystem*/)

+ 2 - 2
source/core/Script.cpp

@@ -1037,7 +1037,7 @@ void __fastcall TScript::CopyParamParams(TCopyParamType & CopyParam, TScriptProc
           break;
 
         default:
-          DebugFail;
+          DebugFail();
           break;
       }
     }
@@ -1833,7 +1833,7 @@ void __fastcall TScript::SynchronizePreview(
           break;
 
       default:
-        DebugFail;
+        DebugFail();
       }
       PrintLine(Message);
     }

+ 7 - 7
source/core/SecureShell.cpp

@@ -178,7 +178,7 @@ Conf * __fastcall TSecureShell::StoreToConfig(TSessionData * Data, bool Simple)
       case cipAES: pcipher = CIPHER_AES; break;
       case cipDES: pcipher = CIPHER_DES; break;
       case cipArcfour: pcipher = CIPHER_ARCFOUR; break;
-      default: DebugFail;
+      default: DebugFail();
     }
     conf_set_int_int(conf, CONF_ssh_cipherlist, c, pcipher);
   }
@@ -192,7 +192,7 @@ Conf * __fastcall TSecureShell::StoreToConfig(TSessionData * Data, bool Simple)
       case kexDHGroup14: pkex = KEX_DHGROUP14; break;
       case kexDHGEx: pkex = KEX_DHGEX; break;
       case kexRSA: pkex = KEX_RSA; break;
-      default: DebugFail;
+      default: DebugFail();
     }
     conf_set_int_int(conf, CONF_ssh_kexlist, k, pkex);
   }
@@ -650,7 +650,7 @@ TPromptKind __fastcall TSecureShell::IdentifyPromptKind(UnicodeString & Name)
   else
   {
     PromptKind = pkPrompt;
-    DebugFail;
+    DebugFail();
   }
 
   return PromptKind;
@@ -754,7 +754,7 @@ bool __fastcall TSecureShell::PromptUser(bool /*ToServer*/,
   else
   {
     PromptDesc = L"unknown";
-    DebugFail;
+    DebugFail();
   }
 
   UnicodeString InstructionsLog =
@@ -1208,7 +1208,7 @@ void __fastcall TSecureShell::DispatchSendBuffer(int BufSize)
           break;
 
         default:
-          DebugFail;
+          DebugFail();
           // fallthru
 
         case qaAbort:
@@ -1705,7 +1705,7 @@ void __fastcall TSecureShell::WaitForData()
           break;
 
         default:
-          DebugFail;
+          DebugFail();
           // fallthru
 
         case qaAbort:
@@ -2286,7 +2286,7 @@ void __fastcall TSecureShell::AskAlg(const UnicodeString AlgType,
     }
     else
     {
-      DebugFail;
+      DebugFail();
     }
 
     Msg = FMTLOAD(CIPHER_BELOW_TRESHOLD, (LoadStr(CipherType), AlgName));

+ 9 - 9
source/core/SessionData.cpp

@@ -1256,7 +1256,7 @@ UnicodeString __fastcall TSessionData::GetSource()
       return L"Modified site";
 
     default:
-      DebugFail;
+      DebugFail();
       return L"";
   }
 }
@@ -2318,7 +2318,7 @@ bool __fastcall TSessionData::IsSecure()
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
   return Result;
@@ -2334,7 +2334,7 @@ UnicodeString __fastcall TSessionData::GetProtocolUrl()
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       // fallback
     case fsSFTP:
     case fsSFTPonly:
@@ -2600,7 +2600,7 @@ UnicodeString __fastcall TSessionData::AssemblyString(TAssemblyLanguage Language
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
 
@@ -2704,7 +2704,7 @@ UnicodeString __fastcall TSessionData::GenerateAssemblyCode(
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
 
@@ -2718,7 +2718,7 @@ UnicodeString __fastcall TSessionData::GenerateAssemblyCode(
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       // fallback
     case fsSFTP:
     case fsSFTPonly:
@@ -2791,7 +2791,7 @@ UnicodeString __fastcall TSessionData::GenerateAssemblyCode(
               break;
 
             default:
-              DebugFail;
+              DebugFail();
               break;
           }
           AddAssemblyProperty(Result, Language, L"FtpSecure", L"FtpSecure", FtpSecureMember);
@@ -2803,7 +2803,7 @@ UnicodeString __fastcall TSessionData::GenerateAssemblyCode(
         break;
 
       default:
-        DebugFail;
+        DebugFail();
         break;
     }
     SessionData->Ftps = FactoryDefaults->Ftps;
@@ -4328,7 +4328,7 @@ int __fastcall DefaultPort(TFSProtocol FSProtocol, TFtps Ftps)
       }
       else
       {
-        DebugFail;
+        DebugFail();
         Result = -1;
       }
       break;

+ 2 - 2
source/core/SessionInfo.cpp

@@ -327,7 +327,7 @@ protected:
       case laStat: return L"stat";
       case laChecksum: return L"checksum";
       case laCwd: return L"cwd";
-      default: DebugFail; return L"";
+      default: DebugFail(); return L"";
     }
   }
 
@@ -940,7 +940,7 @@ UnicodeString __fastcall TSessionLog::GetTlsVersionName(TTlsVersion TlsVersion)
   switch (TlsVersion)
   {
     default:
-      DebugFail;
+      DebugFail();
     case ssl2:
       return "SSLv2";
     case ssl3:

+ 8 - 8
source/core/SftpFileSystem.cpp

@@ -1949,7 +1949,7 @@ void __fastcall TSFTPFileSystem::CollectUsage()
       VersionCounter = L"OpenedSessionsSFTP6";
       break;
     default:
-      DebugFail;
+      DebugFail();
   }
   FTerminal->Configuration->Usage->Inc(VersionCounter);
 }
@@ -2161,7 +2161,7 @@ bool __fastcall TSFTPFileSystem::IsCapable(int Capability) const
       return false;
 
     default:
-      DebugFail;
+      DebugFail();
       return false;
   }
 }
@@ -3182,7 +3182,7 @@ void __fastcall TSFTPFileSystem::DoStartup()
       break;
 
     default:
-      DebugFail;
+      DebugFail();
     case asAuto:
       // Nb, Foxit server does not exist anymore
       if (GetSessionInfo().SshImplementation.Pos(L"Foxit-WAC-Server") == 1)
@@ -4135,13 +4135,13 @@ void __fastcall TSFTPFileSystem::CustomCommandOnFile(const UnicodeString /*FileN
     const TRemoteFile * /*File*/, UnicodeString /*Command*/, int /*Params*/,
     TCaptureOutputEvent /*OutputEvent*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TSFTPFileSystem::AnyCommand(const UnicodeString /*Command*/,
   TCaptureOutputEvent /*OutputEvent*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 TStrings * __fastcall TSFTPFileSystem::GetFixedPaths()
@@ -4396,7 +4396,7 @@ void __fastcall TSFTPFileSystem::SFTPConfirmOverwrite(
           OperationProgress->BatchOverwrite = boAlternateResume;
           break;
 
-        default: DebugFail; //fallthru
+        default: DebugFail(); //fallthru
         case qaCancel:
           if (!OperationProgress->Cancel)
           {
@@ -6126,12 +6126,12 @@ void __fastcall TSFTPFileSystem::GetSupportedChecksumAlgs(TStrings * Algs)
 //---------------------------------------------------------------------------
 void __fastcall TSFTPFileSystem::LockFile(const UnicodeString & /*FileName*/, const TRemoteFile * /*File*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TSFTPFileSystem::UnlockFile(const UnicodeString & /*FileName*/, const TRemoteFile * /*File*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TSFTPFileSystem::UpdateFromMain(TCustomFileSystem * /*MainFileSystem*/)

+ 5 - 5
source/core/Terminal.cpp

@@ -263,7 +263,7 @@ TSynchronizeChecklist::TAction __fastcall TSynchronizeChecklist::Reverse(TSynchr
 
     default:
     case saNone:
-      DebugFail;
+      DebugFail();
       return saNone;
   }
 }
@@ -622,7 +622,7 @@ void TRetryOperationLoop::DoError(Exception & E, TSessionAction * Action, const
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
 }
@@ -5128,7 +5128,7 @@ void __fastcall TTerminal::SynchronizeApply(TSynchronizeChecklist * Checklist,
                 break;
 
               default:
-                DebugFail;
+                DebugFail();
                 break;
             }
           }
@@ -5165,7 +5165,7 @@ void __fastcall TTerminal::SynchronizeApply(TSynchronizeChecklist * Checklist,
                 break;
 
               default:
-                DebugFail;
+                DebugFail();
                 break;
             }
           }
@@ -5931,7 +5931,7 @@ void __fastcall TTerminal::CollectTlsUsage(const UnicodeString & TlsVersionStr)
   }
   else
   {
-    DebugFail;
+    DebugFail();
   }
 }
 //---------------------------------------------------------------------------

+ 13 - 13
source/core/WebDAVFileSystem.cpp

@@ -111,7 +111,7 @@ void ne_debug(void * Context, int Channel, const char * Format, ...)
   else
   {
     DoLog = false;
-    DebugFail;
+    DebugFail();
   }
 
   #ifndef _DEBUG
@@ -656,7 +656,7 @@ bool __fastcall TWebDAVFileSystem::IsCapable(int Capability) const
       return FLAGSET(FCapabilities, NE_CAP_DAV_CLASS2);
 
     default:
-      DebugFail;
+      DebugFail();
       return false;
   }
 }
@@ -701,7 +701,7 @@ void __fastcall TWebDAVFileSystem::CheckStatus(int NeonStatus)
 //---------------------------------------------------------------------------
 void __fastcall TWebDAVFileSystem::LookupUsersGroups()
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TWebDAVFileSystem::ReadCurrentDirectory()
@@ -845,7 +845,7 @@ void __fastcall TWebDAVFileSystem::ReadSymlink(TRemoteFile * /*SymlinkFile*/,
   TRemoteFile *& /*File*/)
 {
   // we never set SymLink flag, so we should never get here
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TWebDAVFileSystem::ReadFile(const UnicodeString FileName,
@@ -1091,7 +1091,7 @@ void __fastcall TWebDAVFileSystem::RenameFile(const UnicodeString FileName,
 void __fastcall TWebDAVFileSystem::CopyFile(const UnicodeString FileName,
     const UnicodeString NewName)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TWebDAVFileSystem::CreateDirectory(const UnicodeString DirName)
@@ -1104,19 +1104,19 @@ void __fastcall TWebDAVFileSystem::CreateDirectory(const UnicodeString DirName)
 void __fastcall TWebDAVFileSystem::CreateLink(const UnicodeString FileName,
   const UnicodeString PointTo, bool /*Symbolic*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TWebDAVFileSystem::ChangeFileProperties(const UnicodeString FileName,
   const TRemoteFile * /*File*/, const TRemoteProperties * /*Properties*/,
   TChmodSessionAction & /*Action*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 bool __fastcall TWebDAVFileSystem::LoadFilesProperties(TStrings * /*FileList*/)
 {
-  DebugFail;
+  DebugFail();
   return false;
 }
 //---------------------------------------------------------------------------
@@ -1124,7 +1124,7 @@ void __fastcall TWebDAVFileSystem::CalculateFilesChecksum(const UnicodeString &
     TStrings * /*FileList*/, TStrings * /*Checksums*/,
     TCalculatedChecksumEvent /*OnCalculatedChecksum*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TWebDAVFileSystem::ConfirmOverwrite(
@@ -1171,7 +1171,7 @@ void __fastcall TWebDAVFileSystem::ConfirmOverwrite(
       THROW_SKIP_FILE_NULL;
 
     default:
-      DebugFail;
+      DebugFail();
     case qaCancel:
       if (!OperationProgress->Cancel)
       {
@@ -1185,13 +1185,13 @@ void __fastcall TWebDAVFileSystem::ConfirmOverwrite(
 void __fastcall TWebDAVFileSystem::CustomCommandOnFile(const UnicodeString FileName,
   const TRemoteFile * /*File*/, UnicodeString Command, int /*Params*/, TCaptureOutputEvent /*OutputEvent*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TWebDAVFileSystem::AnyCommand(const UnicodeString Command,
   TCaptureOutputEvent /*OutputEvent*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 TStrings * __fastcall TWebDAVFileSystem::GetFixedPaths()
@@ -2235,7 +2235,7 @@ bool TWebDAVFileSystem::VerifyCertificate(const TWebDAVCertificateData & Data)
           break;
 
         default:
-          DebugFail;
+          DebugFail();
         case qaCancel:
           FTerminal->Configuration->Usage->Inc(L"HostNotVerified");
           Result = false;

+ 1 - 1
source/filezilla/AsyncProxySocketLayer.cpp

@@ -945,7 +945,7 @@ void CAsyncProxySocketLayer::OnConnect(int nErrorCode)
       return;
     }
     else
-      DebugAssert(FALSE);
+      DebugFail();
     //Now we'll wait for the response, handled in OnReceive
     m_nProxyOpState++;
   }

+ 1 - 1
source/filezilla/FileZillaIntern.cpp

@@ -29,7 +29,7 @@ bool TFileZillaIntern::PostMessage(WPARAM wParam, LPARAM lParam) const
       break;
 
     default:
-      DebugAssert(FALSE);
+      DebugFail();
       Result = false;
       break;
   }

+ 2 - 2
source/filezilla/FileZillaIntf.cpp

@@ -430,7 +430,7 @@ bool __fastcall TFileZillaIntf::HandleMessage(WPARAM wParam, LPARAM lParam)
         // FZ_ASYNCREQUEST_GSS_AUTHFAILED
         // FZ_ASYNCREQUEST_GSS_NEEDUSER
         // FZ_ASYNCREQUEST_GSS_NEEDPASS
-        DebugAssert(FALSE);
+        DebugFail();
         Result = false;
       }
       break;
@@ -492,7 +492,7 @@ bool __fastcall TFileZillaIntf::HandleMessage(WPARAM wParam, LPARAM lParam)
       break;
 
     default:
-      DebugAssert(false);
+      DebugFail();
       Result = false;
       break;
   }

+ 14 - 14
source/filezilla/FtpControlSocket.cpp

@@ -424,7 +424,7 @@ bool CFtpControlSocket::InitConnect()
       else
         m_pProxyLayer->SetProxy(PROXYTYPE_HTTP11, T2CA(GetOption(OPTION_PROXYHOST)) ,GetOptionVal(OPTION_PROXYPORT));
     else
-      DebugAssert(FALSE);
+      DebugFail();
     AddLayer(m_pProxyLayer);
   }
 
@@ -2089,7 +2089,7 @@ void CFtpControlSocket::List(BOOL bFinish, int nError /*=FALSE*/, CServerPath pa
   else if (m_Operation.nOpState == LIST_MODE)
   {
 #ifdef MPEXT_NO_ZLIB
-    DebugAssert(false);
+    DebugFail();
 #else
     if (m_useZlib)
 #endif
@@ -2102,7 +2102,7 @@ void CFtpControlSocket::List(BOOL bFinish, int nError /*=FALSE*/, CServerPath pa
   else if (m_Operation.nOpState == LIST_OPTS)
   {
 #ifdef MPEXT_NO_ZLIB
-    DebugAssert(false);
+    DebugFail();
 #else
     pData->newZlibLevel = GetOptionVal(OPTION_MODEZ_LEVEL);
     cmd.Format(L"OPTS MODE Z LEVEL %d", pData->newZlibLevel);
@@ -3064,7 +3064,7 @@ void CFtpControlSocket::FileTransfer(t_transferfile *transferfile/*=0*/,BOOL bFi
         }
         break;
       default:
-        DebugAssert(FALSE);
+        DebugFail();
       }
 
       break;
@@ -3107,7 +3107,7 @@ void CFtpControlSocket::FileTransfer(t_transferfile *transferfile/*=0*/,BOOL bFi
       break;
     case FILETRANSFER_LIST_MODE:
 #ifdef MPEXT_NO_ZLIB
-      DebugAssert(false);
+      DebugFail();
       m_Operation.nOpState = FILETRANSFER_LIST_TYPE;
 #else
       if (code == 2 || code == 3)
@@ -3117,7 +3117,7 @@ void CFtpControlSocket::FileTransfer(t_transferfile *transferfile/*=0*/,BOOL bFi
       break;
     case FILETRANSFER_LIST_OPTS:
 #ifdef MPEXT_NO_ZLIB
-      DebugAssert(false);
+      DebugFail();
 #else
       if (code == 2 || code == 3)
         m_zlibLevel = pData->newZlibLevel;
@@ -3399,7 +3399,7 @@ void CFtpControlSocket::FileTransfer(t_transferfile *transferfile/*=0*/,BOOL bFi
       break;
     case FILETRANSFER_MODE:
 #ifdef MPEXT_NO_ZLIB
-      DebugAssert(false);
+      DebugFail();
       m_Operation.nOpState = FILETRANSFER_PORTPASV;
 #else
       if (code == 2 || code == 3)
@@ -3409,7 +3409,7 @@ void CFtpControlSocket::FileTransfer(t_transferfile *transferfile/*=0*/,BOOL bFi
       break;
     case FILETRANSFER_OPTS:
 #ifdef MPEXT_NO_ZLIB
-      DebugAssert(false);
+      DebugFail();
 #else
       if (code == 2 || code == 3)
         m_zlibLevel = pData->newZlibLevel;
@@ -3857,7 +3857,7 @@ void CFtpControlSocket::FileTransfer(t_transferfile *transferfile/*=0*/,BOOL bFi
     break;
   case FILETRANSFER_LIST_MODE:
 #ifdef MPEXT_NO_ZLIB
-    DebugAssert(false);
+    DebugFail();
 #else
     if (m_useZlib)
     {
@@ -3871,7 +3871,7 @@ void CFtpControlSocket::FileTransfer(t_transferfile *transferfile/*=0*/,BOOL bFi
     break;
   case FILETRANSFER_LIST_OPTS:
 #ifdef MPEXT_NO_ZLIB
-    DebugAssert(false);
+    DebugFail();
 #else
     {
       pData->newZlibLevel = GetOptionVal(OPTION_MODEZ_LEVEL);
@@ -4095,7 +4095,7 @@ void CFtpControlSocket::FileTransfer(t_transferfile *transferfile/*=0*/,BOOL bFi
     break;
   case FILETRANSFER_MODE:
 #ifdef MPEXT_NO_ZLIB
-    DebugAssert(false);
+    DebugFail();
 #else
     if (m_useZlib)
     {
@@ -4109,7 +4109,7 @@ void CFtpControlSocket::FileTransfer(t_transferfile *transferfile/*=0*/,BOOL bFi
     break;
   case FILETRANSFER_OPTS:
 #ifdef MPEXT_NO_ZLIB
-    DebugAssert(false);
+    DebugFail();
 #else
     {
       pData->newZlibLevel = GetOptionVal(OPTION_MODEZ_LEVEL);
@@ -4669,7 +4669,7 @@ void CFtpControlSocket::ResetOperation(int nSuccessful /*=FALSE*/)
     //No operation in progress
     nSuccessful&=FZ_REPLY_DISCONNECTED|FZ_REPLY_CANCEL;
     if (!nSuccessful)
-      DebugAssert(FALSE);
+      DebugFail();
   }
 
   if (nSuccessful&FZ_REPLY_DISCONNECTED)
@@ -5290,7 +5290,7 @@ void CFtpControlSocket::MakeDir(const CServerPath &path)
     }
   }
   else
-    DebugAssert(FALSE);
+    DebugFail();
 }
 
 void CFtpControlSocket::Rename(CString oldName, CString newName, const CServerPath &path, const CServerPath &newPath)

+ 10 - 10
source/filezilla/ServerPath.cpp

@@ -99,7 +99,7 @@ CServerPath::CServerPath(CString path, int nServerType, bool trim)
         int pos1 = path.Find( L"[" );
         if (pos1 == -1 || path.Right(1) != L"]")
         {
-          DebugAssert(FALSE);
+          DebugFail();
           m_bEmpty = TRUE;
           return;
         }
@@ -160,7 +160,7 @@ CServerPath::CServerPath(CString path, int nServerType, bool trim)
     }
     break;
   default:
-    DebugAssert(FALSE);
+    DebugFail();
   }
 }
 
@@ -422,7 +422,7 @@ const CString CServerPath::GetPath() const
 
     break;
   default:
-    DebugAssert(FALSE);
+    DebugFail();
   }
   return path;
 }
@@ -584,7 +584,7 @@ CServerPath::CServerPath(CString subdir, const CServerPath &parent)
   if ( subdir==L"" )
   {
     if (IsEmpty())
-      DebugAssert(FALSE);
+      DebugFail();
     else
       return;
   }
@@ -655,7 +655,7 @@ CServerPath::CServerPath(CString subdir, const CServerPath &parent)
         else
         {
           if (subdir.Right(1)!=L"]")
-            DebugAssert(FALSE);
+            DebugFail();
           subdir=subdir.Left(subdir.GetLength()-1);
           if (pos1)
             m_Prefix=subdir.Left(pos1);
@@ -667,7 +667,7 @@ CServerPath::CServerPath(CString subdir, const CServerPath &parent)
           pos1=subdir.Find( L"[" );
           int pos2=subdir.Find( L"]" );
           if (pos1!=-1 || pos2!=-1)
-            DebugAssert(FALSE);
+            DebugFail();
         }
         int pos=subdir.Find( L"." );
         while(pos!=-1)
@@ -744,7 +744,7 @@ CServerPath::CServerPath(CString subdir, const CServerPath &parent)
         subdir=subdir.Mid(pos+1);
         subdir.TrimLeft( L"\\" );
         if (subdir.Find( L":" )!=-1)
-          DebugAssert(FALSE);
+          DebugFail();
       }
       if (pos==-1 || pos==1)
       {
@@ -759,11 +759,11 @@ CServerPath::CServerPath(CString subdir, const CServerPath &parent)
           m_Segments.push_back(subdir);
       }
       else
-        DebugAssert(FALSE);
+        DebugFail();
     }
     break;
   default:
-    DebugAssert(FALSE);
+    DebugFail();
   }
 }
 
@@ -837,7 +837,7 @@ CString CServerPath::FormatFilename(CString fn, bool omitPath /*=false*/) const
     path += fn;
     break;
   default:
-    DebugAssert(FALSE);
+    DebugFail();
   }
   return path;
 }

+ 1 - 1
source/filezilla/TransferSocket.cpp

@@ -886,7 +886,7 @@ BOOL CTransferSocket::Create(BOOL bUseSsl)
       else
         m_pProxyLayer->SetProxy(PROXYTYPE_HTTP11, T2CA(GetOption(OPTION_PROXYHOST)), GetOptionVal(OPTION_PROXYPORT));
     else
-      DebugAssert(FALSE);
+      DebugFail();
     AddLayer(m_pProxyLayer);
   }
 

+ 1 - 1
source/filezilla/stdafx.h

@@ -153,7 +153,7 @@ public:
     Init();
     if (lpsz != NULL && HIWORD(lpsz) == NULL)
     {
-      DebugAssert(false);
+      DebugFail();
     }
     else
     {

+ 1 - 1
source/forms/Cleanup.cpp

@@ -120,7 +120,7 @@ void __fastcall TCleanupDialog::InitControls()
         break;
 
       default:
-        DebugFail;
+        DebugFail();
         break;
     }
 

+ 12 - 12
source/forms/CustomScpExplorer.cpp

@@ -2348,7 +2348,7 @@ bool __fastcall TCustomScpExplorerForm::ExecuteFileOperation(TFileOperation Oper
     }
     else
     {
-      DebugFail;
+      DebugFail();
     }
   }
   __finally
@@ -3017,7 +3017,7 @@ void __fastcall TCustomScpExplorerForm::ExecuteFile(TOperationSide Side,
         break;
 
       default:
-        DebugFail;
+        DebugFail();
     }
   }
   else
@@ -3040,7 +3040,7 @@ void __fastcall TCustomScpExplorerForm::ExecuteFile(TOperationSide Side,
         break;
 
       default:
-        DebugFail;
+        DebugFail();
     }
   }
 
@@ -4609,7 +4609,7 @@ void __fastcall TCustomScpExplorerForm::DoDirViewExecFile(TObject * Sender,
       }
       else
       {
-        DebugFail;
+        DebugFail();
       }
     }
 
@@ -4632,12 +4632,12 @@ bool __fastcall TCustomScpExplorerForm::GetHasDirView(TOperationSide Side)
 //---------------------------------------------------------------------------
 void __fastcall TCustomScpExplorerForm::CompareDirectories()
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TCustomScpExplorerForm::SynchronizeDirectories()
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 bool __fastcall TCustomScpExplorerForm::DoSynchronizeDirectories(
@@ -4997,7 +4997,7 @@ void __fastcall TCustomScpExplorerForm::StandaloneEdit(const UnicodeString & Fil
 //---------------------------------------------------------------------------
 void __fastcall TCustomScpExplorerForm::ExploreLocalDirectory()
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 TSessionData * __fastcall TCustomScpExplorerForm::CloneCurrentSessionData()
@@ -6207,7 +6207,7 @@ void __fastcall TCustomScpExplorerForm::QueueEvent(TTerminal * ATerminal,
       break;
 
     default:
-      DebugFail;
+      DebugFail();
   }
 
   if (!Message.IsEmpty())
@@ -6679,7 +6679,7 @@ void __fastcall TCustomScpExplorerForm::RemoteFileControlDDCreateDataObject(
 //---------------------------------------------------------------------------
 void __fastcall TCustomScpExplorerForm::GoToCommandLine()
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 void __fastcall TCustomScpExplorerForm::GoToTree()
@@ -6716,7 +6716,7 @@ TStrings * __fastcall TCustomScpExplorerForm::PanelExport(TOperationSide Side,
       break;
 
     default:
-      DebugFail;
+      DebugFail();
   }
   return ExportData.release();
 }
@@ -6739,7 +6739,7 @@ void __fastcall TCustomScpExplorerForm::PanelExportStore(TOperationSide /*Side*/
   }
   else
   {
-    DebugFail;
+    DebugFail();
   }
 }
 //---------------------------------------------------------------------------
@@ -8724,7 +8724,7 @@ bool __fastcall TCustomScpExplorerForm::UpdateToolbarDisplayMode()
 //---------------------------------------------------------------------------
 void __fastcall TCustomScpExplorerForm::DisplaySystemContextMenu()
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 bool __fastcall TCustomScpExplorerForm::IsBusy()

+ 3 - 3
source/forms/Editor.cpp

@@ -139,7 +139,7 @@ int __fastcall TPreambleFilteringFileStream::Write(const void * Buffer, int Coun
 int __fastcall TPreambleFilteringFileStream::Write(
   const System::DynamicArray<System::Byte> /*Buffer*/, int /*Offset*/, int /*Count*/)
 {
-  DebugFail;
+  DebugFail();
   EXCEPTION;
 }
 //---------------------------------------------------------------------------
@@ -1281,7 +1281,7 @@ void __fastcall TEditorForm::LoadFromFile(bool PrimaryEncoding)
 
         default:
           CanTrySecondary = false;
-          DebugFail;
+          DebugFail();
           // fallthru
 
         case CP_ACP:
@@ -1391,7 +1391,7 @@ void __fastcall TEditorForm::CheckFileSize()
             break;
 
           default:
-            DebugFail;
+            DebugFail();
         }
       }
     }

+ 2 - 2
source/forms/FileFind.cpp

@@ -126,7 +126,7 @@ void __fastcall TFileFindDialog::UpdateControls()
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
 }
@@ -252,7 +252,7 @@ void __fastcall TFileFindDialog::FileFound(TTerminal * /*Terminal*/,
   }
   else
   {
-    DebugFail;
+    DebugFail();
   }
   Item->SubItems->Add(Directory);
 

+ 2 - 2
source/forms/FullSynchronize.cpp

@@ -141,7 +141,7 @@ int __fastcall TFullSynchronizeDialog::ActualCopyParamAttrs()
         break;
 
       default:
-        DebugFail;
+        DebugFail();
         //fallthru
       case smBoth:
         Result = CopyParamAttrs.General;
@@ -214,7 +214,7 @@ void __fastcall TFullSynchronizeDialog::SetMode(TSynchronizeMode value)
        break;
 
     default:
-      DebugFail;
+      DebugFail();
   }
 }
 //---------------------------------------------------------------------------

+ 2 - 2
source/forms/GenerateUrl.cpp

@@ -254,7 +254,7 @@ void __fastcall TGenerateUrlDialog::Execute()
           break;
 
         default:
-          DebugFail;
+          DebugFail();
       }
     }
 
@@ -294,7 +294,7 @@ void __fastcall TGenerateUrlDialog::Execute()
     }
     else
     {
-      DebugFail;
+      DebugFail();
     }
     WinConfiguration->GenerateUrlCodeTarget = Target;
   }

+ 1 - 1
source/forms/LocationProfiles.cpp

@@ -449,7 +449,7 @@ typename T * GetProfilesObject(TObject * Sender, T * SessionObject, T * SharedOb
   {
     case 1: return SessionObject;
     case 2: return SharedObject;
-    default: DebugFail; return NULL;
+    default: DebugFail(); return NULL;
   }
 }
 //---------------------------------------------------------------------------

+ 3 - 3
source/forms/Login.cpp

@@ -1616,7 +1616,7 @@ void __fastcall TLoginDialog::DesktopIconActionExecute(TObject * /*Sender*/)
   }
   else
   {
-    DebugFail;
+    DebugFail();
   }
 
   Message = MainInstructions(Message);
@@ -1919,7 +1919,7 @@ int __fastcall TLoginDialog::FtpsToIndex(TFtps Ftps)
   switch (Ftps)
   {
     default:
-      DebugFail;
+      DebugFail();
     case ftpsNone:
       return 0;
 
@@ -1939,7 +1939,7 @@ TFtps __fastcall TLoginDialog::GetFtps()
   switch (Index)
   {
     default:
-      DebugFail;
+      DebugFail();
     case 0:
       Ftps = ftpsNone;
       break;

+ 2 - 2
source/forms/MessageDlg.cpp

@@ -802,7 +802,7 @@ void __fastcall AnswerNameAndCaption(
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       throw Exception(L"Undefined answer");
   }
 }
@@ -1103,7 +1103,7 @@ TForm * __fastcall TMessageForm::Create(const UnicodeString & Msg,
         break;
 
       default:
-        DebugFail;
+        DebugFail();
         break;
     }
 

+ 5 - 5
source/forms/NonVisual.cpp

@@ -396,9 +396,9 @@ void __fastcall TNonVisualDataModule::ExplorerActionsUpdate(
   UPDSORTC(dv, Name, uv, Group)
   #define COLVIEWPROPS ((TCustomDirViewColProperties*)(((TCustomDirView*)(((TListColumns*)(ListColumn->Collection))->Owner()))->ColProperties))
   UPDEX(SortColumnAscendingAction, (ListColumn != NULL), SortColumnAscendingAction->Checked =
-    (COLVIEWPROPS->SortColumn == ListColumn->Index) && COLVIEWPROPS->SortAscending, /*DebugAssert(false)*/  )
+    (COLVIEWPROPS->SortColumn == ListColumn->Index) && COLVIEWPROPS->SortAscending, /*DebugFail()*/  )
   UPDEX(SortColumnDescendingAction, (ListColumn != NULL), SortColumnDescendingAction->Checked =
-    (COLVIEWPROPS->SortColumn == ListColumn->Index) && !COLVIEWPROPS->SortAscending, /*DebugAssert(false)*/ )
+    (COLVIEWPROPS->SortColumn == ListColumn->Index) && !COLVIEWPROPS->SortAscending, /*DebugFail()*/ )
   #undef COLVIEWPROPS
 
   // SHOW/HIDE COLUMN
@@ -1692,7 +1692,7 @@ void __fastcall TNonVisualDataModule::CycleQueueOnceEmptyAction()
   }
   else
   {
-    DebugFail;
+    DebugFail();
   }
 }
 //---------------------------------------------------------------------------
@@ -1717,7 +1717,7 @@ TAction * __fastcall TNonVisualDataModule::CurrentQueueOnceEmptyAction()
   }
   else
   {
-    DebugFail;
+    DebugFail();
   }
   return Result;
 }
@@ -1744,7 +1744,7 @@ TOnceDoneOperation __fastcall TNonVisualDataModule::CurrentQueueOnceEmptyOperati
   }
   else
   {
-    DebugFail;
+    DebugFail();
   }
   return Result;
 }

+ 1 - 1
source/forms/OpenDirectory.cpp

@@ -290,7 +290,7 @@ typename T * GetBookmarkObject(TObject * Sender, T * SessionObject, T * SharedOb
   {
     case 1: return SessionObject;
     case 2: return SharedObject;
-    default: DebugFail; return NULL;
+    default: DebugFail(); return NULL;
   }
 }
 //---------------------------------------------------------------------------

+ 5 - 5
source/forms/Preferences.cpp

@@ -169,7 +169,7 @@ TTabSheet * __fastcall TPreferencesDialog::FindPageForTreeNode(TTreeNode * Node)
       return Sheet;
     }
   }
-  DebugFail;
+  DebugFail();
   return NULL;
 }
 //---------------------------------------------------------------------------
@@ -446,7 +446,7 @@ void __fastcall TPreferencesDialog::LoadConfiguration()
         FormatSizeBytesCombo->ItemIndex = 2;
         break;
       default:
-        DebugFail;
+        DebugFail();
     }
 
     bool CustomPanelFont = !WinConfiguration->PanelFont.FontName.IsEmpty();
@@ -524,7 +524,7 @@ void __fastcall TPreferencesDialog::LoadConfiguration()
         break;
 
       default:
-        DebugFail;
+        DebugFail();
         break;
     }
 
@@ -810,7 +810,7 @@ void __fastcall TPreferencesDialog::SaveConfiguration()
         WinConfiguration->FormatSizeBytes = fbShort;
         break;
       default:
-        DebugFail;
+        DebugFail();
     }
 
     TFontConfiguration PanelFontConfiguration;
@@ -1479,7 +1479,7 @@ TListViewScrollOnDragOver * __fastcall TPreferencesDialog::ScrollOnDragOver(TObj
   }
   else
   {
-    DebugFail;
+    DebugFail();
     return NULL;
   }
 }

+ 1 - 1
source/forms/Progress.cpp

@@ -525,7 +525,7 @@ TTBCustomItem * __fastcall TProgressForm::CurrentOnceDoneItem()
     Iterator++;
   }
 
-  DebugFail;
+  DebugFail();
   return NULL;
 }
 //---------------------------------------------------------------------------

+ 1 - 1
source/forms/Rights.cpp

@@ -142,7 +142,7 @@ bool __fastcall TRightsFrame::GetAllowUndef()
       }
       else if (Result != Check->AllowGrayed)
       {
-        DebugFail;
+        DebugFail();
       }
     }
   }

+ 1 - 1
source/forms/ScpCommander.cpp

@@ -290,7 +290,7 @@ bool __fastcall TScpCommanderForm::InternalDDDownload(UnicodeString & TargetDire
   }
   else
   {
-    DebugFail;
+    DebugFail();
     Abort();
   }
 

+ 1 - 1
source/forms/ScpExplorer.cpp

@@ -347,7 +347,7 @@ void __fastcall TScpExplorerForm::QueueSubmenuItemPopup(
 //---------------------------------------------------------------------------
 void __fastcall TScpExplorerForm::ChangePath(TOperationSide /*Side*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 bool __fastcall TScpExplorerForm::UpdateToolbarDisplayMode()

+ 3 - 3
source/forms/SiteAdvanced.cpp

@@ -1360,7 +1360,7 @@ TProxyMethod __fastcall TSiteAdvancedDialog::GetProxyMethod()
   }
   else
   {
-    DebugFail;
+    DebugFail();
     Result = ::pmNone;
   }
   return Result;
@@ -1439,7 +1439,7 @@ TTlsVersion __fastcall TSiteAdvancedDialog::IndexToTlsVersion(int Index)
   switch (Index)
   {
     default:
-      DebugFail;
+      DebugFail();
     case 0:
       return ssl3;
     case 1:
@@ -1456,7 +1456,7 @@ int __fastcall TSiteAdvancedDialog::TlsVersionToIndex(TTlsVersion TlsVersion)
   switch (TlsVersion)
   {
     default:
-      DebugFail;
+      DebugFail();
     case ssl2:
     case ssl3:
       return 0;

+ 4 - 4
source/forms/SynchronizeChecklist.cpp

@@ -245,7 +245,7 @@ void __fastcall TSynchronizeChecklistDialog::LoadItem(TListItem * Item)
     }
     else
     {
-      DebugFail;
+      DebugFail();
     }
     AddSubItem(Item, Index, S);
     if (Action == TSynchronizeChecklist::saDownloadNew)
@@ -289,7 +289,7 @@ void __fastcall TSynchronizeChecklistDialog::LoadItem(TListItem * Item)
     }
     else
     {
-      DebugFail;
+      DebugFail();
     }
     AddSubItem(Item, Index, S);
     if (Action == TSynchronizeChecklist::saUploadNew)
@@ -399,7 +399,7 @@ __int64 __fastcall TSynchronizeChecklistDialog::GetItemSize(const TSynchronizeCh
         return Item->Remote.Size;
 
       default:
-        DebugFail;
+        DebugFail();
         return 0;
     }
   }
@@ -530,7 +530,7 @@ void __fastcall TSynchronizeChecklistDialog::StatusBarDrawPanel(
         break;
 
       default:
-        DebugFail;
+        DebugFail();
         Possible = false;
         break;
     }

+ 8 - 8
source/windows/ConsoleRunner.cpp

@@ -184,7 +184,7 @@ void __fastcall TOwnConsole::WindowStateTimer(TObject * /*Sender*/)
   }
   else
   {
-    DebugFail;
+    DebugFail();
   }
 }
 //---------------------------------------------------------------------------
@@ -519,7 +519,7 @@ bool __fastcall TOwnConsole::WantsProgress()
 //---------------------------------------------------------------------------
 void __fastcall TOwnConsole::Progress(const TScriptProgress & /*Progress*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 class TExternalConsole : public TConsole
@@ -867,7 +867,7 @@ void __fastcall TExternalConsole::Progress(const TScriptProgress & Progress)
         break;
 
       default:
-        DebugFail;
+        DebugFail();
     }
 
     switch (Progress.Side)
@@ -881,7 +881,7 @@ void __fastcall TExternalConsole::Progress(const TScriptProgress & Progress)
         break;
 
       default:
-        DebugFail;
+        DebugFail();
     }
 
     wcsncpy(ProgressEvent.FileName, Progress.FileName.c_str(), LENOF(ProgressEvent.FileName));
@@ -985,13 +985,13 @@ bool __fastcall TNullConsole::NoInteractiveInput()
 //---------------------------------------------------------------------------
 void __fastcall TNullConsole::WaitBeforeExit()
 {
-  DebugFail;
+  DebugFail();
   // noop
 }
 //---------------------------------------------------------------------------
 bool __fastcall TNullConsole::CommandLineOnly()
 {
-  DebugFail;
+  DebugFail();
   return false;
 }
 //---------------------------------------------------------------------------
@@ -1002,7 +1002,7 @@ bool __fastcall TNullConsole::WantsProgress()
 //---------------------------------------------------------------------------
 void __fastcall TNullConsole::Progress(const TScriptProgress & /*Progress*/)
 {
-  DebugFail;
+  DebugFail();
 }
 //---------------------------------------------------------------------------
 static UnicodeString TimestampVarName(L"TIMESTAMP");
@@ -2291,7 +2291,7 @@ int __fastcall KeyGen(TConsole * Console, TProgramParams * Params)
         throw EOSExtException(FMTLOAD(KEY_TYPE_UNOPENABLE, (InputFileName)), Error);
 
       default:
-        DebugFail;
+        DebugFail();
         // fallthru
       case ktUnknown:
         throw Exception(FMTLOAD(KEY_TYPE_UNKNOWN2, (InputFileName)));

+ 2 - 2
source/windows/GUIConfiguration.cpp

@@ -830,7 +830,7 @@ LCID __fastcall TGUIConfiguration::InternalLocale()
   }
   else
   {
-    DebugFail;
+    DebugFail();
     Result = 0;
   }
   return Result;
@@ -905,7 +905,7 @@ UnicodeString __fastcall TGUIConfiguration::LocaleCopyright()
   UnicodeString Result;
   if ((FAppliedLocale == 0) || (FAppliedLocale == InternalLocale()))
   {
-    DebugFail; // we do not expect to get called with internal locale
+    DebugFail(); // we do not expect to get called with internal locale
     Result = UnicodeString();
   }
   else

+ 2 - 2
source/windows/QueueController.cpp

@@ -184,7 +184,7 @@ bool __fastcall TQueueController::AllowOperation(
       return (FQueueStatus != NULL) && (FQueueStatus->Count > 0);
 
     default:
-      DebugFail;
+      DebugFail();
       return false;
   }
 }
@@ -285,7 +285,7 @@ void __fastcall TQueueController::ExecuteOperation(TQueueOperation Operation,
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       break;
   }
 }

+ 1 - 1
source/windows/Setup.cpp

@@ -1593,7 +1593,7 @@ bool __fastcall CheckForUpdates(bool CachedResults)
         break;
 
       case qaAll:
-        DebugFail;
+        DebugFail();
         break;
     }
   }

+ 2 - 2
source/windows/SynchronizeController.cpp

@@ -159,7 +159,7 @@ void __fastcall TSynchronizeController::SynchronizeChange(
                 }
                 else
                 {
-                  DebugFail;
+                  DebugFail();
                 }
               }
             }
@@ -205,7 +205,7 @@ void __fastcall TSynchronizeController::LogOperation(TSynchronizeOperation Opera
       break;
 
     default:
-      DebugFail;
+      DebugFail();
       // fallthru
 
     case soUpload:

+ 5 - 5
source/windows/Tools.cpp

@@ -1058,7 +1058,7 @@ static void __fastcall DoVerifyKey(
         break;
 
       default:
-        DebugFail;
+        DebugFail();
         // fallthru
       case ktUnknown:
         Message = MainInstructions(FMTLOAD(KEY_TYPE_UNKNOWN2, (FileName)));
@@ -1357,20 +1357,20 @@ bool __fastcall TWinHelpTester::CanShowALink(const UnicodeString ALink,
 bool __fastcall TWinHelpTester::CanShowTopic(const UnicodeString Topic,
   const UnicodeString FileName)
 {
-  DebugFail;
+  DebugFail();
   return !Application->HelpFile.IsEmpty();
 }
 //---------------------------------------------------------------------------
 bool __fastcall TWinHelpTester::CanShowContext(const int /*Context*/,
   const UnicodeString FileName)
 {
-  DebugFail;
+  DebugFail();
   return !Application->HelpFile.IsEmpty();
 }
 //---------------------------------------------------------------------------
 TStringList * __fastcall TWinHelpTester::GetHelpStrings(const UnicodeString ALink)
 {
-  DebugFail;
+  DebugFail();
   TStringList * Result = new TStringList();
   Result->Add(ViewerName + L": " + ALink);
   return Result;
@@ -1395,7 +1395,7 @@ __fastcall TCustomHelpSelector::TCustomHelpSelector(const UnicodeString & Name)
 //---------------------------------------------------------------------------
 int __fastcall TCustomHelpSelector::SelectKeyword(TStrings * /*Keywords*/)
 {
-  DebugFail;
+  DebugFail();
   return 0;
 }
 //---------------------------------------------------------------------------

+ 2 - 2
source/windows/UserInterface.cpp

@@ -247,7 +247,7 @@ void __fastcall ShowExtendedExceptionEx(TTerminal * Terminal,
             break;
 
           default:
-            DebugFail;
+            DebugFail();
         }
       }
       else if (Result == qaRetry)
@@ -662,7 +662,7 @@ static void __fastcall GetStandardSessionColorInfo(
   COLOR_INFO(6, 1, L"Light Purple",      0xD9C1CC)
   COLOR_INFO(7, 1, L"Light Aqua",        0xE8DDB7)
 
-  DebugFail;
+  DebugFail();
   #undef COLOR_INFO
 }
 //---------------------------------------------------------------------------

+ 4 - 4
source/windows/VCLCommon.cpp

@@ -282,7 +282,7 @@ void __fastcall ReadOnlyControl(TControl * Control, bool ReadOnly)
   }
   else
   {
-    DebugFail;
+    DebugFail();
   }
 }
 //---------------------------------------------------------------------------
@@ -465,7 +465,7 @@ inline void __fastcall DoFormWindowProc(TCustomForm * Form, TWndMethod WndProc,
                  (AForm->Position != poDefaultPosOnly))
         {
           // we do not expect any other positioning
-          DebugFail;
+          DebugFail();
         }
       }
       else
@@ -1062,7 +1062,7 @@ int CALLBACK PathWordBreakProc(wchar_t * Ch, int Current, int Len, int Code)
   }
   else
   {
-    DebugFail;
+    DebugFail();
     Result = 0;
   }
   return Result;
@@ -1411,7 +1411,7 @@ static void __fastcall FocusableLabelCanvas(TStaticText * StaticText,
 
       case taCenter:
         {
-          DebugFail; // not used branch, possibly untested
+          DebugFail(); // not used branch, possibly untested
           int Diff = R.Width() - TextSize.cx;
           R.Left += Diff / 2;
           R.Right -= Diff - (Diff / 2);

+ 1 - 1
source/windows/WinConfiguration.cpp

@@ -1202,7 +1202,7 @@ void __fastcall TWinConfiguration::LoadData(THierarchicalStorage * Storage)
   {
     // can this (=reloading of configuration) even happen?
     // if it does, shouldn't we reset default commands?
-    DebugFail;
+    DebugFail();
     FCustomCommandList->Clear();
     FCustomCommandsDefaults = false;
   }

+ 1 - 1
source/windows/WinInterface.cpp

@@ -168,7 +168,7 @@ TForm * __fastcall CreateMessageDialogEx(const UnicodeString Msg,
     case qtInformation: DlgType = mtInformation; break;
     case qtError: DlgType = mtError; break;
     case qtWarning: DlgType = mtWarning; break;
-    default: DebugFail;
+    default: DebugFail();
   }
 
   unsigned int TimeoutAnswer = (Params != NULL) ? Params->TimeoutAnswer : 0;

+ 1 - 1
source/windows/WinMain.cpp

@@ -244,7 +244,7 @@ void __fastcall ImportSitesIfAny()
       }
       else
       {
-        DebugFail;
+        DebugFail();
       }
 
       UnicodeString Message = FORMAT(LoadStrPart(IMPORT_SESSIONS2, 1), (Source));