allen8807 / memcached

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

Compile errors in variables #216

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open config_static.h
2. Add #define FUTURE at line 132 to enable FUTURE features
3. Run ./config/autorun.sh && ./configure && make

What is the expected output? What do you see instead?
I suspected the system to compile successfully. However due to missing 
variables I get following compile error:

engines/default_engine/items.c: In function ‘do_item_cachedump’:
engines/default_engine/items.c:369:19: error: ‘KEY_MAX_LENGTH’ undeclared 
(first use in this function)
engines/default_engine/items.c:369:19: note: each undeclared identifier is 
reported only once for each function it appears in
engines/default_engine/items.c:372:10: error: ‘engine’ undeclared (first 
use in this function)
engines/default_engine/items.c:386:53: error: ‘process_started’ undeclared 
(first use in this function)
cc1: warnings being treated as errors
engines/default_engine/items.c:369:10: error: unused variable ‘key_temp’

What version of the product are you using? On what operating system?
memcached 1.6.0_beta1_27_gcb6290c OS: ubuntu 11.04

Please provide any additional information below.
There seems to be some missing variables and functions that do not comply with 
there prototype and the way they are called. Example 

engines/default_engine/items.c
 941 char *item_cachedump(struct default_engine *engine,
 942                      unsigned int slabs_clsid,
 943                      unsigned int limit,
 944                      unsigned int *bytes) {

this when called from daemon/memcached.c it says:
3933 #ifdef FUTURE
3934         buf = item_cachedump(id, limit, &bytes);
3935 #endif

The parameters don't match.

Original issue reported on code.google.com by zohaib.h...@gmail.com on 10 Aug 2011 at 4:08

GoogleCodeExporter commented 9 years ago
I've tried to fix these errors and in pursuit of fixing chain of errors here is 
the patch I have landed on. 

I still don't know what to pass as first parameter for item_cachedump

buf = item_cachedump(*what_to_pass_here*, id, limit, &bytes);

everything else seems to be fixed I also had to also fix slabs.c

Original comment by zohaib.h...@gmail.com on 10 Aug 2011 at 4:17

Attachments:

GoogleCodeExporter commented 9 years ago
The #define FUTURE stuff isn't complete, nor is it expected to work.... There 
is another thread about _nuking_ the cachedump feature, so we won't do any work 
on this until we decide if we want to keep this or not...

Original comment by trond.no...@gmail.com on 10 Aug 2011 at 7:24

GoogleCodeExporter commented 9 years ago
Apparently this is half implemented in 1.6 :( So it's invalid as a particular 
bug.

Original comment by dorma...@rydia.net on 28 Sep 2011 at 4:48