[bijiben] Fix compilation warnings



commit efd1cef09734a2e8f307e43584c10f30963e6237
Author: Yosef Or Boczko <yoseforb gmail com>
Date:   Wed Oct 9 22:21:56 2013 +0200

    Fix compilation warnings

 src/bjb-controller.c         |    1 -
 src/bjb-main-view.c          |    2 +-
 src/bjb-note-view.c          |    1 -
 src/bjb-settings-dialog.c    |    2 +-
 src/libbiji/biji-error.c     |    2 +-
 src/libbiji/biji-note-book.c |    1 -
 src/libbiji/biji-note-id.c   |    4 ++--
 src/libbiji/biji-note-obj.c  |    6 +++---
 8 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/bjb-controller.c b/src/bjb-controller.c
index 54f454c..63b83be 100644
--- a/src/bjb-controller.c
+++ b/src/bjb-controller.c
@@ -90,7 +90,6 @@ bjb_controller_init (BjbController *self)
 {
   BjbControllerPrivate *priv  ;
   GtkListStore     *store ;
-  GtkListStore     *completion ;
 
   priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE
     (self, BJB_TYPE_CONTROLLER, BjbControllerPrivate);
diff --git a/src/bjb-main-view.c b/src/bjb-main-view.c
index 225fb8d..1b53109 100644
--- a/src/bjb-main-view.c
+++ b/src/bjb-main-view.c
@@ -344,7 +344,7 @@ on_item_activated (GdMainView        * gd,
   gtk_tree_model_get_iter (model, &iter, (GtkTreePath*) path);
   gtk_tree_model_get (model, &iter, GD_MAIN_COLUMN_URI, &item_path,-1);
 
-  g_return_if_fail (item_path != NULL); // #709197
+  g_return_val_if_fail (item_path != NULL, FALSE); // #709197
 
   /* Switch to that item */
   book = bjb_window_base_get_book (view->priv->window); 
diff --git a/src/bjb-note-view.c b/src/bjb-note-view.c
index 4f26693..c1fd7a8 100644
--- a/src/bjb-note-view.c
+++ b/src/bjb-note-view.c
@@ -256,7 +256,6 @@ bjb_note_view_constructed (GObject *obj)
   ClutterActor           *text_actor, *overlay;
   ClutterConstraint      *constraint;
   ClutterLayoutManager   *full, *bin;
-  gboolean                use_system_font;
   gchar                  *default_font;
   GdkRGBA                 color;
 
diff --git a/src/bjb-settings-dialog.c b/src/bjb-settings-dialog.c
index e60c40a..088b9a3 100644
--- a/src/bjb-settings-dialog.c
+++ b/src/bjb-settings-dialog.c
@@ -53,7 +53,7 @@ struct BjbSettingsDialogPrivate_
 
   /* Note Edition page */
 
-  GtkLabel        *font_lbl;
+  GtkWidget       *font_lbl;
   GtkWidget       *font_bt;
 };
 
diff --git a/src/libbiji/biji-error.c b/src/libbiji/biji-error.c
index 0a8536f..1c52243 100644
--- a/src/libbiji/biji-error.c
+++ b/src/libbiji/biji-error.c
@@ -48,5 +48,5 @@ GError *
 biji_error_new (BijiErrorType type,
                 gchar *message)
 {
-  return g_error_new (BIJI_ERROR, type, message);
+  return g_error_new_literal (BIJI_ERROR, type, message);
 }
diff --git a/src/libbiji/biji-note-book.c b/src/libbiji/biji-note-book.c
index 52dc2d2..929ff5f 100644
--- a/src/libbiji/biji-note-book.c
+++ b/src/libbiji/biji-note-book.c
@@ -332,7 +332,6 @@ on_provider_loaded_cb (BijiProvider *provider,
                        BijiNoteBook *book)
 {
   BijiItem *item = NULL;
-  BijiNoteBookChangeFlag flag = BIJI_BOOK_CHANGE_FLAG;
   GList *l;
   gint i = 0;
 
diff --git a/src/libbiji/biji-note-id.c b/src/libbiji/biji-note-id.c
index 85d6f7d..a37f346 100644
--- a/src/libbiji/biji-note-id.c
+++ b/src/libbiji/biji-note-id.c
@@ -277,7 +277,7 @@ biji_note_id_set_mtime (BijiNoteID *n, gint64 time)
 gint64
 biji_note_id_get_last_metadata_change_date (BijiNoteID* n)
 {
-  g_return_val_if_fail (BIJI_IS_NOTE_ID (n), NULL);
+  g_return_val_if_fail (BIJI_IS_NOTE_ID (n), 0);
 
   return n->priv->last_metadata_change_date;
 }
@@ -299,7 +299,7 @@ biji_note_id_set_last_metadata_change_date (BijiNoteID* n, gint64 time)
 gint64
 biji_note_id_get_create_date (BijiNoteID* n)
 {
-  g_return_val_if_fail (BIJI_IS_NOTE_ID (n), NULL);
+  g_return_val_if_fail (BIJI_IS_NOTE_ID (n), 0);
 
   return n->priv->create_date;
 }
diff --git a/src/libbiji/biji-note-obj.c b/src/libbiji/biji-note-obj.c
index e255c9d..0aa97b5 100644
--- a/src/libbiji/biji-note-obj.c
+++ b/src/libbiji/biji-note-obj.c
@@ -340,7 +340,7 @@ out:
 gboolean
 biji_note_obj_set_mtime (BijiNoteObj* n, gint64 mtime)
 {
-  g_return_if_fail (BIJI_IS_NOTE_OBJ (n));
+  g_return_val_if_fail (BIJI_IS_NOTE_OBJ (n), FALSE);
 
   return biji_note_id_set_mtime (n->priv->id, mtime);
 }
@@ -365,7 +365,7 @@ biji_note_obj_get_last_change_date_string (BijiNoteObj *self)
 gint64
 biji_note_obj_get_last_metadata_change_date (BijiNoteObj *note)
 {
-  g_return_val_if_fail (BIJI_IS_NOTE_OBJ (note), NULL);
+  g_return_val_if_fail (BIJI_IS_NOTE_OBJ (note), 0);
 
   return biji_note_id_get_last_metadata_change_date (note->priv->id);
 }
@@ -782,7 +782,7 @@ biji_note_obj_is_template(BijiNoteObj *note)
 gint64
 biji_note_obj_get_create_date (BijiNoteObj *note)
 {
-  g_return_val_if_fail (BIJI_IS_NOTE_OBJ (note), NULL);
+  g_return_val_if_fail (BIJI_IS_NOTE_OBJ (note), 0);
 
   return biji_note_id_get_create_date (note->priv->id);
 }


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