summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2012-09-24 15:54:49 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2012-09-24 15:54:49 -0400
commit38ad523f91c5b89cebd01e6e0f61ea8859c02253 (patch)
tree14f518edc9ab9a54a9dc1c9a5f4b0bdc3b313a29
parenta71e2fb64ed87559221a175d4dfd822d683ebb3d (diff)
Fix a few oddball warnings that came up from clang, and also make it so webcpanel.so can be compiled under Mac OS X.
-rw-r--r--include/serialize.h2
-rw-r--r--modules/CMakeLists.txt2
-rw-r--r--modules/database/db_sql.cpp1
-rw-r--r--modules/extra/m_ldap_oper.cpp1
-rw-r--r--modules/extra/sql.h5
-rw-r--r--modules/extra/webcpanel/webcpanel.h2
-rw-r--r--modules/protocol/inspircd-ts6.h2
7 files changed, 9 insertions, 6 deletions
diff --git a/include/serialize.h b/include/serialize.h
index 5f8801854..67eb6b8ce 100644
--- a/include/serialize.h
+++ b/include/serialize.h
@@ -220,7 +220,7 @@ class serialize_obj : public dynamic_reference_base
{
if (!this->invalid)
return this->ref != NULL;
- return NULL;
+ return false;
}
inline void operator=(T *newref)
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 13eb83d5a..b49b53d37 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -78,6 +78,7 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
endif(WIN32)
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${TEMP_LDFLAGS} ${WIN32_NO_LIBS}")
add_dependencies(${SO} ${PROGRAM_NAME})
+ target_link_libraries(${SO} ${PROGRAM_NAME})
if(GETTEXT_FOUND)
add_dependencies(${SO} module_language)
endif(GETTEXT_FOUND)
@@ -180,6 +181,7 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
add_library(${SO} MODULE ${MODULES_SUBDIR_SRCS})
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${SUBDIR_LDFLAGS}")
add_dependencies(${SO} ${PROGRAM_NAME})
+ target_link_libraries(${SO} ${PROGRAM_NAME})
if(GETTEXT_FOUND)
add_dependencies(${SO} module_language)
endif(GETTEXT_FOUND)
diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp
index b4b81375c..9d31d350b 100644
--- a/modules/database/db_sql.cpp
+++ b/modules/database/db_sql.cpp
@@ -15,6 +15,7 @@ class SQLSQLInterface : public SQLInterface
{
public:
SQLSQLInterface(Module *o) : SQLInterface(o) { }
+ virtual ~SQLSQLInterface() { }
void OnResult(const SQLResult &r) anope_override
{
diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp
index f432f35b8..4f1784553 100644
--- a/modules/extra/m_ldap_oper.cpp
+++ b/modules/extra/m_ldap_oper.cpp
@@ -15,7 +15,6 @@ class IdentifyInterface : public LDAPInterface
void Add(LDAPQuery id, const Anope::string &nick)
{
- std::map<LDAPQuery, Anope::string>::iterator it = this->requests.find(id);
this->requests[id] = nick;
}
diff --git a/modules/extra/sql.h b/modules/extra/sql.h
index 62d7b73c0..7e10c7150 100644
--- a/modules/extra/sql.h
+++ b/modules/extra/sql.h
@@ -32,7 +32,7 @@ struct SQLQuery
this->parameters.clear();
return *this;
}
-
+
bool operator==(const SQLQuery &other) const
{
return this->query == other.query;
@@ -98,7 +98,7 @@ class SQLResult
std::map<Anope::string, Anope::string>::const_iterator it = rows.find(col);
if (it == rows.end())
throw SQLException("Unknown column name in SQLResult: " + col);
-
+
return it->second;
}
};
@@ -111,6 +111,7 @@ class SQLInterface
Module *owner;
SQLInterface(Module *m) : owner(m) { }
+ virtual ~SQLInterface() { }
virtual void OnResult(const SQLResult &r) = 0;
virtual void OnError(const SQLResult &r) = 0;
diff --git a/modules/extra/webcpanel/webcpanel.h b/modules/extra/webcpanel/webcpanel.h
index 79f902b0f..948d5b1c2 100644
--- a/modules/extra/webcpanel/webcpanel.h
+++ b/modules/extra/webcpanel/webcpanel.h
@@ -160,4 +160,4 @@ namespace WebPanel
#include "pages/chanserv/access.h"
#include "pages/chanserv/akick.h"
-#include "pages/memoserv/memos.h" \ No newline at end of file
+#include "pages/memoserv/memos.h"
diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h
index 80cc4973b..0ce5be921 100644
--- a/modules/protocol/inspircd-ts6.h
+++ b/modules/protocol/inspircd-ts6.h
@@ -283,7 +283,7 @@ class InspIRCdTS6Proto : public IRCDProto
UplinkSocket::Message(Me) << "ENDBURST";
}
- void SendGlobopsInternal(BotInfo *source, const Anope::string &buf)
+ void SendGlobopsInternal(const BotInfo *source, const Anope::string &buf)
{
if (has_globopsmod)
UplinkSocket::Message(source) << "SNONOTICE g :" << buf;