# HG changeset patch # User Bruno Haible # Date 1228694026 -3600 # Node ID fbae6908522f4003dec83d16dda3c48cca96a6ca # Parent 6b6bd3a71b396cfdee51bed39d567c3fa68df3e0 Avoid gcc -Wmissing-prototypes warnings. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-07 Bruno Haible + + * tests/test-lock.c (test_lock, test_rwlock, test_recursive_lock, + test_once): Mark functions as static. + * tests/test-tls.c (test_tls): Likewise. + 2008-12-07 Bruno Haible * lib/striconveha.h (uniconv_register_autodetect): Renamed from diff --git a/tests/test-lock.c b/tests/test-lock.c --- a/tests/test-lock.c +++ b/tests/test-lock.c @@ -125,6 +125,9 @@ abort (); } + +/* ------------------- Test normal (non-recursive) locks ------------------- */ + /* Test normal locks by having several bank accounts and several threads which shuffle around money between the accounts and another thread checking that all the money is still there. */ @@ -187,7 +190,7 @@ return NULL; } -void +static void test_lock (void) { int i; @@ -212,6 +215,9 @@ check_accounts (); } + +/* ----------------- Test read-write (non-recursive) locks ----------------- */ + /* Test read-write locks by having several bank accounts and several threads which shuffle around money between the accounts and several other threads that check that all the money is still there. */ @@ -268,7 +274,7 @@ return NULL; } -void +static void test_rwlock (void) { int i; @@ -295,6 +301,9 @@ check_accounts (); } + +/* -------------------------- Test recursive locks -------------------------- */ + /* Test recursive locks by having several bank accounts and several threads which shuffle around money between the accounts (recursively) and another thread checking that all the money is still there. */ @@ -367,7 +376,7 @@ return NULL; } -void +static void test_recursive_lock (void) { int i; @@ -392,6 +401,9 @@ check_accounts (); } + +/* ------------------------ Test once-only execution ------------------------ */ + /* Test once-only execution by having several threads attempt to grab a once-only task simultaneously (triggered by releasing a read-write lock). */ @@ -453,7 +465,7 @@ return NULL; } -void +static void test_once (void) { int i, repeat; @@ -538,6 +550,9 @@ gl_thread_join (threads[i], NULL); } + +/* -------------------------------------------------------------------------- */ + int main () { diff --git a/tests/test-tls.c b/tests/test-tls.c --- a/tests/test-tls.c +++ b/tests/test-tls.c @@ -75,6 +75,9 @@ yield (); } + +/* ----------------------- Test thread-local storage ----------------------- */ + #define KEYS_COUNT 4 static gl_tls_key_t mykeys[KEYS_COUNT]; @@ -146,7 +149,7 @@ return NULL; } -void +static void test_tls (void) { int pass, i; @@ -175,6 +178,9 @@ } } + +/* -------------------------------------------------------------------------- */ + int main () {