From 1ee5092d7528488b2e2160a57c5dcd433ac48d4d Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 6 Aug 2008 11:59:17 +0000 Subject: fix compile errors under debug profile in windows. fix some warnings too. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10108 e03df62e-2008-0410-955e-edbf42e46eb7 --- win/inspircdVC80.vcproj | 6 +--- win/inspircd_namedpipe.cpp | 84 ++++++++++++++++++++++----------------------- win/inspircd_win32wrapper.h | 2 ++ 3 files changed, 45 insertions(+), 47 deletions(-) (limited to 'win') diff --git a/win/inspircdVC80.vcproj b/win/inspircdVC80.vcproj index 7f0fd189f..c52526657 100644 --- a/win/inspircdVC80.vcproj +++ b/win/inspircdVC80.vcproj @@ -68,7 +68,7 @@ /> - - diff --git a/win/inspircd_namedpipe.cpp b/win/inspircd_namedpipe.cpp index 3f0f47fdf..d51172c05 100644 --- a/win/inspircd_namedpipe.cpp +++ b/win/inspircd_namedpipe.cpp @@ -19,7 +19,7 @@ void IPCThread::Run() { LPTSTR Pipename = "\\\\.\\pipe\\InspIRCdStatus"; - while (GetExitFlag() == false) + while (GetExitFlag() == false) { Pipe = CreateNamedPipe (Pipename, PIPE_ACCESS_DUPLEX, // read/write access @@ -123,45 +123,45 @@ void IPCThread::SetResult(int newresult) } -IPC::IPC(InspIRCd* Srv) : ServerInstance(Srv) -{ - /* The IPC pipe is threaded */ - thread = new IPCThread(Srv); - Srv->Threads->Create(thread); -} - -void IPC::Check() -{ - switch (thread->GetStatus()) - { - case 'N': - /* No-Operation */ - thread->SetResult(0); - thread->ClearStatus(); - break; - case '1': - /* Rehash */ - ServerInstance->Rehash("due to rehash command from GUI"); - thread->SetResult(0); - thread->ClearStatus(); - break; - case '2': - /* Shutdown */ - thread->SetResult(0); - thread->ClearStatus(); - ServerInstance->Exit(EXIT_STATUS_NOERROR); - break; - case '3': - /* Restart */ - thread->SetResult(0); - thread->ClearStatus(); - ServerInstance->Restart("Restarting due to command from GUI"); - break; - } -} - -IPC::~IPC() -{ - thread->SetExitFlag(); - delete thread; +IPC::IPC(InspIRCd* Srv) : ServerInstance(Srv) +{ + /* The IPC pipe is threaded */ + thread = new IPCThread(Srv); + Srv->Threads->Create(thread); +} + +void IPC::Check() +{ + switch (thread->GetStatus()) + { + case 'N': + /* No-Operation */ + thread->SetResult(0); + thread->ClearStatus(); + break; + case '1': + /* Rehash */ + ServerInstance->Rehash("due to rehash command from GUI"); + thread->SetResult(0); + thread->ClearStatus(); + break; + case '2': + /* Shutdown */ + thread->SetResult(0); + thread->ClearStatus(); + ServerInstance->Exit(EXIT_STATUS_NOERROR); + break; + case '3': + /* Restart */ + thread->SetResult(0); + thread->ClearStatus(); + ServerInstance->Restart("Restarting due to command from GUI"); + break; + } +} + +IPC::~IPC() +{ + thread->SetExitFlag(); + delete thread; } \ No newline at end of file diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index a7a323693..a825ae8a4 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -175,6 +175,8 @@ CoreExport int gettimeofday(struct timeval * tv, void * tz); #pragma warning(disable:4312) // warning C4312: 'type cast' : conversion from 'int' to 'HANDLE' of greater size #pragma warning(disable:4355) // warning C4355: 'this' : used in base member initializer list #pragma warning(disable:4996) // warning C4996: 'std::_Traits_helper::move_s' was declared deprecated +#pragma warning(disable:4706) // warning C4706: assignment within conditional expression +#pragma warning(disable:4201) // mmsystem.h generates this warning /* Mehhhh... typedefs. */ -- cgit v1.2.3