[g-a-devel] [PATCH] Fix gcc-4.0 invalid lvalue in assignment error in Gnopernicus



Hi.

I've been made aware that currently, gnopernicus does not build with
gcc-4.0.  The forwarded msg contains a patch which fixes this.  I've tested
it against latest CVS, and it is still required, so maybe you'd like
to apply these changes.

Thanks

Attachment: pgpYqJS9qliwi.pgp
Description: PGP signature

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

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

cmdmapui.c: In function 'cmdui_get_text_from_code':
cmdmapui.c:343: error: invalid lvalue in assignment
cmdmapui.c: In function 'cmdui_get_code_from_text':
cmdmapui.c:393: error: invalid lvalue in assignment
cmdmapui.c: In function 'cmdui_get_key':
cmdmapui.c:796: error: invalid lvalue in assignment
cmdmapui.c: In function 'cmdui_selection_changed':
cmdmapui.c:1312: warning: cast from pointer to integer of different size
make[4]: *** [cmdmapui.o] Error 1
make[4]: Leaving directory `/gnopernicus-0.8.4/gnopi'

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/gnopernicus-0.8.4/gnopi/cmdmapui.c ./gnopi/cmdmapui.c
--- ../tmp-orig/gnopernicus-0.8.4/gnopi/cmdmapui.c	2004-02-23 16:25:37.000000000 +0100
+++ ./gnopi/cmdmapui.c	2004-12-22 18:13:55.526153584 +0100
@@ -340,7 +340,7 @@
 				str[POS_DIGIT_3]);
 
     delimit = g_strrstr (str, KEY_NAME_SEPARATOR);
-    (const gchar*)tmp = str;
+    tmp = str;
     if (delimit)
 	tmp = delimit + 1;
 
@@ -390,7 +390,7 @@
     }
     
     delimit = g_strrstr (str, KEY_SEPARATOR);
-    (const gchar*)tmp = str;
+    tmp = str;
     
     if (delimit)
 	tmp = delimit + 1;
@@ -793,7 +793,7 @@
     
     line = alt || shift || ctrl ;
     
-    (const gchar*)key = cmdui_get_key_keystring (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (cb_key_list)->entry)));
+    key = cmdui_get_key_keystring (gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (cb_key_list)->entry)));
     
     if (!key || strlen (key) == 0)
 	return rv;



--- End Message ---

-- 
CYa,
  Mario


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