Skip to content

Commit

Permalink
dbd, dso, threadproc: Fix prototypes warnings.
Browse files Browse the repository at this point in the history
warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]

BZ: 68292
GH: closes #51

Submitted by: Mina Galić (me igalic.co)



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1914368 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ylavic committed Dec 5, 2023
1 parent 68562ac commit bd6e072
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions dbd/apr_dbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ static apr_uint32_t initialised = 0, in_init = 1;
* no longer be exported.
*/
static apr_thread_mutex_t* mutex = NULL;
APR_DECLARE(apr_status_t) apr_dbd_mutex_lock()
APR_DECLARE(apr_status_t) apr_dbd_mutex_lock(void)
{
return apr_thread_mutex_lock(mutex);
}
APR_DECLARE(apr_status_t) apr_dbd_mutex_unlock()
APR_DECLARE(apr_status_t) apr_dbd_mutex_unlock(void)
{
return apr_thread_mutex_unlock(mutex);
}
#else
APR_DECLARE(apr_status_t) apr_dbd_mutex_lock() {
APR_DECLARE(apr_status_t) apr_dbd_mutex_lock(void) {
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dbd_mutex_unlock() {
APR_DECLARE(apr_status_t) apr_dbd_mutex_unlock(void) {
return APR_SUCCESS;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion threadproc/os2/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ APR_DECLARE(apr_thread_t *) apr_thread_current(void)
}


APR_DECLARE(apr_os_thread_t) apr_os_thread_current()
APR_DECLARE(apr_os_thread_t) apr_os_thread_current(void)
{
PIB *ppib;
TIB *ptib;
Expand Down
2 changes: 1 addition & 1 deletion threadproc/win32/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ APR_DECLARE(apr_status_t) apr_thread_detach(apr_thread_t *thd)
}
}

APR_DECLARE(void) apr_thread_yield()
APR_DECLARE(void) apr_thread_yield(void)
{
SwitchToThread();
}
Expand Down
8 changes: 4 additions & 4 deletions util-misc/apu_dso.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ static apr_hash_t *dsos = NULL;
static apr_uint32_t in_init = 0, initialised = 0;

#if APR_HAS_THREADS
apr_status_t apu_dso_mutex_lock()
apr_status_t apu_dso_mutex_lock(void)
{
return apr_thread_mutex_lock(mutex);
}
apr_status_t apu_dso_mutex_unlock()
apr_status_t apu_dso_mutex_unlock(void)
{
return apr_thread_mutex_unlock(mutex);
}
#else
apr_status_t apu_dso_mutex_lock() {
apr_status_t apu_dso_mutex_lock(void) {
return APR_SUCCESS;
}
apr_status_t apu_dso_mutex_unlock() {
apr_status_t apu_dso_mutex_unlock(void) {
return APR_SUCCESS;
}
#endif
Expand Down

0 comments on commit bd6e072

Please sign in to comment.