summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-13 17:26:40 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-13 17:35:31 (GMT)
commitb7b5d7093be4591a44dbfbaaec6aa253d2f767ac (patch)
tree709a5506a7f9b3d2467da4f89b53cb02874a319a
parent32ad273cf4fdc4cd0df9c8982824b62c02a3c61a (diff)
downloadswift-contrib-b7b5d7093be4591a44dbfbaaec6aa253d2f767ac.zip
swift-contrib-b7b5d7093be4591a44dbfbaaec6aa253d2f767ac.tar.bz2
Some more Cppcheck tweaks.
-rwxr-xr-xBuildTools/Cppcheck.sh1
-rw-r--r--Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp1
-rw-r--r--Swift/Controllers/Chat/UserSearchController.cpp4
-rw-r--r--Swift/QtUI/main.cpp2
-rw-r--r--Swiftob/main.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/BuildTools/Cppcheck.sh b/BuildTools/Cppcheck.sh
index a1f33f6..7b6a33b 100755
--- a/BuildTools/Cppcheck.sh
+++ b/BuildTools/Cppcheck.sh
@@ -6,6 +6,7 @@ cppcheck $@ \
--suppress=postfixOperator:3rdParty/hippomocks.h \
--suppress=stlSize:3rdParty/hippomocks.h \
--suppress=noConstructor \
+ --suppress=publicAllocationError:Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp \
-i 3rdParty -i .git -i .sconf_temp \
-i Swiftob/linit.cpp \
-i Swift/QtUI/EventViewer/main.cpp \
diff --git a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
index ee27196..b8cb368 100644
--- a/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
+++ b/Swift/Controllers/Chat/UnitTest/ChatsManagerTest.cpp
@@ -61,7 +61,6 @@ class ChatsManagerTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE_END();
public:
- // cppcheck-suppress publicAllocationError
void setUp() {
mocks_ = new MockRepository();
jid_ = JID("test@test.com/resource");
diff --git a/Swift/Controllers/Chat/UserSearchController.cpp b/Swift/Controllers/Chat/UserSearchController.cpp
index deac2f9..5a76c5d 100644
--- a/Swift/Controllers/Chat/UserSearchController.cpp
+++ b/Swift/Controllers/Chat/UserSearchController.cpp
@@ -85,12 +85,12 @@ void UserSearchController::endDiscoWalker() {
void UserSearchController::handleDiscoServiceFound(const JID& jid, boost::shared_ptr<DiscoInfo> info) {
- bool isUserDirectory = false;
+ //bool isUserDirectory = false;
bool supports55 = false;
foreach (DiscoInfo::Identity identity, info->getIdentities()) {
if ((identity.getCategory() == "directory"
&& identity.getType() == "user")) {
- isUserDirectory = true;
+ //isUserDirectory = true;
}
}
std::vector<std::string> features = info->getFeatures();
diff --git a/Swift/QtUI/main.cpp b/Swift/QtUI/main.cpp
index de9d122..d44bd01 100644
--- a/Swift/QtUI/main.cpp
+++ b/Swift/QtUI/main.cpp
@@ -43,7 +43,7 @@ int main(int argc, char* argv[]) {
boost::program_options::variables_map vm;
try {
boost::program_options::store(boost::program_options::parse_command_line(argc, argv, desc), vm);
- } catch (boost::program_options::unknown_option option) {
+ } catch (const boost::program_options::unknown_option& option) {
#if BOOST_VERSION >= 104200
std::cout << "Ignoring unknown option " << option.get_option_name() << " but continuing." << std::endl;
#else
diff --git a/Swiftob/main.cpp b/Swiftob/main.cpp
index 9908b45..a4e0925 100644
--- a/Swiftob/main.cpp
+++ b/Swiftob/main.cpp
@@ -17,7 +17,7 @@ int main(int argc, char* argv[]) {
boost::program_options::variables_map vm;
try {
boost::program_options::store(boost::program_options::parse_command_line(argc, argv, desc), vm);
- } catch (boost::program_options::unknown_option option) {
+ } catch (const boost::program_options::unknown_option& option) {
#if BOOST_VERSION >= 104200
std::cout << "Ignoring unknown option " << option.get_option_name() << " but continuing." << std::endl;
#else