Hello, I can't reproduce this problem on my i386 box. But according to the report, the bug can only be seen on an amd64. Having a look at the buildd log[1] reveals that gcc complains a log about "cast to pointer from integer of different size".
Having a look at the source code shows that it indeed relies on pointers being 32 bits, e.g. manedit/editordnd.c EditorDNDParseCmd function reads pointers assuming they are guint32. The attached patch tries to correct those warnings. I have asked someone with an AMD64 box to try to reproduce the bug with and whithout this patch, but he was not able to reproduce it in *both* cases. Can you please try it? Thanks, Thomas [1] http://buildd.debian.org/fetch.php?&pkg=manedit&ver=0.6.1-2&arch=amd64&stamp=1148185328&file=log&as=raw
diff -rN -u old-manedit-0.6.1/manedit/editordnd.c new-manedit-0.6.1/manedit/editordnd.c --- old-manedit-0.6.1/manedit/editordnd.c 2006-09-02 18:43:13.000000000 +0200 +++ new-manedit-0.6.1/manedit/editordnd.c 2006-09-02 18:43:13.000000000 +0200 @@ -104,7 +104,7 @@ GtkCTreeNode ***branch, gint *total_branches ) { - guint32 addr_val; + gpointer addr_val; gint i, n, strc; gchar **strv; @@ -131,7 +131,7 @@ /* Get editor_ptr (format in hex with no "0x" prefix) */ if(strc > 0) - i = sscanf(strv[0], "%x", (guint32 *)&addr_val); + i = sscanf(strv[0], "%p", &addr_val); else i = 0; if((i > 0) && (editor_ptr != NULL)) @@ -164,7 +164,7 @@ } else { - i = sscanf(cs, "%x", (guint32 *)&addr_val); + i = sscanf(cs, "%p", &addr_val); if(i > 0) (*branch)[n] = (GtkCTreeNode *)addr_val; else @@ -950,14 +950,14 @@ */ if(branch_ptr != NULL) buf = g_strdup_printf( - "%.8x %.8x", - (guint32)editor, - (guint32)branch_ptr + "%p %p", + (gpointer)editor, + (gpointer)branch_ptr ); else buf = g_strdup_printf( - "%.8x", - (guint32)editor + "%p", + (gpointer)editor ); /* Send out data */ diff -rN -u old-manedit-0.6.1/manedit/editorfio.c new-manedit-0.6.1/manedit/editorfio.c --- old-manedit-0.6.1/manedit/editorfio.c 2006-09-02 18:43:13.000000000 +0200 +++ new-manedit-0.6.1/manedit/editorfio.c 2006-09-02 18:43:13.000000000 +0200 @@ -470,7 +470,7 @@ mp_header_struct *mp_header ) { - gint i; + size_t i; const gchar *line; gchar *new_line; diff -rN -u old-manedit-0.6.1/manedit/fb.c new-manedit-0.6.1/manedit/fb.c --- old-manedit-0.6.1/manedit/fb.c 2006-09-02 18:43:13.000000000 +0200 +++ new-manedit-0.6.1/manedit/fb.c 2006-09-02 18:43:13.000000000 +0200 @@ -527,7 +527,7 @@ #endif #define OBJISSEL(fb,n) ((((fb) != NULL) && ((n) >= 0)) ? \ - ((g_list_find(fb->selection, (gpointer)(n)) != NULL) ? TRUE : FALSE) : FALSE) + ((g_list_find(fb->selection, GINT_TO_POINTER((n))) != NULL) ? TRUE : FALSE) : FALSE) #define FB_WIDTH 480 @@ -665,7 +665,7 @@ /* Iterate through selection */ for(glist = selection; glist != NULL; glist = g_list_next(glist)) { - i = (gint)glist->data; + i = GPOINTER_TO_INT(glist->data); if((i >= 0) && (i < total)) o = object[i]; else @@ -1776,7 +1776,7 @@ /* Select this object */ fb->focus_object = i; fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); @@ -4081,7 +4081,7 @@ glist = g_list_next(glist) ) { - o = FileBrowserGetObject(fb, (gint)glist->data); + o = FileBrowserGetObject(fb, GPOINTER_TO_INT(glist->data)); if((o != NULL) ? (o->name != NULL) : FALSE) { s = strinsstr(s, -1, o->name); @@ -4860,11 +4860,11 @@ { if(!OBJISSEL(fb, n)) fb->selection = g_list_append( - fb->selection, (gpointer)n + fb->selection, GINT_TO_POINTER(n) ); if(!OBJISSEL(fb, i)) fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); FileBrowserEntrySetSelectedObjects(fb); @@ -4918,11 +4918,11 @@ { if(!OBJISSEL(fb, n)) fb->selection = g_list_append( - fb->selection, (gpointer)n + fb->selection, GINT_TO_POINTER(n) ); if(!OBJISSEL(fb, i)) fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); FileBrowserEntrySetSelectedObjects(fb); @@ -4989,7 +4989,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); } fb->selection_end = g_list_last(fb->selection); @@ -5057,7 +5057,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); } fb->selection_end = g_list_last(fb->selection); @@ -5110,7 +5110,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); } fb->selection_end = g_list_last(fb->selection); @@ -5165,7 +5165,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); } fb->selection_end = g_list_last(fb->selection); @@ -5213,11 +5213,11 @@ { if(!OBJISSEL(fb, n)) fb->selection = g_list_append( - fb->selection, (gpointer)n + fb->selection, GINT_TO_POINTER(n) ); if(!OBJISSEL(fb, i)) fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); FileBrowserEntrySetSelectedObjects(fb); @@ -5259,11 +5259,11 @@ { if(!OBJISSEL(fb, n)) fb->selection = g_list_append( - fb->selection, (gpointer)n + fb->selection, GINT_TO_POINTER(n) ); if(!OBJISSEL(fb, i)) fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); FileBrowserEntrySetSelectedObjects(fb); @@ -5320,7 +5320,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); } fb->selection_end = g_list_last(fb->selection); @@ -5379,7 +5379,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); } fb->selection_end = g_list_last(fb->selection); @@ -5437,7 +5437,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); } fb->selection_end = g_list_last(fb->selection); @@ -5495,7 +5495,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); } fb->selection_end = g_list_last(fb->selection); @@ -5547,7 +5547,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); } fb->selection_end = g_list_last(fb->selection); @@ -5602,7 +5602,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); } fb->selection_end = g_list_last(fb->selection); @@ -5646,11 +5646,11 @@ gint i = fb->focus_object; if(OBJISSEL(fb, i)) fb->selection = g_list_remove( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); else fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); FileBrowserListQueueDraw(fb); @@ -5748,14 +5748,14 @@ if(OBJISSEL(fb, i)) { fb->selection = g_list_remove( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); } else { fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); @@ -5790,14 +5790,14 @@ fb->focus_object = i; if(fb->selection_end != NULL) { - gint j = i, n = (gint)fb->selection_end->data; + gint j = i, n = GPOINTER_TO_INT(fb->selection_end->data); if(j > n) { while(j > n) { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); j--; } @@ -5809,7 +5809,7 @@ { if(!OBJISSEL(fb, j)) fb->selection = g_list_append( - fb->selection, (gpointer)j + fb->selection, GINT_TO_POINTER(j) ); j++; } @@ -5822,7 +5822,7 @@ * this one. */ fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); } @@ -5855,7 +5855,7 @@ * then update last_single_select_object */ if((g_list_length(fb->selection) == 1) ? - ((gint)fb->selection->data == i) : FALSE + (GPOINTER_TO_INT(fb->selection->data) == i) : FALSE ) fb->last_single_select_object = i; else @@ -5870,7 +5870,7 @@ /* Select this object */ fb->focus_object = i; fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); @@ -5949,7 +5949,7 @@ /* Select this object */ fb->focus_object = i; fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); @@ -6148,7 +6148,7 @@ fb->selection = NULL; for(i = 0; i < fb->total_objects; i++) fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); FileBrowserListQueueDraw(fb); @@ -6185,7 +6185,7 @@ for(i = 0; i < fb->total_objects; i++) { if(!OBJISSEL(fb, i)) - glist = g_list_append(glist, (gpointer)i); + glist = g_list_append(glist, GINT_TO_POINTER(i)); } if(fb->selection != NULL) g_list_free(fb->selection); @@ -6279,7 +6279,7 @@ /* Get last selected object */ glist = fb->selection_end; - i = (glist != NULL) ? (gint)glist->data : -1; + i = (glist != NULL) ? GPOINTER_TO_INT(glist->data) : -1; o = FileBrowserGetObject(fb, i); if((o != NULL) ? (o->full_path != NULL) : FALSE) { @@ -6483,7 +6483,7 @@ /* Select this object */ fb->focus_object = i; fb->selection = g_list_append( - fb->selection, (gpointer)i + fb->selection, GINT_TO_POINTER(i) ); fb->selection_end = g_list_last(fb->selection); @@ -6521,7 +6521,7 @@ /* Get last selected object */ glist = fb->selection_end; - i = (glist != NULL) ? (gint)glist->data : -1; + i = (glist != NULL) ? GPOINTER_TO_INT(glist->data) : -1; o = FileBrowserGetObject(fb, i); if(o == NULL) return; @@ -6633,7 +6633,7 @@ /* Get last selected object */ glist = fb->selection_end; - i = (glist != NULL) ? (gint)glist->data : -1; + i = (glist != NULL) ? GPOINTER_TO_INT(glist->data) : -1; o = FileBrowserGetObject(fb, i); if((o != NULL) ? (o->full_path != NULL) : FALSE) { @@ -6867,7 +6867,7 @@ /* Get last selected object */ glist = fb->selection_end; - i = (glist != NULL) ? (gint)glist->data : -1; + i = (glist != NULL) ? GPOINTER_TO_INT(glist->data) : -1; o = FileBrowserGetObject(fb, i); if(o == NULL) return; @@ -7057,7 +7057,7 @@ i = g_list_length(glist); if(i == 1) { - i = (gint)glist->data; + i = GPOINTER_TO_INT(glist->data); o = FileBrowserGetObject(fb, i); if((o != NULL) ? (o->name != NULL) : FALSE) buf = g_strdup_printf( @@ -7145,7 +7145,7 @@ /* Iterate through selected objects */ while(glist != NULL) { - i = (gint)glist->data; + i = GPOINTER_TO_INT(glist->data); o = FileBrowserGetObject(fb, i); if((o != NULL) ? (o->full_path != NULL) : FALSE) { diff -rN -u old-manedit-0.6.1/manedit/guiutils.c new-manedit-0.6.1/manedit/guiutils.c --- old-manedit-0.6.1/manedit/guiutils.c 2006-09-02 18:43:13.000000000 +0200 +++ new-manedit-0.6.1/manedit/guiutils.c 2006-09-02 18:43:13.000000000 +0200 @@ -1477,7 +1477,7 @@ wlabel = (GtkWidget *)(cb_data[1]); combo = (GtkCombo *)(cb_data[2]); glist_in = (GList *)(cb_data[3]); - max_items = (gint)(cb_data[4]); + max_items = GPOINTER_TO_INT(cb_data[4]); client_data = (gpointer)(cb_data[5]); func_cb = cb_data[6]; list_change_cb = cb_data[7]; @@ -1589,7 +1589,7 @@ wlabel = (GtkWidget *)(cb_data[1]); combo = (GtkCombo *)(cb_data[2]); glist = (GList *)(cb_data[3]); - max_items = (gint)(cb_data[4]); + max_items = GPOINTER_TO_INT(cb_data[4]); client_data = (gpointer)(cb_data[5]); func_cb = cb_data[6]; list_change_cb = cb_data[7]; @@ -1797,8 +1797,8 @@ holder_hbox = (GtkWidget *)cb_data[1]; toplevel = (GtkWidget *)cb_data[2]; - holder_window_width = (gint)cb_data[5]; - holder_window_height = (gint)cb_data[6]; + holder_window_width = GPOINTER_TO_INT(cb_data[5]); + holder_window_height = GPOINTER_TO_INT(cb_data[6]); pull_out_client_data = cb_data[8]; pull_out_cb = cb_data[9]; @@ -4423,8 +4423,8 @@ { g_printerr( "GUIDDESetBinary(): Failed:\ - GtkWidget 0x%.8x does not have a GdkWindow.\n", - (guint32)w + GtkWidget 0x%p does not have a GdkWindow.\n", + (gpointer)w ); return; } @@ -4516,8 +4516,8 @@ { g_printerr( "GUIDDEGetBinary(): Failed:\ - GtkWidget 0x%.8x does not have a GdkWindow.\n", - (guint32)w + GtkWidget 0x%p does not have a GdkWindow.\n", + (gpointer)w ); return(NULL); } @@ -4626,8 +4626,8 @@ { g_printerr( "GUIDDESetString(): Failed:\ - GtkWidget 0x%.8x does not have a GdkWindow.\n", - (guint32)w + GtkWidget 0x%p does not have a GdkWindow.\n", + (gpointer)w ); return; } @@ -4713,8 +4713,8 @@ { g_printerr( "GUIDDEGetString(): Failed:\ - GtkWidget 0x%.8x does not have a GdkWindow.\n", - (guint32)w + GtkWidget 0x%p does not have a GdkWindow.\n", + (gpointer)w ); return(NULL); } @@ -5409,7 +5409,7 @@ cb_data[1] = wlabel; cb_data[2] = combo; cb_data[3] = glist_out; - cb_data[4] = (gpointer)MAX(max_items, 0); + cb_data[4] = GINT_TO_POINTER(MAX(max_items, 0)); cb_data[5] = data; cb_data[6] = (gpointer)func_cb; cb_data[7] = (gpointer)list_change_cb; @@ -5516,7 +5516,7 @@ wlabel = (GtkWidget *)(cb_data[1]); combo = (GtkCombo *)(cb_data[2]); glist_in = (GList *)(cb_data[3]); - max_items = (gint)(cb_data[4]); + max_items = GPOINTER_TO_INT(cb_data[4]); client_data = (gpointer)(cb_data[5]); func_cb = cb_data[6]; list_change_cb = cb_data[7]; @@ -5677,7 +5677,7 @@ /* Is given list NULL? */ if(list == NULL) { - gint i, max_items = (gint)cb_data[4]; + gint i, max_items = GPOINTER_TO_INT(cb_data[4]); GList *glist_new, *glist_old = glist; @@ -5729,7 +5729,7 @@ * number of items to max_items */ i = 0; - max_items = (gint)cb_data[4]; + max_items = GPOINTER_TO_INT(cb_data[4]); glist_new = NULL; /* New glist */ glist_in = (GList *)list; /* Input glist */ while((i < max_items) && (glist_in != NULL)) @@ -6580,8 +6580,8 @@ cb_data[2] = NULL; cb_data[3] = 0; cb_data[4] = 0; - cb_data[5] = (gpointer)MAX(toplevel_width, 0); - cb_data[6] = (gpointer)MAX(toplevel_height, 0); + cb_data[5] = GINT_TO_POINTER(MAX(toplevel_width, 0)); + cb_data[6] = GINT_TO_POINTER(MAX(toplevel_height, 0)); cb_data[7] = (gpointer)1; /* Initially `pushed in' */ cb_data[8] = (gpointer)pull_out_client_data; cb_data[9] = (gpointer)pull_out_cb; @@ -6715,7 +6715,7 @@ */ /* In place (pushed in)? */ - if((gint)cb_data[7]) + if(cb_data[7]) { GUIPullOutPullOutBtnCB( NULL, @@ -6761,7 +6761,7 @@ w = (GtkWidget *)cb_data[2]; /* Not in place (pulled out)? */ - if(!((gint)cb_data[7])) + if(!cb_data[7]) { GUIPullOutCloseCB( (GtkWidget *)cb_data[2], diff -rN -u old-manedit-0.6.1/manedit/mpfio.c new-manedit-0.6.1/manedit/mpfio.c --- old-manedit-0.6.1/manedit/mpfio.c 2006-09-02 18:43:13.000000000 +0200 +++ new-manedit-0.6.1/manedit/mpfio.c 2006-09-02 18:43:13.000000000 +0200 @@ -1,4 +1,5 @@ #include <stdio.h> +#include <stddef.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> @@ -543,7 +544,7 @@ { const char *buf_limit_ptr; const char *buf_cur_ptr; - int n, cur_seg_len; + size_t n, cur_seg_len; char *line_ptr; @@ -558,14 +559,14 @@ if((buf_limit_ptr == NULL) || (buf_limit_ptr > buf_end)) buf_limit_ptr = buf_end; - cur_seg_len = MAX( - (int)buf_limit_ptr - (int)buf_cur_ptr, 0 + cur_seg_len = (size_t)MAX( + buf_limit_ptr - buf_cur_ptr, 0 ); /* Allocate a new line. */ - n = (*total_lines); - (*total_lines) = n + 1; - (*line) = (char **)realloc(*line, (*total_lines) * sizeof(char *)); + n = (size_t)(*total_lines); + (*total_lines) = (int)(n + 1); + (*line) = (char **)realloc(*line, (n + 1) * sizeof(char *)); if((*line) == NULL) { (*total_lines) = 0; @@ -607,11 +608,11 @@ ) { char *tmp_buf; - int cur_seg_len; + size_t cur_seg_len; /* Copy given buffer to a tempory buffer. */ - cur_seg_len = MAX((int)buf_end - (int)buf, 0); + cur_seg_len = (size_t)MAX(buf_end - buf, 0); tmp_buf = (char *)malloc((cur_seg_len + 1) * sizeof(char)); if(tmp_buf == NULL) return; @@ -761,8 +762,8 @@ ) { char *bp; - int i, start_offset; - int buf_len, token_len, replace_len; + int i; ptrdiff_t start_offset; + size_t buf_len, token_len, replace_len; token_len = strlen(token); @@ -776,7 +777,7 @@ return(buf); /* Number of bytes into buf that matched the token. */ - start_offset = (int)(*sub_start) - (int)buf; + start_offset = (*sub_start) - buf; /* Now (*sub_start) is positioned at the start of the * substitution. Begin removing token string from buf. @@ -921,7 +922,7 @@ char *buf, *buf_end; /* Entire loaded buffer and length. */ char *cur_buf_ptr, *limit_buf_ptr; char *cur_section_name; - int buf_len, cur_seg_len; + int buf_len; size_t cur_seg_len; /* Reset returns. */ @@ -1018,7 +1019,7 @@ if(limit_buf_ptr == NULL) limit_buf_ptr = buf_end; - cur_seg_len = MAX((int)limit_buf_ptr - (int)cur_buf_ptr, 0); + cur_seg_len = (size_t)MAX(limit_buf_ptr - cur_buf_ptr, 0); /* Simply load header as exploded newlines for now. */ MPLoadExplodeNewLines( @@ -1101,7 +1102,7 @@ if(limit_buf_ptr == NULL) limit_buf_ptr = buf_end; - cur_seg_len = MAX((int)limit_buf_ptr - (int)cur_buf_ptr, 0); + cur_seg_len = (size_t)MAX(limit_buf_ptr - cur_buf_ptr, 0); cur_section_name = (char *)malloc((cur_seg_len + 1) * sizeof(char)); if(cur_section_name != NULL) { @@ -1130,7 +1131,7 @@ ) limit_buf_ptr++; - cur_seg_len = MAX((int)limit_buf_ptr - (int)cur_buf_ptr, 0); + cur_seg_len = (size_t)MAX(limit_buf_ptr - cur_buf_ptr, 0); cur_section_name = (char *)malloc((cur_seg_len + 1) * sizeof(char)); if(cur_section_name != NULL) { diff -rN -u old-manedit-0.6.1/manedit/pulist.c new-manedit-0.6.1/manedit/pulist.c --- old-manedit-0.6.1/manedit/pulist.c 2006-09-02 18:43:13.000000000 +0200 +++ new-manedit-0.6.1/manedit/pulist.c 2006-09-02 18:43:13.000000000 +0200 @@ -285,7 +285,7 @@ { /* Activate selected item */ GList *glist = clist->selection_end; - gint row = (glist != NULL) ? (gint)glist->data : -1; + gint row = (glist != NULL) ? GPOINTER_TO_INT(glist->data) : -1; if((row >= 0) && (row < clist->rows)) { gchar *text = NULL; @@ -510,7 +510,7 @@ * meaning we now have a matched item */ GList *glist = clist->selection_end; - gint row = (glist != NULL) ? (gint)glist->data : -1; + gint row = (glist != NULL) ? GPOINTER_TO_INT(glist->data) : -1; if((row >= 0) && (row < clist->rows)) { gchar *text = NULL; @@ -942,7 +942,7 @@ if(clist != NULL) { GList *glist = clist->selection_end; - gint row = (glist != NULL) ? (gint)glist->data : -1; + gint row = (glist != NULL) ? GPOINTER_TO_INT(glist->data) : -1; if(row < 0) row = 0; else @@ -977,7 +977,7 @@ if(clist != NULL) { GList *glist = clist->selection_end; - gint row = (glist != NULL) ? (gint)glist->data : -1; + gint row = (glist != NULL) ? GPOINTER_TO_INT(glist->data) : -1; if(row < 0) row = 0; else @@ -1106,7 +1106,7 @@ GdkGC *gc = style->text_gc[state]; GtkCList *clist = GTK_CLIST(list->clist); GList *glist = clist->selection_end; - gint row = (glist != NULL) ? (gint)glist->data : 0; + gint row = (glist != NULL) ? GPOINTER_TO_INT(glist->data) : 0; if((row >= 0) && (row < clist->rows)) { @@ -1517,7 +1517,7 @@ { GtkCList *clist = (GtkCList *)PUListGetCList(list); GList *glist = (clist != NULL) ? clist->selection_end : NULL; - return((glist != NULL) ? (gint)glist->data : -1); + return((glist != NULL) ? GPOINTER_TO_INT(glist->data) : -1); } /* diff -rN -u old-manedit-0.6.1/manedit/viewerdnd.c new-manedit-0.6.1/manedit/viewerdnd.c --- old-manedit-0.6.1/manedit/viewerdnd.c 2006-09-02 18:43:13.000000000 +0200 +++ new-manedit-0.6.1/manedit/viewerdnd.c 2006-09-02 18:43:13.000000000 +0200 @@ -69,7 +69,7 @@ GtkCTreeNode ***branch, gint *total_branches ) { - guint32 addr_val; + gpointer addr_val; gint i, n, strc; gchar **strv; @@ -97,7 +97,7 @@ /* Get viewer_ptr (format in hex with no "0x" prefix) */ if(strc > 0) - i = sscanf(strv[0], "%x", (guint32 *)&addr_val); + i = sscanf(strv[0], "%p", &addr_val); else i = 0; if((i > 0) && (viewer_ptr != NULL)) @@ -130,7 +130,7 @@ } else { - i = sscanf(s, "%x", (guint32 *)&addr_val); + i = sscanf(s, "%p", &addr_val); if(i > 0) (*branch)[n] = (GtkCTreeNode *)addr_val; else @@ -184,14 +184,14 @@ */ if(branch_ptr != NULL) buf = g_strdup_printf( - "%.8x %.8x", - (guint32)v, - (guint32)branch_ptr + "%p %p", + (gpointer)v, + (gpointer)branch_ptr ); else buf = g_strdup_printf( - "%.8x", - (guint32)v + "%p", + (gpointer)v ); /* Send out data */