Package: somaplayer
Severity: normal
Tags: patch

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

x86_64-linux-gcc -DHAVE_CONFIG_H -I. -I. -I../..     -Wall -g -O2 -Wall   
-DDEVDSP="\"/dev/dsp\"" -DXTHREADS -I/usr/include/gtk-2.0 
-I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include   -c `test -f about.c || echo './'`about.c
about.c:55: error: static declaration of 'text' follows non-static declaration
graphic.h:58: error: previous declaration of 'text' was here
make[4]: *** [about.o] Error 1
make[4]: Leaving directory `/somaplayer-0.4.4/src/gtk'

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/somaplayer-0.4.4/src/gtk/about.c ./src/gtk/about.c
--- ../tmp-orig/somaplayer-0.4.4/src/gtk/about.c        2004-10-27 
13:11:31.000000000 +0200
+++ ./src/gtk/about.c   2005-03-03 20:15:16.774702594 +0100
@@ -52,7 +52,7 @@
 
 static int about_t = 0;
 static int about_timer = 0;
-static GtkWidget *text = NULL;
+static GtkWidget *text_about = NULL;
 
 gint about_timeout (gpointer);
 void on_about_button_press_event (GtkWidget *, GdkEventButton *);
@@ -108,14 +108,14 @@
       gtk_text_view_set_left_margin (GTK_TEXT_VIEW (textarea), 5);
       gtk_text_view_set_right_margin (GTK_TEXT_VIEW (textarea), 5);
 
-      text =
+      text_about =
        (GtkWidget *) gtk_text_view_get_buffer (GTK_TEXT_VIEW (textarea));
-      gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (text), "text", "weight",
+      gtk_text_buffer_create_tag (GTK_TEXT_BUFFER (text_about), "text", 
"weight",
                                  PANGO_WEIGHT_BOLD, "scale",
                                  PANGO_SCALE_MEDIUM, NULL);
 
       g_signal_connect ((gpointer) window, "delete_event",
-                       G_CALLBACK (on_about_activate), text);
+                       G_CALLBACK (on_about_activate), text_about);
 
       gtk_signal_connect_object (GTK_OBJECT (textarea), "button_press_event",
                                 GTK_SIGNAL_FUNC
@@ -161,17 +161,17 @@
   GtkTextIter start;
   GtkTextIter end;
 
-  gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (text), &start);
-  gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (text), &end);
+  gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (text_about), &start);
+  gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (text_about), &end);
 
-  gtk_text_buffer_delete (GTK_TEXT_BUFFER (text), &start, &end);
+  gtk_text_buffer_delete (GTK_TEXT_BUFFER (text_about), &start, &end);
 
-  gtk_text_buffer_get_iter_at_offset (GTK_TEXT_BUFFER (text), &start, 0);
+  gtk_text_buffer_get_iter_at_offset (GTK_TEXT_BUFFER (text_about), &start, 0);
 
 
   if (credits[about_timer])
     {
-      gtk_text_buffer_insert_with_tags_by_name (GTK_TEXT_BUFFER (text),
+      gtk_text_buffer_insert_with_tags_by_name (GTK_TEXT_BUFFER (text_about),
                                                &start, credits[about_timer],
                                                -1, "text", NULL);
       about_timer++;
@@ -179,7 +179,7 @@
   else
     {
       about_timer = 0;
-      gtk_text_buffer_insert_with_tags_by_name (GTK_TEXT_BUFFER (text),
+      gtk_text_buffer_insert_with_tags_by_name (GTK_TEXT_BUFFER (text_about),
                                                &start, credits[about_timer],
                                                -1, "text", NULL);
       about_timer++;


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to