[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#300901: simplecdrx: FTBFS (amd64/gcc-4.0): cast from 'void*' to 'int' loses precision

Package: simplecdrx
Severity: normal
Tags: patch

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

if g++ -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include    -g -O2 -MT callbacks.o -MD -MP -MF ".deps/callbacks.Tpo" \
  -c -o callbacks.o `test -f 'callbacks.c' || echo './'`callbacks.c; \
then mv -f ".deps/callbacks.Tpo" ".deps/callbacks.Po"; \
else rm -f ".deps/callbacks.Tpo"; exit 1; \
callbacks.c: In function 'void sf_cd_play_button_clicked(GtkWidget*, void*)':
callbacks.c:2325: error: cast from 'void*' to 'int' loses precision
make[3]: *** [callbacks.o] Error 1
make[3]: Leaving directory `/simplecdrx-1.3.2/src'

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

Andreas Jochens

diff -urN ../tmp-orig/simplecdrx-1.3.2/src/callbacks.c ./src/callbacks.c
--- ../tmp-orig/simplecdrx-1.3.2/src/callbacks.c	2005-03-22 16:10:43.890424065 +0100
+++ ./src/callbacks.c	2005-03-22 16:09:41.926377662 +0100
@@ -2322,7 +2322,7 @@
 	void sf_cd_play_button_clicked( GtkWidget *widget, gpointer callback_data )
-		play.cdplay((int) callback_data + 1, setupData1);
+		play.cdplay((long) callback_data + 1, setupData1);

Reply to: