summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-05-10 15:03:06 +0200
committerStefano Karapetsas <[email protected]>2014-05-10 15:03:06 +0200
commit4796e9bf097fd481798d58092fe95951e99e79dd (patch)
treee22952f3e0fd1b06d9177de810eb3119cbe3e459
parent30f835823d9f92d214f81225196fa7b0ea9e93e0 (diff)
parenta2ab27abdf58a2910b1c24b2612cee0e1052418c (diff)
downloadcaja-4796e9bf097fd481798d58092fe95951e99e79dd.tar.bz2
caja-4796e9bf097fd481798d58092fe95951e99e79dd.tar.xz
Merge pull request #275 from NiceandGently/master
fix some compile warnings
-rw-r--r--eel/eel-editable-label.c2
-rw-r--r--eel/eel-gdk-pixbuf-extensions.c4
-rw-r--r--eel/eel-string.c4
-rw-r--r--src/file-manager/fm-directory-view.c6
-rw-r--r--test/test-caja-search-engine.c4
-rw-r--r--test/test-copy.c4
6 files changed, 16 insertions, 8 deletions
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index c5802bf2..54ed3087 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -2079,7 +2079,7 @@ eel_editable_label_select_region_index (EelEditableLabel *label,
{
GtkTargetList *list;
GtkTargetEntry *targets;
- guint n_targets;
+ gint n_targets;
list = gtk_target_list_new (NULL, 0);
gtk_target_list_add_text_targets (list, 0);
diff --git a/eel/eel-gdk-pixbuf-extensions.c b/eel/eel-gdk-pixbuf-extensions.c
index 6870e932..b4cd9394 100644
--- a/eel/eel-gdk-pixbuf-extensions.c
+++ b/eel/eel-gdk-pixbuf-extensions.c
@@ -51,7 +51,7 @@ struct EelPixbufLoadHandle
EelPixbufLoadCallback callback;
gpointer callback_data;
GdkPixbufLoader *loader;
- char buffer[LOAD_BUFFER_SIZE];
+ guchar buffer[LOAD_BUFFER_SIZE];
};
GdkPixbuf *
@@ -112,7 +112,7 @@ GdkPixbuf *
eel_gdk_pixbuf_load_from_stream_at_size (GInputStream *stream,
int size)
{
- char buffer[LOAD_BUFFER_SIZE];
+ guchar buffer[LOAD_BUFFER_SIZE];
gssize bytes_read;
GdkPixbufLoader *loader;
GdkPixbuf *pixbuf;
diff --git a/eel/eel-string.c b/eel/eel-string.c
index fd733f88..3a8f2581 100644
--- a/eel/eel-string.c
+++ b/eel/eel-string.c
@@ -988,7 +988,11 @@ retry_atomic_decrement:
{
G_LOCK (unique_ref_strs);
/* Need to recheck after taking lock to avoid races with _get_unique() */
+#if !GLIB_CHECK_VERSION (2, 30, 0)
if (g_atomic_int_exchange_and_add (count, -1) == 0x80000001)
+#else
+ if (g_atomic_int_add (count, -1) == 0x80000001)
+#endif
{
g_hash_table_remove (unique_ref_strs, (char *)str);
g_free ((char *)count);
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 79378f5a..37639554 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -9706,7 +9706,7 @@ fm_directory_view_unmerge_menus (FMDirectoryView *view)
}
static void
-disconnect_handler (GObject *object, int *id)
+disconnect_handler (GObject *object, guint *id)
{
if (*id != 0) {
g_signal_handler_disconnect (object, *id);
@@ -9715,13 +9715,13 @@ disconnect_handler (GObject *object, int *id)
}
static void
-disconnect_directory_handler (FMDirectoryView *view, int *id)
+disconnect_directory_handler (FMDirectoryView *view, guint *id)
{
disconnect_handler (G_OBJECT (view->details->model), id);
}
static void
-disconnect_directory_as_file_handler (FMDirectoryView *view, int *id)
+disconnect_directory_as_file_handler (FMDirectoryView *view, guint *id)
{
disconnect_handler (G_OBJECT (view->details->directory_as_file), id);
}
diff --git a/test/test-caja-search-engine.c b/test/test-caja-search-engine.c
index 6a4ace70..6695f916 100644
--- a/test/test-caja-search-engine.c
+++ b/test/test-caja-search-engine.c
@@ -34,7 +34,9 @@ main (int argc, char* argv[])
CajaSearchEngine *engine;
CajaQuery *query;
- g_thread_init (NULL);
+#if !GLIB_CHECK_VERSION (2, 32, 0)
+ g_thread_init (NULL);
+#endif
gtk_init (&argc, &argv);
diff --git a/test/test-copy.c b/test/test-copy.c
index 5eaab1e5..81407812 100644
--- a/test/test-copy.c
+++ b/test/test-copy.c
@@ -45,7 +45,9 @@ main (int argc, char* argv[])
GList *infos;
CajaProgressInfo *progress_info;
- g_thread_init (NULL);
+#if !GLIB_CHECK_VERSION (2, 32, 0)
+ g_thread_init (NULL);
+#endif
test_init (&argc, &argv);