Hello all,

the gcc compiler returns warning during compiling of the freeIPA project:

slapi-plugin.h:6149, GNU C Compiler 4 (gcc), Priority: Normal
function declaration isn't a prototype [-Wstrict-prototypes]

6149 int slapi_rwlock_get_size();


Attached patch should fix the issue.
Thank you, Martin.

From edcf41f111270ff4655b4b771c9fedc0a315cfed Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Tue, 3 Nov 2015 17:32:53 +0100
Subject: [PATCH] Add 'void' to function definition to avoid compiler warnings

During compiling of FreeIPA we are receiving compiler error:

slapi-plugin.h:6149, GNU C Compiler 4 (gcc), Priority: Normal
function declaration isn't a prototype [-Wstrict-prototypes]

This patch should fix the compiler warning.
---
 ldap/servers/slapd/slapi-plugin.h | 2 +-
 ldap/servers/slapd/slapi2nspr.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index 72f3920fb10979e1670e8fd354364def8c281646..d2b076b45c2a2d7d9dff4696c6fb7821fbc42175 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -6146,7 +6146,7 @@ int slapi_rwlock_unlock( Slapi_RWLock *rwlock );
  *
  * \return the size of Slapi_RWLock
  */
-int slapi_rwlock_get_size();
+int slapi_rwlock_get_size( void );
 
 /*
  * thread-safe LDAP connections
diff --git a/ldap/servers/slapd/slapi2nspr.c b/ldap/servers/slapd/slapi2nspr.c
index 4bd88fef6163b6351d2d336c7d9df8c8be007481..1bfb3069b47f9534194e502054862a266edd2e83 100644
--- a/ldap/servers/slapd/slapi2nspr.c
+++ b/ldap/servers/slapd/slapi2nspr.c
@@ -261,7 +261,7 @@ slapi_rwlock_unlock( Slapi_RWLock *rwlock )
 }
 
 int
-slapi_rwlock_get_size()
+slapi_rwlock_get_size( void )
 {
 #ifdef USE_POSIX_RWLOCKS
     return sizeof(pthread_rwlock_t);
-- 
2.4.3

--
389-devel mailing list
389-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-devel

Reply via email to