Jdesk / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Compile error with -D ALLOW_SLABS_REASSIGN #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add "-D ALLOW_SLABS_REASSIGN" to CFLAGS
2. compile

with gcc-3.5 you will see warnings, but it does compile:
slabs.c: In function `do_slabs_reassign':
slabs.c:373: warning: use of cast expressions as lvalues is deprecated
slabs.c:403: warning: use of cast expressions as lvalues is deprecated

but with gcc-4 you will see a compile error:
slabs.c: In function 'do_slabs_reassign':
slabs.c:373: error: invalid lvalue in assignment
slabs.c:403: error: invalid lvalue in assignment

tried with 1.2.6 and 1.2.8. same error.

Original issue reported on code.google.com by dl4...@gmail.com on 12 May 2009 at 7:42

GoogleCodeExporter commented 9 years ago
Here's the patch to fix it:
http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/memcached/files/memcach
ed-1.3.3-gcc4-slab-fixup.patch?rev=1.1&view=markup

Original comment by robbat2....@gmail.com on 3 Jun 2009 at 9:34

GoogleCodeExporter commented 9 years ago
The existing slab reassignment code was unfinished and unsupported, so it will 
be
removed in 1.4.2. There will be new slab reassignment code in the next few 
releases.

Considering this "done" since an action was taken (confusing code removed).

Original comment by dorma...@rydia.net on 7 Oct 2009 at 7:29