From fd4e5e6777703f99cfc3e5d8271e01e138c08084 Mon Sep 17 00:00:00 2001 From: axel Date: Wed, 19 Jul 2006 03:27:02 +1000 Subject: [PATCH] Fix crash bug in fish_tests when fishd is unavailable darcs-hash:20060718172702-ac50b-72805efd3c9c7927a9fe37b6c80ef0dd276cde5f.gz --- fish_tests.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fish_tests.c b/fish_tests.c index 2aaa25ad5..2b8a4ff43 100644 --- a/fish_tests.c +++ b/fish_tests.c @@ -198,7 +198,7 @@ static int stack_test( int elements ) /** Hash function for pointers */ -static int hash_func( const void *data ) +static int hash_func( void *data ) { /* srand( (int)data ); return rand(); @@ -210,7 +210,7 @@ static int hash_func( const void *data ) /** Pointer hash comparison function */ -static int compare_func( const void *key1, const void *key2 ) +static int compare_func( void *key1, void *key2 ) { return key1==key2; } @@ -577,7 +577,7 @@ static int expand_test( const wchar_t *in, int flags, ... ) } va_end( va ); - al_foreach( &out, (void (*)(const void *))&free ); + al_foreach( &out, &free ); return res; } @@ -642,7 +642,7 @@ void perf_complete() matches += al_get_count( &out ); - al_foreach( &out, (void (*)(const void *))&free ); + al_foreach( &out, &free ); al_truncate( &out, 0 ); } t2=get_time(); @@ -664,7 +664,7 @@ void perf_complete() matches += al_get_count( &out ); - al_foreach( &out, (void (*)(const void *))&free ); + al_foreach( &out, &free ); al_truncate( &out, 0 ); } t2=get_time(); @@ -713,12 +713,12 @@ int main( int argc, char **argv ) // say( L"Testing performance" ); // perf_complete(); + complete_destroy(); env_destroy(); reader_destroy(); parser_destroy(); function_destroy(); builtin_destroy(); - complete_destroy(); wutil_destroy(); event_destroy(); proc_destroy();