control-center 1.0.2 bugs & patch



Since there is no address for patch submission in README, I'm posting to
this list. I hope this will end in the right hands.

There are several non ANSI C things in control-center 1.0.2 tarball, which
obstruct compilation with an ANSI C compiler. The first one are C++
comments. C++ comments are bad. Don't use C++ comments.

The second are statements of this kind:

switch(c) {
   ...
   default:
}

ANSI C requires a statement after `default:', so this can be fixed by
either deleting the offending line, or adding semicolon there. My patch
adds semicolon.

There is one thing which this patch does not fix, because I don't know
what the author intended to do. In capplets/screensaver-properties/screensaver-properties-capplet.c, lines 250 and 251, there is something like this:

   i =  func(x);
   i += func(y);

where i is int and func returns char pointer. The first statement is an
error, because nobody guarantees that char pointer can fit in int.
The second is even bigger error. What was that supposed to do is beyond
me. I hope that the author will do something about that.




--- control-center/corba-glue.c.orig	Wed Mar 17 00:25:35 1999
+++ control-center/corba-glue.c	Wed Mar 17 00:29:17 1999
@@ -82,8 +82,8 @@
         PortableServer_ObjectId objid = {0, sizeof("control_center_interface"), "control_center_interface"};
         PortableServer_POA poa;
         CORBA_exception_init(&ev);
-        //        gnome_init("desktop-manager", NULL, *argc, argv, 0, NULL);
-        //        orb = CORBA_ORB_init(argc, argv, "orbit-local-orb", &ev);
+        /*        gnome_init("desktop-manager", NULL, *argc, argv, 0, NULL);
+                  orb = CORBA_ORB_init(argc, argv, "orbit-local-orb", &ev); */
 
 
 
--- capplets/screensaver-properties/parser.c.orig	Wed Mar 17 00:37:00 1999
+++ capplets/screensaver-properties/parser.c	Wed Mar 17 00:37:41 1999
@@ -424,7 +424,7 @@
         case CHECK:
                 set_check (ssd);
                 break;
-        default:
+        default:;
         }
 }
 static void
--- capplets/background-properties/property-background.c.orig	Wed Mar 17 13:10:42 1999
+++ capplets/background-properties/property-background.c	Wed Mar 17 13:11:58 1999
@@ -1195,13 +1195,13 @@
   
 	switch (info) {
 	case TARGET_URI_LIST:
-		names = gnome_uri_list_extract_filenames (selection_data->data);
+		names = gnome_uri_list_extract_filenames ((char *)selection_data->data);
 		if (names) {
 			set_monitor_filename ((gchar *)names->data);
 			gnome_uri_list_free_strings (names);
 		}
 		break;
-	default:
+	default:;
 	}
 }
 
--- capplets/theme-switcher/gui.c.orig	Wed Mar 17 13:16:18 1999
+++ capplets/theme-switcher/gui.c	Wed Mar 17 13:16:39 1999
@@ -150,7 +150,7 @@
   evbox = gtk_viewport_new(NULL, NULL);
   gtk_container_add (GTK_CONTAINER (frame), evbox);
   gtk_container_set_border_width (GTK_CONTAINER (evbox), GNOME_PAD_SMALL);
-  //gtk_widget_set_usize(evbox, 150, -1);
+  /*gtk_widget_set_usize(evbox, 150, -1);*/
   gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0);
   
   text = gtk_xmhtml_new();
--- capplets/gnome-edit-properties/gnome-edit-properties.c.orig	Wed Mar 17 13:36:23 1999
+++ capplets/gnome-edit-properties/gnome-edit-properties.c	Wed Mar 17 13:36:38 1999
@@ -196,7 +196,7 @@
                 g_warning ("an initialization error occurred while starting 'gnome-edit-properties-capplet'.\n"
                            "aborting...\n");
                 return 1;
-        default:
+        default:;
         }
 
         edit_setup ();

-- 
 .-.   .-.    Life is a sexually transmitted disease.
(_  \ /  _)
     |        dave@srce.hr
     |        dave@fly.cc.fer.hr



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