build: fix compile warning
Change-Id: Ic698231c25a47d27c15d0c43b6fd777086f991b6
diff --git a/src/add-contact-panel.cpp b/src/add-contact-panel.cpp
index 9e0db74..32bd79e 100644
--- a/src/add-contact-panel.cpp
+++ b/src/add-contact-panel.cpp
@@ -99,5 +99,5 @@
#if WAF
#include "add-contact-panel.moc"
-#include "add-contact-panel.cpp.moc"
+// #include "add-contact-panel.cpp.moc"
#endif
diff --git a/src/browse-contact-dialog.cpp b/src/browse-contact-dialog.cpp
index f437eeb..27a2881 100644
--- a/src/browse-contact-dialog.cpp
+++ b/src/browse-contact-dialog.cpp
@@ -135,5 +135,5 @@
#if WAF
#include "browse-contact-dialog.moc"
-#include "browse-contact-dialog.cpp.moc"
+// #include "browse-contact-dialog.cpp.moc"
#endif
diff --git a/src/chat-dialog.cpp b/src/chat-dialog.cpp
index 407349a..442e866 100644
--- a/src/chat-dialog.cpp
+++ b/src/chat-dialog.cpp
@@ -1298,5 +1298,5 @@
#if WAF
#include "chat-dialog.moc"
-#include "chat-dialog.cpp.moc"
+// #include "chat-dialog.cpp.moc"
#endif
diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index 7653cd0..a6fec03 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -49,7 +49,6 @@
using ndn::OnInterestValidated;
using ndn::OnInterestValidationFailed;
-static const uint8_t DNS_RP_SEPARATOR[2] = {0xF0, 0x2E}; // %F0.
ContactManager::ContactManager(shared_ptr<Face> face,
QObject* parent)
@@ -917,5 +916,5 @@
#if WAF
#include "contact-manager.moc"
-#include "contact-manager.cpp.moc"
+// #include "contact-manager.cpp.moc"
#endif
diff --git a/src/contact-panel.cpp b/src/contact-panel.cpp
index 4b8dee8..bebd2fb 100644
--- a/src/contact-panel.cpp
+++ b/src/contact-panel.cpp
@@ -341,5 +341,5 @@
#if WAF
#include "contact-panel.moc"
-#include "contact-panel.cpp.moc"
+// #include "contact-panel.cpp.moc"
#endif
diff --git a/src/contact-storage.cpp b/src/contact-storage.cpp
index 8f37079..c894849 100644
--- a/src/contact-storage.cpp
+++ b/src/contact-storage.cpp
@@ -251,7 +251,7 @@
-1, &stmt, 0);
sqlite3_bind_string(stmt, 1, m_identity.toUri(), SQLITE_TRANSIENT);
sqlite3_bind_block(stmt, 2, newEndorseCertificate.wireEncode(), SQLITE_TRANSIENT);
- int res = sqlite3_step(stmt);
+ sqlite3_step(stmt);
sqlite3_finalize(stmt);
}
@@ -286,9 +286,8 @@
-1, &stmt, 0);
sqlite3_bind_string(stmt, 1, endorserName.toUri(), SQLITE_TRANSIENT);
sqlite3_bind_string(stmt, 2, certName.toUri(), SQLITE_TRANSIENT);
- const Block &block = endorseCertificate.wireEncode();
sqlite3_bind_block(stmt, 3, endorseCertificate.wireEncode(), SQLITE_TRANSIENT);
- int res = sqlite3_step(stmt);
+ sqlite3_step(stmt);
sqlite3_finalize(stmt);
return;
}
@@ -343,17 +342,17 @@
sqlite3_stmt *stmt;
sqlite3_prepare_v2(m_db, "DELETE FROM Contact WHERE contact_namespace=?", -1, &stmt, 0);
sqlite3_bind_string(stmt, 1, identity, SQLITE_TRANSIENT);
- int res = sqlite3_step(stmt);
+ sqlite3_step(stmt);
sqlite3_finalize(stmt);
sqlite3_prepare_v2(m_db, "DELETE FROM ContactProfile WHERE profile_identity=?", -1, &stmt, 0);
sqlite3_bind_string(stmt, 1, identity, SQLITE_TRANSIENT);
- res = sqlite3_step(stmt);
+ sqlite3_step(stmt);
sqlite3_finalize(stmt);
sqlite3_prepare_v2(m_db, "DELETE FROM TrustScope WHERE contact_namespace=?", -1, &stmt, 0);
sqlite3_bind_string(stmt, 1, identity, SQLITE_TRANSIENT);
- res = sqlite3_step(stmt);
+ sqlite3_step(stmt);
sqlite3_finalize(stmt);
}
@@ -486,7 +485,7 @@
-1, &stmt, 0);
sqlite3_bind_int(stmt, 1, (isIntroducer ? 1 : 0));
sqlite3_bind_string(stmt, 2, identity.toUri(), SQLITE_TRANSIENT);
- int res = sqlite3_step(stmt);
+ sqlite3_step(stmt);
sqlite3_finalize(stmt);
return;
}
@@ -499,7 +498,7 @@
-1, &stmt, 0);
sqlite3_bind_string(stmt, 1, alias, SQLITE_TRANSIENT);
sqlite3_bind_string(stmt, 2, identity.toUri(), SQLITE_TRANSIENT);
- int res = sqlite3_step(stmt);
+ sqlite3_step(stmt);
sqlite3_finalize(stmt);
return;
}
@@ -559,7 +558,7 @@
sqlite3_bind_string(stmt, 2, type, SQLITE_TRANSIENT);
sqlite3_bind_block(stmt, 3, data, SQLITE_TRANSIENT);
sqlite3_bind_string(stmt, 4, dataName, SQLITE_TRANSIENT);
- int res = sqlite3_step(stmt);
+ sqlite3_step(stmt);
sqlite3_finalize(stmt);
}
diff --git a/src/controller.cpp b/src/controller.cpp
index 915e3d8..2ecae87 100644
--- a/src/controller.cpp
+++ b/src/controller.cpp
@@ -200,8 +200,10 @@
.append(QDir::separator())
.append(getDBName().c_str());
m_db.setDatabaseName(path);
- bool ok = m_db.open();
+ m_db.open();
+
+ // bool ok = m_db.open();
// _LOG_DEBUG("DB opened: " << std::boolalpha << ok );
}
@@ -829,5 +831,5 @@
#if WAF
#include "controller.moc"
-#include "controller.cpp.moc"
+// #include "controller.cpp.moc"
#endif
diff --git a/src/digest-tree-scene.cpp b/src/digest-tree-scene.cpp
index 65204df..a253384 100644
--- a/src/digest-tree-scene.cpp
+++ b/src/digest-tree-scene.cpp
@@ -349,5 +349,5 @@
#if WAF
#include "digest-tree-scene.moc"
-#include "digest-tree-scene.cpp.moc"
+// #include "digest-tree-scene.cpp.moc"
#endif
diff --git a/src/endorse-combobox-delegate.cpp b/src/endorse-combobox-delegate.cpp
index d881f18..be46ccd 100644
--- a/src/endorse-combobox-delegate.cpp
+++ b/src/endorse-combobox-delegate.cpp
@@ -80,5 +80,5 @@
#if WAF
#include "endorse-combobox-delegate.moc"
-#include "endorse-combobox-delegate.cpp.moc"
+// #include "endorse-combobox-delegate.cpp.moc"
#endif
diff --git a/src/invitation-dialog.cpp b/src/invitation-dialog.cpp
index a847b93..38665a8 100644
--- a/src/invitation-dialog.cpp
+++ b/src/invitation-dialog.cpp
@@ -65,5 +65,5 @@
#if WAF
#include "invitation-dialog.moc"
-#include "invitation-dialog.cpp.moc"
+// #include "invitation-dialog.cpp.moc"
#endif
diff --git a/src/invite-list-dialog.cpp b/src/invite-list-dialog.cpp
index ccac3ed..7e055f6 100644
--- a/src/invite-list-dialog.cpp
+++ b/src/invite-list-dialog.cpp
@@ -82,5 +82,5 @@
#if WAF
#include "invite-list-dialog.moc"
-#include "invite-list-dialog.cpp.moc"
+// #include "invite-list-dialog.cpp.moc"
#endif
diff --git a/src/profile-editor.cpp b/src/profile-editor.cpp
index 4e91a56..d7c324a 100644
--- a/src/profile-editor.cpp
+++ b/src/profile-editor.cpp
@@ -104,5 +104,5 @@
#if WAF
#include "profile-editor.moc"
-#include "profile-editor.cpp.moc"
+// #include "profile-editor.cpp.moc"
#endif
diff --git a/src/set-alias-dialog.cpp b/src/set-alias-dialog.cpp
index 599749c..f19d98f 100644
--- a/src/set-alias-dialog.cpp
+++ b/src/set-alias-dialog.cpp
@@ -56,5 +56,5 @@
#if WAF
#include "set-alias-dialog.moc"
-#include "set-alias-dialog.cpp.moc"
+// #include "set-alias-dialog.cpp.moc"
#endif
diff --git a/src/setting-dialog.cpp b/src/setting-dialog.cpp
index 59c6b73..98434ef 100644
--- a/src/setting-dialog.cpp
+++ b/src/setting-dialog.cpp
@@ -74,5 +74,5 @@
#if WAF
#include "setting-dialog.moc"
-#include "setting-dialog.cpp.moc"
+// #include "setting-dialog.cpp.moc"
#endif
diff --git a/src/start-chat-dialog.cpp b/src/start-chat-dialog.cpp
index 8aa7965..1f4ace0 100644
--- a/src/start-chat-dialog.cpp
+++ b/src/start-chat-dialog.cpp
@@ -55,5 +55,5 @@
#if WAF
#include "start-chat-dialog.moc"
-#include "start-chat-dialog.cpp.moc"
+// #include "start-chat-dialog.cpp.moc"
#endif
diff --git a/src/trust-tree-scene.cpp b/src/trust-tree-scene.cpp
index 73643f2..dc2d802 100644
--- a/src/trust-tree-scene.cpp
+++ b/src/trust-tree-scene.cpp
@@ -97,7 +97,6 @@
QRectF textRect(x - nodeSize / 2, y + nodeSize, 2 * nodeSize, 30);
addRect(textRect, QPen(Qt::darkCyan), QBrush(Qt::darkCyan));
QGraphicsTextItem *nickItem = addText(QString::fromStdString((*it)->name().toUri()));
- QRectF textBoundingRect = nickItem->boundingRect();
nickItem->setDefaultTextColor(Qt::white);
nickItem->setFont(QFont("Cursive", 8, QFont::Bold));
nickItem->setPos(x - nodeSize / 2 + 10, y + nodeSize + 5);
@@ -108,5 +107,5 @@
#if WAF
#include "trust-tree-scene.moc"
-#include "trust-tree-scene.cpp.moc"
+// #include "trust-tree-scene.cpp.moc"
#endif
diff --git a/waf b/waf
index 1870a54..2206ed3 100755
--- a/waf
+++ b/waf
Binary files differ
diff --git a/wscript b/wscript
index 6e6d1db..7bf7d90 100644
--- a/wscript
+++ b/wscript
@@ -66,7 +66,7 @@
qt = bld (
target = "ChronoChat",
features = feature_list,
- defines = "WAF",
+ defines = "WAF=1",
source = bld.path.ant_glob(['src/*.cpp', 'src/*.ui', '*.qrc', 'logging.cc', 'src/*.proto']),
includes = "src .",
use = "QTCORE QTGUI QTWIDGETS QTSQL NDN_CXX BOOST LOG4CXX SYNC",