tag 364104 + patch thanks Please find enclosed a patch fixing compilation of ooqstart with GCC 4.2 - the issues were all const correctness problems with string constants. If desired I can prepare a NMU with this fix. Thanks. -- "You grabbed my hand and we fell into it, like a daydream - or a fever."
diff -u ooqstart-0.8.3/gnome/gnome.cxx ooqstart-0.8.3/gnome/gnome.cxx
--- ooqstart-0.8.3/gnome/gnome.cxx
+++ ooqstart-0.8.3/gnome/gnome.cxx
@@ -152,7 +152,7 @@
//if (tilepixmap) gtk_container_remove(GTK_CONTAINER(tile), tilepixmap);
tilepixmap = 0;
- char **pixmapData = 0;
+ const char **pixmapData = 0;
switch (state) {
case ICON_OFF: pixmapData = ooqstart_off_xpm; break;
case ICON_WAIT: pixmapData = ooqstart_wait_xpm; break;
@@ -161,7 +161,7 @@
}
if (pixmapData) {
- tilepixmap = create_pixmap(GTK_WIDGET(tile), pixmapData,
+ tilepixmap = create_pixmap(GTK_WIDGET(tile), (char **)pixmapData,
panelPixelSize, panelPixelSize);
}
@@ -193,7 +193,7 @@
#define GsmDeselectClientEvents "DeselectClientEvents"
#define GsmChangeProperties "ChangeProperties"
-static SmProp *mkSmProp (gchar *name, gchar *value1, gchar *value2) {
+static SmProp *mkSmProp (const gchar *name, const gchar *value1, const gchar *value2) {
SmProp *prop = (SmProp *)malloc(sizeof(SmProp));
prop->name = strdup(name);
@@ -204,19 +204,19 @@
prop->vals = (SmPropValue *)malloc(prop->num_vals * sizeof(SmPropValue));
for (int i = 0; i < prop->num_vals; ++i) {
- gchar *value = (i == 0) ? value1 : value2;
- prop->vals[i].value = value;
+ const gchar *value = (i == 0) ? value1 : value2;
+ prop->vals[i].value = (char *)value;
prop->vals[i].length = strlen(value);
}
return prop;
}
-static SmProp *mkSmProp (gchar *name, gchar *value) {
+static SmProp *mkSmProp (const gchar *name, const gchar *value) {
return mkSmProp(name, value, 0);
}
-static SmProp *mkSmProp (gchar *name, int value) {
+static SmProp *mkSmProp (const gchar *name, int value) {
SmProp *prop = (SmProp *)malloc(sizeof(SmProp));
prop->name = strdup(name);
only in patch2:
unchanged:
--- ooqstart-0.8.3.orig/ooqstart-off.xpm
+++ ooqstart-0.8.3/ooqstart-off.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * ooqstart_off_xpm[] = {
+static const char * ooqstart_off_xpm[] = {
"48 48 594 2",
" c None",
". c #DFDEDF",
only in patch2:
unchanged:
--- ooqstart-0.8.3.orig/ooqstart-on.xpm
+++ ooqstart-0.8.3/ooqstart-on.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * ooqstart_on_xpm[] = {
+static const char * ooqstart_on_xpm[] = {
"48 48 588 2",
" c None",
". c #DFDEDF",
only in patch2:
unchanged:
--- ooqstart-0.8.3.orig/ooqstart-wait.xpm
+++ ooqstart-0.8.3/ooqstart-wait.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char * ooqstart_wait_xpm[] = {
+static const char * ooqstart_wait_xpm[] = {
"48 48 460 2",
" c None",
". c #DFDEDF",
Attachment:
signature.asc
Description: Digital signature