Commit c00eb306 authored by Cosimo Cecchi's avatar Cosimo Cecchi

all: fix GCC pointer signedness warnings

New cycle, new set of warnings triggered by glibc/GCC.
parent 8dd9f091
...@@ -1934,7 +1934,7 @@ eel_editable_label_select_region_index (EelEditableLabel *label, ...@@ -1934,7 +1934,7 @@ eel_editable_label_select_region_index (EelEditableLabel *label,
{ {
GtkTargetList *list; GtkTargetList *list;
GtkTargetEntry *targets; GtkTargetEntry *targets;
guint n_targets; gint n_targets;
list = gtk_target_list_new (NULL, 0); list = gtk_target_list_new (NULL, 0);
gtk_target_list_add_text_targets (list, 0); gtk_target_list_add_text_targets (list, 0);
......
...@@ -306,7 +306,7 @@ nautilus_get_clipboard_callback (GtkClipboard *clipboard, ...@@ -306,7 +306,7 @@ nautilus_get_clipboard_callback (GtkClipboard *clipboard,
gsize len; gsize len;
str = convert_file_list_to_string (clipboard_info, FALSE, &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); g_free (str);
} }
} }
...@@ -498,13 +498,13 @@ nautilus_clipboard_get_uri_list_from_selection_data (GtkSelectionData *selection ...@@ -498,13 +498,13 @@ nautilus_clipboard_get_uri_list_from_selection_data (GtkSelectionData *selection
|| gtk_selection_data_get_length (selection_data) <= 0) { || gtk_selection_data_get_length (selection_data) <= 0) {
items = NULL; items = NULL;
} else { } else {
guchar *data; gchar *data;
/* Not sure why it's legal to assume there's an extra byte /* 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 * past the end of the selection data that it's safe to write
* to. But gtk_editable_selection_received does this, so I * to. But gtk_editable_selection_received does this, so I
* think it is OK. * 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'; data[gtk_selection_data_get_length (selection_data)] = '\0';
lines = g_strsplit (data, "\n", 0); lines = g_strsplit (data, "\n", 0);
items = convert_lines_to_str_list (lines, cut); items = convert_lines_to_str_list (lines, cut);
......
...@@ -3878,7 +3878,7 @@ get_pixbuf_for_content (goffset file_len, ...@@ -3878,7 +3878,7 @@ get_pixbuf_for_content (goffset file_len,
res = TRUE; res = TRUE;
while (res && file_len > 0) { while (res && file_len > 0) {
chunk_len = file_len; 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_contents += chunk_len;
file_len -= chunk_len; file_len -= chunk_len;
} }
......
...@@ -239,7 +239,7 @@ nautilus_drag_build_selection_list (GtkSelectionData *data) ...@@ -239,7 +239,7 @@ nautilus_drag_build_selection_list (GtkSelectionData *data)
/* 2: Decode geometry information. */ /* 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_x, &item->icon_y,
&item->icon_width, &item->icon_height) == 4; &item->icon_width, &item->icon_height) == 4;
if (!item->got_icon_position) { if (!item->got_icon_position) {
...@@ -616,7 +616,7 @@ nautilus_drag_drag_data_get (GtkWidget *widget, ...@@ -616,7 +616,7 @@ nautilus_drag_drag_data_get (GtkWidget *widget,
gtk_selection_data_set (selection_data, gtk_selection_data_set (selection_data,
gtk_selection_data_get_target (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); g_string_free (result, TRUE);
return TRUE; return TRUE;
......
...@@ -397,7 +397,7 @@ get_direct_save_filename (GdkDragContext *context) ...@@ -397,7 +397,7 @@ get_direct_save_filename (GdkDragContext *context)
return NULL; return NULL;
} }
return prop_text; return (gchar *) prop_text;
} }
static void static void
...@@ -1532,8 +1532,8 @@ drag_data_received_callback (GtkWidget *widget, ...@@ -1532,8 +1532,8 @@ drag_data_received_callback (GtkWidget *widget,
gpointer user_data) gpointer user_data)
{ {
NautilusDragInfo *drag_info; NautilusDragInfo *drag_info;
char *tmp; guchar *tmp;
const char *tmp_raw; const guchar *tmp_raw;
int length; int length;
gboolean success; gboolean success;
...@@ -1606,7 +1606,7 @@ drag_data_received_callback (GtkWidget *widget, ...@@ -1606,7 +1606,7 @@ drag_data_received_callback (GtkWidget *widget,
tmp_raw = gtk_selection_data_get_data (data); tmp_raw = gtk_selection_data_get_data (data);
receive_dropped_raw receive_dropped_raw
(NAUTILUS_ICON_CONTAINER (widget), (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); context, x, y);
success = TRUE; success = TRUE;
break; break;
......
...@@ -684,7 +684,7 @@ receive_dropped_text (NautilusTreeViewDragDest *dest, ...@@ -684,7 +684,7 @@ receive_dropped_text (NautilusTreeViewDragDest *dest,
int x, int y) int x, int y)
{ {
char *drop_target; char *drop_target;
char *text; guchar *text;
if (!dest->details->drag_data) { if (!dest->details->drag_data) {
return; return;
...@@ -800,7 +800,7 @@ drag_data_received_callback (GtkWidget *widget, ...@@ -800,7 +800,7 @@ drag_data_received_callback (GtkWidget *widget,
gpointer data) gpointer data)
{ {
NautilusTreeViewDragDest *dest; NautilusTreeViewDragDest *dest;
const char *tmp; const gchar *tmp;
int length; int length;
gboolean success, finished; gboolean success, finished;
...@@ -839,7 +839,7 @@ drag_data_received_callback (GtkWidget *widget, ...@@ -839,7 +839,7 @@ drag_data_received_callback (GtkWidget *widget,
break; break;
case NAUTILUS_ICON_DND_RAW: case NAUTILUS_ICON_DND_RAW:
length = gtk_selection_data_get_length (selection_data); 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); receive_dropped_raw (dest, tmp, length, context, x, y);
success = TRUE; success = TRUE;
break; break;
...@@ -888,7 +888,7 @@ get_direct_save_filename (GdkDragContext *context) ...@@ -888,7 +888,7 @@ get_direct_save_filename (GdkDragContext *context)
return NULL; return NULL;
} }
return prop_text; return (gchar *) prop_text;
} }
static gboolean static gboolean
......
...@@ -159,13 +159,13 @@ parse_xml_node (GFile *file, ...@@ -159,13 +159,13 @@ parse_xml_node (GFile *file,
continue; continue;
} }
new_key = convert_key_name (attr->name); new_key = convert_key_name ((const gchar *) attr->name);
if (new_key) { if (new_key) {
property = xmlGetProp (filenode, attr->name); property = xmlGetProp (filenode, attr->name);
if (property) { if (property) {
g_file_info_set_attribute_string (info, g_file_info_set_attribute_string (info,
new_key, new_key,
property); (const gchar *) property);
xmlFree (property); xmlFree (property);
} }
} }
...@@ -174,7 +174,7 @@ parse_xml_node (GFile *file, ...@@ -174,7 +174,7 @@ parse_xml_node (GFile *file,
list_keys = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL); 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 (node = filenode->children; node != NULL; node = node->next) {
for (attr = node->properties; attr != NULL; attr = attr->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) { if (new_key) {
property = xmlGetProp (node, attr->name); property = xmlGetProp (node, attr->name);
if (property) { if (property) {
......
...@@ -166,7 +166,7 @@ nautilus_desktop_item_properties_url_drag_data_received (GtkWidget *widget, GdkD ...@@ -166,7 +166,7 @@ nautilus_desktop_item_properties_url_drag_data_received (GtkWidget *widget, GdkD
gboolean exactly_one; gboolean exactly_one;
char *path; 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'); exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
if (!exactly_one) { if (!exactly_one) {
...@@ -198,7 +198,7 @@ nautilus_desktop_item_properties_exec_drag_data_received (GtkWidget *widget, Gdk ...@@ -198,7 +198,7 @@ nautilus_desktop_item_properties_exec_drag_data_received (GtkWidget *widget, Gdk
GKeyFile *key_file; GKeyFile *key_file;
char *uri, *type, *exec; 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'); exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
if (!exactly_one) { if (!exactly_one) {
......
...@@ -447,7 +447,7 @@ file_read_callback (GObject *object, ...@@ -447,7 +447,7 @@ file_read_callback (GObject *object,
#ifdef HAVE_EXIF #ifdef HAVE_EXIF
exif_still_loading = exif_loader_write (page->details->exifldr, exif_still_loading = exif_loader_write (page->details->exifldr,
page->details->buffer, (guchar *) page->details->buffer,
count_read); count_read);
#else #else
exif_still_loading = 0; exif_still_loading = 0;
...@@ -455,7 +455,7 @@ file_read_callback (GObject *object, ...@@ -455,7 +455,7 @@ file_read_callback (GObject *object,
if (page->details->pixbuf_still_loading) { if (page->details->pixbuf_still_loading) {
if (!gdk_pixbuf_loader_write (page->details->loader, if (!gdk_pixbuf_loader_write (page->details->loader,
page->details->buffer, (const guchar *) page->details->buffer,
count_read, count_read,
NULL)) { NULL)) {
page->details->pixbuf_still_loading = FALSE; page->details->pixbuf_still_loading = FALSE;
......
...@@ -150,7 +150,7 @@ drag_data_received_callback (GtkWidget *widget, ...@@ -150,7 +150,7 @@ drag_data_received_callback (GtkWidget *widget,
g_assert (data != NULL); g_assert (data != NULL);
g_assert (callback_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) { if (names == NULL || *names == NULL) {
g_warning ("No D&D URI's"); g_warning ("No D&D URI's");
......
...@@ -1444,7 +1444,7 @@ button_drag_data_get_cb (GtkWidget *widget, ...@@ -1444,7 +1444,7 @@ button_drag_data_get_cb (GtkWidget *widget,
if (info == NAUTILUS_ICON_DND_GNOME_ICON_LIST) { if (info == NAUTILUS_ICON_DND_GNOME_ICON_LIST) {
tmp = g_strdup_printf ("%s\r\n", uri_list[0]); tmp = g_strdup_printf ("%s\r\n", uri_list[0]);
gtk_selection_data_set (selection_data, gtk_selection_data_get_target (selection_data), 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); g_free (tmp);
} else if (info == NAUTILUS_ICON_DND_URI_LIST) { } else if (info == NAUTILUS_ICON_DND_URI_LIST) {
gtk_selection_data_set_uris (selection_data, uri_list); gtk_selection_data_set_uris (selection_data, uri_list);
......
...@@ -1439,7 +1439,7 @@ drag_data_received_callback (GtkWidget *widget, ...@@ -1439,7 +1439,7 @@ drag_data_received_callback (GtkWidget *widget,
if (!sidebar->drag_data_received) { if (!sidebar->drag_data_received) {
if (gtk_selection_data_get_target (selection_data) != GDK_NONE && if (gtk_selection_data_get_target (selection_data) != GDK_NONE &&
info == TEXT_URI_LIST) { 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 { } else {
sidebar->drag_list = NULL; sidebar->drag_list = NULL;
} }
...@@ -1519,7 +1519,7 @@ drag_data_received_callback (GtkWidget *widget, ...@@ -1519,7 +1519,7 @@ drag_data_received_callback (GtkWidget *widget,
switch (info) { switch (info) {
case TEXT_URI_LIST: 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); uris = uri_list_from_selection (selection_list);
nautilus_file_operations_copy_move (uris, NULL, drop_uri, nautilus_file_operations_copy_move (uris, NULL, drop_uri,
real_action, GTK_WIDGET (tree_view), real_action, GTK_WIDGET (tree_view),
......
...@@ -472,7 +472,7 @@ nautilus_properties_window_drag_data_received (GtkWidget *widget, GdkDragContext ...@@ -472,7 +472,7 @@ nautilus_properties_window_drag_data_received (GtkWidget *widget, GdkDragContext
image = GTK_IMAGE (widget); image = GTK_IMAGE (widget);
window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (image))); 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'); exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
......
...@@ -8967,7 +8967,7 @@ metadata_for_files_in_directory_ready_callback (NautilusDirectory *directory, ...@@ -8967,7 +8967,7 @@ metadata_for_files_in_directory_ready_callback (NautilusDirectory *directory,
} }
static void static void
disconnect_handler (GObject *object, int *id) disconnect_handler (GObject *object, guint *id)
{ {
if (*id != 0) { if (*id != 0) {
g_signal_handler_disconnect (object, *id); g_signal_handler_disconnect (object, *id);
...@@ -8976,13 +8976,13 @@ disconnect_handler (GObject *object, int *id) ...@@ -8976,13 +8976,13 @@ disconnect_handler (GObject *object, int *id)
} }
static void static void
disconnect_directory_handler (NautilusView *view, int *id) disconnect_directory_handler (NautilusView *view, guint *id)
{ {
disconnect_handler (G_OBJECT (view->details->model), id); disconnect_handler (G_OBJECT (view->details->model), id);
} }
static void 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); disconnect_handler (G_OBJECT (view->details->directory_as_file), id);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment