Your message dated Fri, 17 Mar 2006 04:07:52 -0800
with message-id <[EMAIL PROTECTED]>
and subject line Bug#297177: fixed in gman 0.9.3-3
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gman
Severity: normal
Tags: patch

When building 'gman' on amd64 with gcc-4.0,
I get the following error:

menu.c:453: error: cast from 'void*' to 'int' loses precision
menu.c: In function 'int section_select_callback(GtkWidget*, void*)':
menu.c:468: error: cast from 'void*' to 'int' loses precision
menu.c:469: error: cast from 'void*' to 'int' loses precision
menu.c: In function 'void app_quit(GtkWidget*, void*)':
menu.c:499: error: cast from 'void*' to 'int' loses precision
menu.c: In function 'int status_bar_callback(GtkWidget*, void*)':
menu.c:578: error: cast from 'void*' to 'int' loses precision
menu.c:579: error: cast from 'void*' to 'int' loses precision
menu.c: In function 'int search_mode_callback(GtkWidget*, void*)':
menu.c:592: error: cast from 'void*' to 'int' loses precision
menu.c:597: error: cast from 'void*' to 'int' loses precision
menu.c: In function 'int show_mode_callback(GtkWidget*, void*)':
menu.c:610: error: cast from 'void*' to 'int' loses precision
menu.c:615: error: cast from 'void*' to 'int' loses precision
menu.c: In function 'int button_clicked_callback(GtkWidget*, void*)':
menu.c:641: error: cast from 'void*' to 'int' loses precision
make[1]: *** [menu.o] Error 1
make[1]: Leaving directory `/gman-0.9.3'
make: *** [build-stamp] Error 2

With the attached patch 'gman' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/gman-0.9.3/gman.c ./gman.c
--- ../tmp-orig/gman-0.9.3/gman.c       2005-02-27 19:17:16.750721365 +0000
+++ ./gman.c    2005-02-27 19:16:48.842108242 +0000
@@ -47,7 +47,7 @@
        pthread_mutex_init(&context_lock,NULL);
        pthread_mutex_init(&loading_man_path_lock,NULL);
        init_context();
-       debuging = (int)context->get_value("debuging");
+       debuging = (long)context->get_value("debuging");
        pthread_mutex_lock(&gtk_lock);
     gtk_init (&argc, &argv);
        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
diff -urN ../tmp-orig/gman-0.9.3/mandata.c ./mandata.c
--- ../tmp-orig/gman-0.9.3/mandata.c    2005-02-27 19:17:16.751721172 +0000
+++ ./mandata.c 2005-02-27 19:16:23.643971947 +0000
@@ -239,7 +239,7 @@
        char buffer[2*BUFFER_SIZE];
        char loc_name[BUFFER_SIZE];
        char buffer2[BUFFER_SIZE];
-       switch ((int)context->get_value("show_mode")) {
+       switch ((long)context->get_value("show_mode")) {
        case 0:
                sprintf(buffer,"%s -T '%s manual page' -n GMan -e man ",
                                (char*)context->get_value("xterm_command"),
@@ -350,7 +350,7 @@
                break;
        default:
                if(context->get_value("show_warning"))
-                       g_print("unexpected \'show_mode\' : %d 
",(int)context->get_value("show_mode"));
+                       g_print("unexpected \'show_mode\' : %ld 
",(long)context->get_value("show_mode"));
                return;
        }
        //g_warning(buffer);
diff -urN ../tmp-orig/gman-0.9.3/menu.c ./menu.c
--- ../tmp-orig/gman-0.9.3/menu.c       2005-02-27 19:17:16.751721172 +0000
+++ ./menu.c    2005-02-27 19:15:02.208690459 +0000
@@ -173,32 +173,32 @@
 /*flag = 0 means not to invoke call backs when changing the states of 
buttons.*/
 void updata_menu_buttons(int flag) 
 {
-       int i,j,k,k2;
-       k = (int)context->get_value("display_section_policy");
+       long i,j,k,k2;
+       k = (long)context->get_value("display_section_policy");
        if(k>0 && k<=2)
                if(!((GtkCheckMenuItem*)(section_select[k]))->active){
                        if(!flag) signal_menu_change++;
                        
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(section_select[k]),1);
                }
-       k = (int)context->get_value("display_section");
+       k = (long)context->get_value("display_section");
        for (i = 0;i<10;i++)
                if(!(k&(1<<i)) != 
!(((GtkCheckMenuItem*)(section_buttons[i]))->active)) {
                        if(!flag) signal_menu_change++;
                        
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(section_buttons[i]),k&(1<<i));
                }
-       k = (int)context->get_value("searching_mode");
+       k = (long)context->get_value("searching_mode");
        if(k>0 && k<=1)
                if(!(((GtkCheckMenuItem*)(searching_mode_buttons[k]))->active)) 
{
                        if(!flag) signal_menu_change++;
                        
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(searching_mode_buttons[k]),1);
                }
-       k = (int)context->get_value("show_mode");
+       k = (long)context->get_value("show_mode");
        if(k>0 && k<=3)
                if(!(((GtkCheckMenuItem*)(show_mode_buttons[k]))->active)) {
                        if(!flag) signal_menu_change++;
                        
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(show_mode_buttons[k]),1);
                }
-       k2 = (int)context->get_value("show_status_bar");
+       k2 = (long)context->get_value("show_status_bar");
        i = k2&(1<<k);
        j = (((GtkCheckMenuItem*)(status_bar_button))->active);
        if((i&&!j) || (!i&&j)) {
@@ -220,10 +220,10 @@
 
 static void updata_widget_show(int flag)
 {      
-       int k,k2;
+       long k,k2;
        
-       k = (int)context->get_value("searching_mode");
-       k2 = (int)context->get_value("show_status_bar");
+       k = (long)context->get_value("searching_mode");
+       k2 = (long)context->get_value("show_status_bar");
 
        if(k2&(1<<k)) 
                gtk_widget_show(hbox_status);
@@ -258,8 +258,8 @@
        gtk_window_set_title(GTK_WINDOW(window), "Gman");
        gtk_window_set_policy( GTK_WINDOW( window ), FALSE, TRUE, FALSE );
        gtk_window_set_default_size(GTK_WINDOW(window),
-                                                               
(int)context->get_value("h_size"),
-                                                               
(int)context->get_value("v_size"));
+                                                               
(long)context->get_value("h_size"),
+                                                               
(long)context->get_value("v_size"));
        
        gtk_widget_set_usize(GTK_WIDGET(window),200,150);
        main_vbox = gtk_vbox_new(FALSE, 1);
@@ -443,14 +443,14 @@
 
 static int section_policy_callback(GtkWidget *w, gpointer data) {
        //      static int signal;
-       int k,k2;
-       k2 = (int) data;
+       long k,k2;
+       k2 = (long) data;
        if(!((GtkCheckMenuItem*)(section_select[k2]))->active) return 1;
        //      g_message("Hello, World! %x\n signal = 
%d",data,signal_menu_change);
        if(signal_menu_change>0) {signal_menu_change--;return 1;}
        //if(!signal) {signal++;return 1;}
        //signal--;
-       k = (int) context->get_value("display_section_policy");
+       k = (long) context->get_value("display_section_policy");
        if(k == k2) return 1;
        pthread_mutex_lock(&context_lock);
        context->set_value("display_section_policy","int",(void*)k2);
@@ -461,12 +461,12 @@
 }
 
 static int section_select_callback(GtkWidget *w, gpointer data) {
-       int var;
+       long var;
        if(signal_menu_change>0) {signal_menu_change--;return 1;}
 
        pthread_mutex_lock(&context_lock);
-       var = (int)context->get_value("display_section");
-       var ^= (int)data;
+       var = (long)context->get_value("display_section");
+       var ^= (long)data;
        context->set_value("display_section","int",(void*)var);
        if (context->get_value("display_section_policy")) {
                task_set_active(task_extract_man_data);
@@ -496,7 +496,7 @@
        }
        //      context->save(stdout,"automatically made by Gman");
        
-       gtk_exit((int)data);
+       gtk_exit((long)data);
 }
 
 static int window_resize_callback(GtkWidget *w, GtkAllocation * size, gpointer 
data)
@@ -573,10 +573,10 @@
 
 static int status_bar_callback (GtkWidget *widget, gpointer   data)
 {
-       int k,k2;
+       long k,k2;
        if(signal_menu_change>0) {signal_menu_change--;return 1;}
-       k2 = (int) context->get_value("show_status_bar");
-       k = (int) context->get_value("searching_mode");
+       k2 = (long) context->get_value("show_status_bar");
+       k = (long) context->get_value("searching_mode");
        if(((GtkCheckMenuItem*)(status_bar_button))->active) k2 = k2 | (1<<k);
        else k2 = k2 & ~(1<<k);
        pthread_mutex_lock(&context_lock);
@@ -588,13 +588,13 @@
 
 static int search_mode_callback (GtkWidget *widget, gpointer   data)
 {
-       int k,k2;
-       k2 = (int) data;
+       long k,k2;
+       k2 = (long) data;
        if(!((GtkCheckMenuItem*)(searching_mode_buttons[k2]))->active) return 1;
        if(signal_menu_change>0) {signal_menu_change--;return 1;}
        //if(!signal) {signal++;return 1;}
        //signal--;
-       k = (int) context->get_value("searching_mode");
+       k = (long) context->get_value("searching_mode");
        if(k == k2) return 1;
        pthread_mutex_lock(&context_lock);
        context->set_value("searching_mode","int",(void*)k2);
@@ -606,13 +606,13 @@
 
 static int show_mode_callback (GtkWidget *widget, gpointer   data)
 {
-       int k,k2;
-       k2 = (int) data;
+       long k,k2;
+       k2 = (long) data;
        if(!((GtkCheckMenuItem*)(show_mode_buttons[k2]))->active) return 1;
        if(signal_menu_change>0) {signal_menu_change--;return 1;}
        //if(!signal) {signal++;return 1;}
        //signal--;
-       k = (int) context->get_value("show_mode");
+       k = (long) context->get_value("show_mode");
        if(k == k2) return 1;
        pthread_mutex_lock(&context_lock);
        context->set_value("show_mode","int",(void*)k2);
@@ -638,7 +638,7 @@
 
 static int button_clicked_callback(GtkWidget * w,gpointer data)
 {
-       int i = (int) data;
+       long i = (long) data;
        switch (i) {
        case 1: task_set_stop(task_key_word_search);break;
        case 2: task_set_active(task_key_word_search);break;
diff -urN ../tmp-orig/gman-0.9.3/task.c ./task.c
--- ../tmp-orig/gman-0.9.3/task.c       2005-02-27 19:17:16.752720979 +0000
+++ ./task.c    2005-02-27 19:17:06.685664107 +0000
@@ -112,12 +112,12 @@
        do {
                have_task = 0;
                task = (Task *)NULL;
-               int flag = 0;
+               long flag = 0;
                pthread_mutex_lock(&task_group->lock);
                j = task_group->tasks->get_size();
                for(i = 0; i<j && !have_task ;i++) {
                        if((task = 
(Task*)task_group->tasks->get_item(i))->signals[0]->get_size()) {
-                               flag = ((int)task->signals[0]->get_item(0) & 
~1) | (task->state & 1);
+                               flag = ((long)task->signals[0]->get_item(0) & 
~1) | (task->state & 1);
                                task->signals[0]->delete_item(0);
                                have_task++;
                        }
@@ -126,7 +126,7 @@
                                have_task++;
                        }
                        else if (task->signals[1]->get_size()) {
-                               flag = ((int)task->signals[1]->get_item(1) & 
~1);
+                               flag = ((long)task->signals[1]->get_item(1) & 
~1);
                                task->signals[1]->delete_item(0);
                                have_task++;
                        }
diff -urN ../tmp-orig/gman-0.9.3/taskfunc.c ./taskfunc.c
--- ../tmp-orig/gman-0.9.3/taskfunc.c   2005-02-27 19:17:16.752720979 +0000
+++ ./taskfunc.c        2005-02-27 19:16:02.782998500 +0000
@@ -41,10 +41,10 @@
        int display_section_ID;
 
        pthread_mutex_lock(&context_lock);
-       switch ((int)context->get_value("display_section_policy")) {
+       switch ((long)context->get_value("display_section_policy")) {
        case 0: display_section_ID = ~0;break;
-       case 1: display_section_ID = 
~(int)(context->get_value("display_section"));break;
-       case 2: display_section_ID = 
(int)context->get_value("display_section"); break;
+       case 1: display_section_ID = 
~(long)(context->get_value("display_section"));break;
+       case 2: display_section_ID = 
(long)context->get_value("display_section"); break;
        default: fprintf(stderr,"warning: init_man_data: 
\"display_section_policy\" "
                                         "have invalid value 
%d",context->get_value("display_section_policy"));
        display_section_ID = ~0;
diff -urN ../tmp-orig/gman-0.9.3/window2.c ./window2.c
--- ../tmp-orig/gman-0.9.3/window2.c    2005-02-27 19:17:16.753720786 +0000
+++ ./window2.c 2005-02-27 19:15:33.446660955 +0000
@@ -223,7 +223,7 @@
        GtkWidget * x, *apply_button,*add_new_button;
        gchar * c, *c2;
        int i;
-       int select = (int)data;
+       long select = (long)data;
        gchar * clist_item[3];
        //      printf("point2 data = %d\n",select);
        apply_button = 
(GtkWidget*)gtk_object_get_data(GTK_OBJECT(window2),"button2");


--- End Message ---
--- Begin Message ---
Source: gman
Source-Version: 0.9.3-3

We believe that the bug you reported is fixed in the latest version of
gman, which is due to be installed in the Debian FTP archive:

gman_0.9.3-3.diff.gz
  to pool/main/g/gman/gman_0.9.3-3.diff.gz
gman_0.9.3-3.dsc
  to pool/main/g/gman/gman_0.9.3-3.dsc
gman_0.9.3-3_i386.deb
  to pool/main/g/gman/gman_0.9.3-3_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Josip Rodin <[EMAIL PROTECTED]> (supplier of updated gman package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 26 Feb 2006 01:46:36 +0100
Source: gman
Binary: gman
Architecture: source i386
Version: 0.9.3-3
Distribution: unstable
Urgency: low
Maintainer: Josip Rodin <[EMAIL PROTECTED]>
Changed-By: Josip Rodin <[EMAIL PROTECTED]>
Description: 
 gman       - small man(1) front-end for X
Closes: 297177 317564
Changes: 
 gman (0.9.3-3) unstable; urgency=low
 .
   * (Restoring package after it was removed by #328541.)
   * Applied Andreas Jochens' patch that fixes numerous broken casts,
     closes: #297177.
   * Updated man2html path, and fixed up the Description, thanks to
     Justin B Rye, closes: #317564.
   * Removed xlibs-dev build dependency.
Files: 
 50c38c86c1c605e562e401e43088c75e 595 doc optional gman_0.9.3-3.dsc
 819582eb2527e36271f82f6562001b43 42369 doc optional gman_0.9.3.orig.tar.gz
 b8f14077ef19d878a351471c17b9e65b 11894 doc optional gman_0.9.3-3.diff.gz
 dd01cb08ac549bb3b78f4b20a2908de1 36810 doc optional gman_0.9.3-3_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEAP2MC1RHoiANFZYRAgEPAJ43E94NUr9IxNxFinufs20aLGxMRwCfRSBf
idmPU0MVq/IncvPe/qu+y4k=
=3kQ4
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to