[gnote] Fix compilation warnings



commit 5b249817cf34e1b4aa4a5ab1c9e904d5cf09b125
Author: Aurimas Äernius <aurisc4 gmail com>
Date:   Tue Aug 30 22:34:43 2011 +0300

    Fix compilation warnings

 src/note.cpp              |    2 +-
 src/preferencesdialog.cpp |    2 +-
 src/recentchanges.cpp     |    2 +-
 src/utils.cpp             |    3 +--
 src/watchers.cpp          |    4 ++--
 5 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/note.cpp b/src/note.cpp
index ef06206..1571967 100644
--- a/src/note.cpp
+++ b/src/note.cpp
@@ -1103,7 +1103,7 @@ namespace gnote {
 
   const Glib::RefPtr<NoteTagTable> & Note::get_tag_table()
   {
-    if (m_tag_table == NULL) {
+    if (!m_tag_table) {
       // NOTE: Sharing the same TagTable means
       // that formatting is duplicated between
       // buffers.
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp
index cdd01ff..bbf3f38 100644
--- a/src/preferencesdialog.cpp
+++ b/src/preferencesdialog.cpp
@@ -721,7 +721,7 @@ namespace gnote {
     for(sharp::ModuleList::const_iterator iter = list.begin();
         iter != list.end(); ++iter) {
 
-      Gtk::TreeIter treeiter = m_addin_tree_model->append(*iter);
+      m_addin_tree_model->append(*iter);
     }
 
     update_addin_buttons();
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index ae5eb4c..1a7c1f9 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -752,7 +752,7 @@ namespace gnote {
     }
   }
 
-  void NoteRecentChanges::on_notebook_row_edited(const Glib::ustring& tree_path,
+  void NoteRecentChanges::on_notebook_row_edited(const Glib::ustring& /*tree_path*/,
                                                  const Glib::ustring& new_text)
   {
     if (notebooks::NotebookManager::instance().notebook_exists(new_text) ||
diff --git a/src/utils.cpp b/src/utils.cpp
index 1751994..0f5dd77 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -58,8 +58,7 @@ namespace gnote {
                               int & y,
                               bool & push_in)
       {
-        if (menu->get_attach_widget() == NULL ||
-            menu->get_attach_widget()->get_window() == NULL) {
+        if (!menu->get_attach_widget() || !menu->get_attach_widget()->get_window()) {
           // Prevent null exception in weird cases
           x = 0;
           y = 0;
diff --git a/src/watchers.cpp b/src/watchers.cpp
index 6253a68..e395687 100644
--- a/src/watchers.cpp
+++ b/src/watchers.cpp
@@ -743,7 +743,7 @@ namespace gnote {
   }
 
 
-  void NoteLinkWatcher::on_note_renamed(const Note::Ptr& renamed, const std::string& old_title)
+  void NoteLinkWatcher::on_note_renamed(const Note::Ptr& renamed, const std::string& /*old_title*/)
   {
     if (renamed == get_note()) {
       return;
@@ -879,7 +879,7 @@ namespace gnote {
   }
 
 
-  void NoteLinkWatcher::on_apply_tag(const Glib::RefPtr<Gtk::TextBuffer::Tag> & tag,
+  void NoteLinkWatcher::on_apply_tag(const Glib::RefPtr<Gtk::TextBuffer::Tag> & /*tag*/,
                                      const Gtk::TextIter & start, const Gtk::TextIter &end)
   {
     std::string link_name = start.get_text (end);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]