summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-06 11:59:17 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-06 11:59:17 +0000
commit1ee5092d7528488b2e2160a57c5dcd433ac48d4d (patch)
tree7b2109aeb51c6a58807c9bd936c947170b9c6f73
parenteb154d31f7dcda835b8cbbc0b50769d7f2474894 (diff)
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
-rw-r--r--src/configreader.cpp7
-rw-r--r--src/user_resolver.cpp2
-rw-r--r--src/users.cpp2
-rw-r--r--win/inspircdVC80.vcproj6
-rw-r--r--win/inspircd_namedpipe.cpp84
-rw-r--r--win/inspircd_win32wrapper.h2
6 files changed, 47 insertions, 56 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 2f7a651e6..4a4e97a89 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -82,7 +82,6 @@ bool ServerConfig::AddIOHook(Module* iomod, BufferedSocket* is)
else
{
throw ModuleException("BufferedSocket derived class already hooked by another module");
- return false;
}
}
@@ -136,15 +135,9 @@ bool ServerConfig::CheckOnce(const char* tag, ConfigDataHash &newconf)
int count = ConfValueEnum(newconf, tag);
if (count > 1)
- {
throw CoreException("You have more than one <"+std::string(tag)+"> tag, this is not permitted.");
- return false;
- }
if (count < 1)
- {
throw CoreException("You have not defined a <"+std::string(tag)+"> tag, this is required.");
- return false;
- }
return true;
}
diff --git a/src/user_resolver.cpp b/src/user_resolver.cpp
index edfb64528..b5f03ca09 100644
--- a/src/user_resolver.cpp
+++ b/src/user_resolver.cpp
@@ -36,7 +36,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl,
/* Check we didnt time out */
if (this->bound_user->registered != REG_ALL)
{
- bool lcached;
+ bool lcached = false;
#ifdef IPV6
if (this->bound_user->GetProtocolFamily() == AF_INET6)
{
diff --git a/src/users.cpp b/src/users.cpp
index de6085084..455bb74ec 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -98,7 +98,7 @@ void User::StartDNSLookup()
{
try
{
- bool cached;
+ bool cached = false;
const char* sip = this->GetIPString(false);
/* Special case for 4in6 (Have i mentioned i HATE 4in6?) */
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 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="dbghelp.lib ws2_32.lib mswsock.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
+ AdditionalDependencies="psapi.lib ws2_32.lib mswsock.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
ShowProgress="0"
OutputFile="$(OutDir)/inspircd.exe"
LinkIncremental="1"
@@ -786,10 +786,6 @@
>
</File>
<File
- RelativePath="..\src\modes\umode_n.cpp"
- >
- </File>
- <File
RelativePath="..\src\modes\umode_o.cpp"
>
</File>
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. */