[nautilus] all: fix GCC pointer signedness warnings
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] all: fix GCC pointer signedness warnings
- Date: Thu, 31 May 2012 18:56:34 +0000 (UTC)
commit c00eb306ee711632072f761bfa4e814c405a82d2
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu May 31 14:53:49 2012 -0400
all: fix GCC pointer signedness warnings
New cycle, new set of warnings triggered by glibc/GCC.
eel/eel-editable-label.c | 2 +-
libnautilus-private/nautilus-clipboard-monitor.c | 2 +-
libnautilus-private/nautilus-clipboard.c | 4 ++--
libnautilus-private/nautilus-directory-async.c | 2 +-
libnautilus-private/nautilus-dnd.c | 4 ++--
libnautilus-private/nautilus-icon-dnd.c | 8 ++++----
libnautilus-private/nautilus-tree-view-drag-dest.c | 8 ++++----
src/nautilus-convert-metadata.c | 6 +++---
src/nautilus-desktop-item-properties.c | 4 ++--
src/nautilus-image-properties-page.c | 4 ++--
src/nautilus-location-bar.c | 2 +-
src/nautilus-pathbar.c | 2 +-
src/nautilus-places-sidebar.c | 4 ++--
src/nautilus-properties-window.c | 2 +-
src/nautilus-view.c | 6 +++---
15 files changed, 30 insertions(+), 30 deletions(-)
---
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 71d48ff..8fb5738 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -1934,7 +1934,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/libnautilus-private/nautilus-clipboard-monitor.c b/libnautilus-private/nautilus-clipboard-monitor.c
index 6947a3f..d919dbf 100644
--- a/libnautilus-private/nautilus-clipboard-monitor.c
+++ b/libnautilus-private/nautilus-clipboard-monitor.c
@@ -306,7 +306,7 @@ nautilus_get_clipboard_callback (GtkClipboard *clipboard,
gsize len;
str = convert_file_list_to_string (clipboard_info, FALSE, &len);
- gtk_selection_data_set (selection_data, copied_files_atom, 8, str, len);
+ gtk_selection_data_set (selection_data, copied_files_atom, 8, (guchar *) str, len);
g_free (str);
}
}
diff --git a/libnautilus-private/nautilus-clipboard.c b/libnautilus-private/nautilus-clipboard.c
index 15fc3fb..e120a11 100644
--- a/libnautilus-private/nautilus-clipboard.c
+++ b/libnautilus-private/nautilus-clipboard.c
@@ -498,13 +498,13 @@ nautilus_clipboard_get_uri_list_from_selection_data (GtkSelectionData *selection
|| gtk_selection_data_get_length (selection_data) <= 0) {
items = NULL;
} else {
- guchar *data;
+ gchar *data;
/* Not sure why it's legal to assume there's an extra byte
* past the end of the selection data that it's safe to write
* to. But gtk_editable_selection_received does this, so I
* think it is OK.
*/
- data = (guchar *) gtk_selection_data_get_data (selection_data);
+ data = (gchar *) gtk_selection_data_get_data (selection_data);
data[gtk_selection_data_get_length (selection_data)] = '\0';
lines = g_strsplit (data, "\n", 0);
items = convert_lines_to_str_list (lines, cut);
diff --git a/libnautilus-private/nautilus-directory-async.c b/libnautilus-private/nautilus-directory-async.c
index 852c6ed..45c9f02 100644
--- a/libnautilus-private/nautilus-directory-async.c
+++ b/libnautilus-private/nautilus-directory-async.c
@@ -3878,7 +3878,7 @@ get_pixbuf_for_content (goffset file_len,
res = TRUE;
while (res && file_len > 0) {
chunk_len = file_len;
- res = gdk_pixbuf_loader_write (loader, file_contents, chunk_len, NULL);
+ res = gdk_pixbuf_loader_write (loader, (guchar *) file_contents, chunk_len, NULL);
file_contents += chunk_len;
file_len -= chunk_len;
}
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index d9fd727..afb3c54 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -239,7 +239,7 @@ nautilus_drag_build_selection_list (GtkSelectionData *data)
/* 2: Decode geometry information. */
- item->got_icon_position = sscanf (p, "%d:%d:%d:%d%*s",
+ item->got_icon_position = sscanf ((const gchar *) p, "%d:%d:%d:%d%*s",
&item->icon_x, &item->icon_y,
&item->icon_width, &item->icon_height) == 4;
if (!item->got_icon_position) {
@@ -616,7 +616,7 @@ nautilus_drag_drag_data_get (GtkWidget *widget,
gtk_selection_data_set (selection_data,
gtk_selection_data_get_target (selection_data),
- 8, result->str, result->len);
+ 8, (guchar *) result->str, result->len);
g_string_free (result, TRUE);
return TRUE;
diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c
index 5afe2c7..3342e27 100644
--- a/libnautilus-private/nautilus-icon-dnd.c
+++ b/libnautilus-private/nautilus-icon-dnd.c
@@ -397,7 +397,7 @@ get_direct_save_filename (GdkDragContext *context)
return NULL;
}
- return prop_text;
+ return (gchar *) prop_text;
}
static void
@@ -1532,8 +1532,8 @@ drag_data_received_callback (GtkWidget *widget,
gpointer user_data)
{
NautilusDragInfo *drag_info;
- char *tmp;
- const char *tmp_raw;
+ guchar *tmp;
+ const guchar *tmp_raw;
int length;
gboolean success;
@@ -1606,7 +1606,7 @@ drag_data_received_callback (GtkWidget *widget,
tmp_raw = gtk_selection_data_get_data (data);
receive_dropped_raw
(NAUTILUS_ICON_CONTAINER (widget),
- tmp_raw, length, drag_info->direct_save_uri,
+ (const gchar *) tmp_raw, length, drag_info->direct_save_uri,
context, x, y);
success = TRUE;
break;
diff --git a/libnautilus-private/nautilus-tree-view-drag-dest.c b/libnautilus-private/nautilus-tree-view-drag-dest.c
index fcd9b98..f857add 100644
--- a/libnautilus-private/nautilus-tree-view-drag-dest.c
+++ b/libnautilus-private/nautilus-tree-view-drag-dest.c
@@ -684,7 +684,7 @@ receive_dropped_text (NautilusTreeViewDragDest *dest,
int x, int y)
{
char *drop_target;
- char *text;
+ guchar *text;
if (!dest->details->drag_data) {
return;
@@ -800,7 +800,7 @@ drag_data_received_callback (GtkWidget *widget,
gpointer data)
{
NautilusTreeViewDragDest *dest;
- const char *tmp;
+ const gchar *tmp;
int length;
gboolean success, finished;
@@ -839,7 +839,7 @@ drag_data_received_callback (GtkWidget *widget,
break;
case NAUTILUS_ICON_DND_RAW:
length = gtk_selection_data_get_length (selection_data);
- tmp = gtk_selection_data_get_data (selection_data);
+ tmp = (const gchar *) gtk_selection_data_get_data (selection_data);
receive_dropped_raw (dest, tmp, length, context, x, y);
success = TRUE;
break;
@@ -888,7 +888,7 @@ get_direct_save_filename (GdkDragContext *context)
return NULL;
}
- return prop_text;
+ return (gchar *) prop_text;
}
static gboolean
diff --git a/src/nautilus-convert-metadata.c b/src/nautilus-convert-metadata.c
index 27b40cc..971bedf 100644
--- a/src/nautilus-convert-metadata.c
+++ b/src/nautilus-convert-metadata.c
@@ -159,13 +159,13 @@ parse_xml_node (GFile *file,
continue;
}
- new_key = convert_key_name (attr->name);
+ new_key = convert_key_name ((const gchar *) attr->name);
if (new_key) {
property = xmlGetProp (filenode, attr->name);
if (property) {
g_file_info_set_attribute_string (info,
new_key,
- property);
+ (const gchar *) property);
xmlFree (property);
}
}
@@ -174,7 +174,7 @@ parse_xml_node (GFile *file,
list_keys = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL);
for (node = filenode->children; node != NULL; node = node->next) {
for (attr = node->properties; attr != NULL; attr = attr->next) {
- new_key = convert_key_name (node->name);
+ new_key = convert_key_name ((const gchar *) node->name);
if (new_key) {
property = xmlGetProp (node, attr->name);
if (property) {
diff --git a/src/nautilus-desktop-item-properties.c b/src/nautilus-desktop-item-properties.c
index ad37d91..529e1e9 100644
--- a/src/nautilus-desktop-item-properties.c
+++ b/src/nautilus-desktop-item-properties.c
@@ -166,7 +166,7 @@ nautilus_desktop_item_properties_url_drag_data_received (GtkWidget *widget, GdkD
gboolean exactly_one;
char *path;
- uris = g_strsplit (gtk_selection_data_get_data (selection_data), "\r\n", 0);
+ uris = g_strsplit ((gchar *) gtk_selection_data_get_data (selection_data), "\r\n", 0);
exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
if (!exactly_one) {
@@ -198,7 +198,7 @@ nautilus_desktop_item_properties_exec_drag_data_received (GtkWidget *widget, Gdk
GKeyFile *key_file;
char *uri, *type, *exec;
- uris = g_strsplit (gtk_selection_data_get_data (selection_data), "\r\n", 0);
+ uris = g_strsplit ((gchar *) gtk_selection_data_get_data (selection_data), "\r\n", 0);
exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
if (!exactly_one) {
diff --git a/src/nautilus-image-properties-page.c b/src/nautilus-image-properties-page.c
index cef017c..c4f70bf 100644
--- a/src/nautilus-image-properties-page.c
+++ b/src/nautilus-image-properties-page.c
@@ -447,7 +447,7 @@ file_read_callback (GObject *object,
#ifdef HAVE_EXIF
exif_still_loading = exif_loader_write (page->details->exifldr,
- page->details->buffer,
+ (guchar *) page->details->buffer,
count_read);
#else
exif_still_loading = 0;
@@ -455,7 +455,7 @@ file_read_callback (GObject *object,
if (page->details->pixbuf_still_loading) {
if (!gdk_pixbuf_loader_write (page->details->loader,
- page->details->buffer,
+ (const guchar *) page->details->buffer,
count_read,
NULL)) {
page->details->pixbuf_still_loading = FALSE;
diff --git a/src/nautilus-location-bar.c b/src/nautilus-location-bar.c
index 336e966..91363f8 100644
--- a/src/nautilus-location-bar.c
+++ b/src/nautilus-location-bar.c
@@ -150,7 +150,7 @@ drag_data_received_callback (GtkWidget *widget,
g_assert (data != NULL);
g_assert (callback_data == NULL);
- names = g_uri_list_extract_uris (gtk_selection_data_get_data (data));
+ names = g_uri_list_extract_uris ((const gchar *) gtk_selection_data_get_data (data));
if (names == NULL || *names == NULL) {
g_warning ("No D&D URI's");
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index d47184f..943461d 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -1444,7 +1444,7 @@ button_drag_data_get_cb (GtkWidget *widget,
if (info == NAUTILUS_ICON_DND_GNOME_ICON_LIST) {
tmp = g_strdup_printf ("%s\r\n", uri_list[0]);
gtk_selection_data_set (selection_data, gtk_selection_data_get_target (selection_data),
- 8, tmp, strlen (tmp));
+ 8, (const guchar *) tmp, strlen (tmp));
g_free (tmp);
} else if (info == NAUTILUS_ICON_DND_URI_LIST) {
gtk_selection_data_set_uris (selection_data, uri_list);
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 9b96193..d94ed5a 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -1439,7 +1439,7 @@ drag_data_received_callback (GtkWidget *widget,
if (!sidebar->drag_data_received) {
if (gtk_selection_data_get_target (selection_data) != GDK_NONE &&
info == TEXT_URI_LIST) {
- sidebar->drag_list = build_selection_list (gtk_selection_data_get_data (selection_data));
+ sidebar->drag_list = build_selection_list ((const gchar *) gtk_selection_data_get_data (selection_data));
} else {
sidebar->drag_list = NULL;
}
@@ -1519,7 +1519,7 @@ drag_data_received_callback (GtkWidget *widget,
switch (info) {
case TEXT_URI_LIST:
- selection_list = build_selection_list (gtk_selection_data_get_data (selection_data));
+ selection_list = build_selection_list ((const gchar *) gtk_selection_data_get_data (selection_data));
uris = uri_list_from_selection (selection_list);
nautilus_file_operations_copy_move (uris, NULL, drop_uri,
real_action, GTK_WIDGET (tree_view),
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 7a772c8..023b306 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -472,7 +472,7 @@ nautilus_properties_window_drag_data_received (GtkWidget *widget, GdkDragContext
image = GTK_IMAGE (widget);
window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (image)));
- uris = g_strsplit (gtk_selection_data_get_data (selection_data), "\r\n", 0);
+ uris = g_strsplit ((const gchar *) gtk_selection_data_get_data (selection_data), "\r\n", 0);
exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 7dc1bab..f1e7fa2 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -8967,7 +8967,7 @@ metadata_for_files_in_directory_ready_callback (NautilusDirectory *directory,
}
static void
-disconnect_handler (GObject *object, int *id)
+disconnect_handler (GObject *object, guint *id)
{
if (*id != 0) {
g_signal_handler_disconnect (object, *id);
@@ -8976,13 +8976,13 @@ disconnect_handler (GObject *object, int *id)
}
static void
-disconnect_directory_handler (NautilusView *view, int *id)
+disconnect_directory_handler (NautilusView *view, guint *id)
{
disconnect_handler (G_OBJECT (view->details->model), id);
}
static void
-disconnect_directory_as_file_handler (NautilusView *view, int *id)
+disconnect_directory_as_file_handler (NautilusView *view, guint *id)
{
disconnect_handler (G_OBJECT (view->details->directory_as_file), id);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]