[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-devel
Subject:    [Proftpd-devel] [aj@andaco.de: Bug#287966: proftpd: FTBFS (amd64/gcc-4.0): invalid lvalue in assignm
From:       Francesco Paolo Lovergine <frankie () debian ! org>
Date:       2004-12-31 11:05:25
Message-ID: 20041231110525.GD4322 () gandalf ! libero ! it
[Download RAW message or body]

Just for your information, it seems that lvalue casting (or whatever they are 
intended for) are no more acceptable (currently?) in gcc 4.0, I'm receiving a few
reports about this kind of things. Incidentally, it's not accepted also
something like:

a = (type)b = c;

so please avoid that syntax.


----- Forwarded message from Andreas Jochens <aj@andaco.de> -----

Package: proftpd
Severity: normal
Tags: patch

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

../../../modules/mod_radius.c: In function 'set_radiusacctserver':
../../../modules/mod_radius.c:2380: warning: pointer targets in assignment differ in signedness
../../../modules/mod_radius.c:2388: error: invalid lvalue in assignment
../../../modules/mod_radius.c: In function 'set_radiusauthserver':
../../../modules/mod_radius.c:2426: warning: pointer targets in assignment differ in signedness
../../../modules/mod_radius.c:2434: error: invalid lvalue in assignment
make[2]: *** [mod_radius.o] Error 1
make[2]: Leaving directory `/proftpd-1.2.10/build-tree/proftpd-1.2.10/build/pam/modules'

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/proftpd-1.2.10/debian/patches/25.gcc4_fix.diff ./debian/patches/25.gcc4_fix.diff
--- ../tmp-orig/proftpd-1.2.10/debian/patches/25.gcc4_fix.diff	1970-01-01 01:00:00.000000000 +0100
+++ ./debian/patches/25.gcc4_fix.diff	2004-12-31 09:15:39.000000000 +0100
@@ -0,0 +1,33 @@
+diff -urN tmp/contrib/mod_radius.c proftpd-1.2.10/contrib/mod_radius.c
+--- tmp/contrib/mod_radius.c	2003-11-09 22:18:05.000000000 +0100
++++ proftpd-1.2.10/contrib/mod_radius.c	2004-12-30 23:55:23.154188792 +0100
+@@ -2385,7 +2385,7 @@
+ 
+   c = add_config_param(cmd->argv[0], 1, NULL);
+   c->argv[0] = pcalloc(c->pool, sizeof(radius_server_t));
+-  ((radius_server_t *) c->argv[0]) = radius_server;
++  c->argv[0] = radius_server;
+ 
+   return HANDLED(cmd);
+ }
+@@ -2431,7 +2431,7 @@
+ 
+   c = add_config_param(cmd->argv[0], 1, NULL);
+   c->argv[0] = pcalloc(c->pool, sizeof(radius_server_t));
+-  ((radius_server_t *) c->argv[0]) = radius_server;
++  c->argv[0] = radius_server;
+ 
+   return HANDLED(cmd);
+ }
+diff -urN tmp/contrib/mod_quotatab_sql.c proftpd-1.2.10/contrib/mod_quotatab_sql.c
+--- tmp/contrib/mod_quotatab_sql.c	2004-06-08 00:58:44.000000000 +0200
++++ proftpd-1.2.10/contrib/mod_quotatab_sql.c	2004-12-31 09:12:37.581383272 +0100
+@@ -685,7 +685,7 @@
+     }
+ 
+     tab->tab_data = pcalloc(tab->tab_pool, sizeof(char));
+-    ((char *) tab->tab_data) = pstrdup(tab->tab_pool, select_query);
++    tab->tab_data = pstrdup(tab->tab_pool, select_query);
+   }
+ 
+   /* Set all the necessary function pointers. */

----- End forwarded message -----

-- 
Francesco P. Lovergine


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
ProFTPD Developers List
<proftpd-devel@proftpd.org>
https://lists.sourceforge.net/lists/listinfo/proftp-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic