From 92a56f367e6635bebf4e519a49943c15d2981d85 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 29 Jan 2007 02:56:45 +0000 Subject: fixup prototype warnings --- test/dlopen/libtest.c | 1 + test/dlopen/libtest1.c | 13 ++++++++----- test/dlopen/libtest2.c | 11 ++++++++--- 3 files changed, 17 insertions(+), 8 deletions(-) (limited to 'test/dlopen') diff --git a/test/dlopen/libtest.c b/test/dlopen/libtest.c index e37f77981..a306e4bf7 100644 --- a/test/dlopen/libtest.c +++ b/test/dlopen/libtest.c @@ -4,6 +4,7 @@ extern int __pthread_once(void); +void dltest(uint32_t **value1, uint32_t **value2); void dltest(uint32_t **value1, uint32_t **value2) { *value1 = (uint32_t *) __pthread_once; diff --git a/test/dlopen/libtest1.c b/test/dlopen/libtest1.c index f0dc9f537..a2f7dcdc0 100644 --- a/test/dlopen/libtest1.c +++ b/test/dlopen/libtest1.c @@ -2,28 +2,31 @@ extern int libtest2_func(const char *s); - -void __attribute__((constructor)) libtest1_ctor(void) +void __attribute__((constructor)) libtest1_ctor(void); +void libtest1_ctor(void) { printf("libtest1: constructor!\n"); } -void __attribute__((destructor)) libtest1_dtor(void) +void __attribute__((destructor)) libtest1_dtor(void); +void libtest1_dtor(void) { printf("libtest1: destructor!\n"); } -void __attribute__((weak)) function1(void) +void __attribute__((weak)) function1(void); +void function1(void) { printf("libtest1: I am weak function1!\n"); } +void function2(void); void function2(void) { printf("libtest1: I am function2!\n"); } - +int dltest(const char *s); int dltest(const char *s) { printf( "libtest1: function1 = %p\n" diff --git a/test/dlopen/libtest2.c b/test/dlopen/libtest2.c index 529f8bb66..526150666 100644 --- a/test/dlopen/libtest2.c +++ b/test/dlopen/libtest2.c @@ -1,27 +1,32 @@ #include #include -void __attribute__((constructor)) libtest2_ctor(void) +void __attribute__((constructor)) libtest2_ctor(void); +void libtest2_ctor(void) { printf("libtest2: constructor!\n"); } -void __attribute__((destructor)) libtest2_dtor(void) +void __attribute__((destructor)) libtest2_dtor(void); +void libtest2_dtor(void) { printf("libtest2: destructor!\n"); } +void function1(void); void function1(void) { printf("libtest2: I am function1!\n"); } -void __attribute__((weak)) function2(void) +void __attribute__((weak)) function2(void); +void function2(void) { printf("libtest2: I am weak function2!\n"); } +int libtest2_func(const char *s); int libtest2_func(const char *s) { printf( "libtest2: function1 = %p\n" -- cgit v1.2.3