Browse Source

Ticket 48979 - Allow to compile 389ds with warning Wstrict-prototypes

- Remove unused forward declaration
- Remove declaration of errno

The declaration of errno is in the header file errno.h
which is alreadu included in ldap/servers/slapd/agtmmap.h

- Remove explicit casting of db_env_set_func_exists
- Fix casting of db_env_set_func_seek calback
- Fix prototype of str2simple
- Fix prototypes in str2filter.c

ldap/servers/slapd/str2filter.c:22:15: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 static struct slapi_filter *str2list();
               ^~~~~~~~~~~~
ldap/servers/slapd/str2filter.c:23:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 static int  str2subvals();

- Fix prototype vlv_getindexnames
- Fix prototypes in plugins/replication/repl5_prot_private.h

Use exact prototypes for functions Windows_Tot_Protocol_new and
Windows_Inc_Protocol_new

- Fix prototype setup_internal_backends
- Fix prototypes in repl5_prot_private.h
- Fix declaration of get_substring_filter
- Fix declarations in ldap/servers/slapd/filterentry.c
- Prepare for fixing avl_free prototype

The prototyep of the function avl_free is:
   "int avl_free(Avlnode *root, IFP dfree);"
and IFP is a typedef for function returning int
with undefined parameters.

This patch definition of callbacks used in function avl_free
to avoid warnings Wincompatible-pointer-types

e.g.
ldap/servers/plugins/roles/roles_cache.c: In function 'roles_cache_role_object_free':
ldap/servers/plugins/roles/roles_cache.c:2145:35: warning: passing argument 2 of 'avl_free' from incompatible pointer type [-Wincompatible-pointer-types]
     avl_free(this_role->avl_tree, roles_cache_role_object_nested_free);
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./ldap/servers/slapd/slap.h:113:0,
                 from ldap/servers/plugins/roles/roles_cache.c:24:
./ldap/include/avl.h:75:13: note: expected 'IFP {aka int (*)()}' but argument is of type 'void (*)(role_object_nested *) {aka void (*)(struct _role_object_nested *)}'
 extern int  avl_free( Avlnode *root, IFP dfree );
             ^~~~~~~~

- Use strict prototypes in avl.h

There is a change in definiton of avl_ functions.
The type of data was changed caddr_t into "void *".
This change was necessary because avl_* functions
were used also with other tyes then caddr_t and there
would be compile time warning Wincompatible-pointer-types

There is still one declaration/typedef which is not
prototype. And it is a typedef for callbacks (IFP)
which is used by avl_* functions and cannot have defined
argumets.

- Suppress warnings caused by undefined parameters in IFP
- Suppress Wstrict-prototypes
- Fix warnings Wstrict-prototypes

Functions which does not expect any agumets shoudl be declared with void
as parameter otherwise they can expect any count of arguments.

https://fedorahosted.org/389/ticket/48979

Author: lslebodn

Review by: wibrown (Thanks so much Lukas!)
Lukas Slebodnik 9 years ago
parent
commit
5b0c9c0a90
100 changed files with 457 additions and 442 deletions
  1. 1 1
      include/ldaputil/certmap.h
  2. 1 1
      include/ldaputil/ldaputil.h
  3. 1 1
      include/libaccess/aclproto.h
  4. 1 1
      include/libadmin/libadmin.h
  5. 1 1
      include/netsite.h
  6. 1 1
      include/public/nsacl/plistdef.h
  7. 22 13
      ldap/include/avl.h
  8. 13 13
      ldap/libraries/libavl/avl.c
  9. 2 2
      ldap/servers/plugins/acct_usability/acct_usability.c
  10. 1 1
      ldap/servers/plugins/acctpolicy/acct_init.c
  11. 20 20
      ldap/servers/plugins/acl/acl.h
  12. 6 6
      ldap/servers/plugins/acl/acl_ext.c
  13. 10 9
      ldap/servers/plugins/acl/acllist.c
  14. 1 1
      ldap/servers/plugins/acl/aclplugin.c
  15. 7 7
      ldap/servers/plugins/automember/automember.c
  16. 6 6
      ldap/servers/plugins/automember/automember.h
  17. 5 5
      ldap/servers/plugins/chainingdb/cb.h
  18. 2 2
      ldap/servers/plugins/chainingdb/cb_conn_stateless.c
  19. 2 2
      ldap/servers/plugins/cos/cos.c
  20. 7 7
      ldap/servers/plugins/cos/cos_cache.c
  21. 2 2
      ldap/servers/plugins/cos/cos_cache.h
  22. 2 2
      ldap/servers/plugins/deref/deref.c
  23. 19 19
      ldap/servers/plugins/dna/dna.c
  24. 1 1
      ldap/servers/plugins/http/http_client.c
  25. 1 1
      ldap/servers/plugins/http/http_client.h
  26. 2 4
      ldap/servers/plugins/http/http_impl.c
  27. 1 1
      ldap/servers/plugins/http/http_impl.h
  28. 4 4
      ldap/servers/plugins/linkedattrs/linked_attrs.c
  29. 8 8
      ldap/servers/plugins/linkedattrs/linked_attrs.h
  30. 12 12
      ldap/servers/plugins/memberof/memberof.h
  31. 7 7
      ldap/servers/plugins/mep/mep.c
  32. 6 6
      ldap/servers/plugins/mep/mep.h
  33. 9 9
      ldap/servers/plugins/pam_passthru/pam_passthru.h
  34. 3 3
      ldap/servers/plugins/pam_passthru/pam_ptconfig.c
  35. 1 1
      ldap/servers/plugins/passthru/passthru.h
  36. 4 4
      ldap/servers/plugins/posix-winsync/posix-group-func.h
  37. 2 2
      ldap/servers/plugins/posix-winsync/posix-winsync.c
  38. 16 16
      ldap/servers/plugins/posix-winsync/posix-wsp-ident.h
  39. 9 9
      ldap/servers/plugins/presence/presence.c
  40. 1 1
      ldap/servers/plugins/pwdstorage/pwdstorage.h
  41. 14 14
      ldap/servers/plugins/referint/referint.c
  42. 2 2
      ldap/servers/plugins/replication/cl4.h
  43. 4 4
      ldap/servers/plugins/replication/cl5.h
  44. 30 30
      ldap/servers/plugins/replication/cl5_api.c
  45. 9 9
      ldap/servers/plugins/replication/cl5_api.h
  46. 4 4
      ldap/servers/plugins/replication/cl5_clcache.c
  47. 2 2
      ldap/servers/plugins/replication/cl5_clcache.h
  48. 1 1
      ldap/servers/plugins/replication/csnpl.h
  49. 2 2
      ldap/servers/plugins/replication/legacy_consumer.c
  50. 1 1
      ldap/servers/plugins/replication/llist.h
  51. 20 12
      ldap/servers/plugins/replication/repl.h
  52. 21 21
      ldap/servers/plugins/replication/repl5.h
  53. 1 1
      ldap/servers/plugins/replication/repl5_inc_protocol.c
  54. 1 1
      ldap/servers/plugins/replication/repl5_init.c
  55. 4 4
      ldap/servers/plugins/replication/repl5_prot_private.h
  56. 4 4
      ldap/servers/plugins/replication/repl5_replica_config.c
  57. 1 1
      ldap/servers/plugins/replication/repl_init.c
  58. 2 2
      ldap/servers/plugins/replication/repl_shared.h
  59. 1 1
      ldap/servers/plugins/replication/replutil.c
  60. 1 1
      ldap/servers/plugins/replication/windowsrepl.h
  61. 1 1
      ldap/servers/plugins/rever/rever.h
  62. 6 6
      ldap/servers/plugins/roles/roles_cache.c
  63. 3 3
      ldap/servers/plugins/roles/roles_cache.h
  64. 1 1
      ldap/servers/plugins/roles/roles_plugin.c
  65. 3 3
      ldap/servers/plugins/rootdn_access/rootdn_access.c
  66. 2 2
      ldap/servers/plugins/sync/sync.h
  67. 4 4
      ldap/servers/plugins/sync/sync_persist.c
  68. 1 1
      ldap/servers/plugins/syntaxes/bin.c
  69. 1 1
      ldap/servers/plugins/syntaxes/bitstring.c
  70. 1 1
      ldap/servers/plugins/syntaxes/ces.c
  71. 1 1
      ldap/servers/plugins/syntaxes/cis.c
  72. 1 1
      ldap/servers/plugins/syntaxes/dn.c
  73. 1 1
      ldap/servers/plugins/syntaxes/int.c
  74. 1 1
      ldap/servers/plugins/syntaxes/nameoptuid.c
  75. 1 1
      ldap/servers/plugins/syntaxes/numericstring.c
  76. 1 1
      ldap/servers/plugins/syntaxes/tel.c
  77. 2 2
      ldap/servers/plugins/syntaxes/validate_task.c
  78. 1 1
      ldap/servers/plugins/usn/usn.c
  79. 2 2
      ldap/servers/plugins/usn/usn.h
  80. 1 1
      ldap/servers/plugins/usn/usn_cleanup.c
  81. 10 10
      ldap/servers/plugins/views/views.c
  82. 0 2
      ldap/servers/slapd/agtmmap.h
  83. 3 3
      ldap/servers/slapd/attrsyntax.c
  84. 4 4
      ldap/servers/slapd/auth.c
  85. 10 10
      ldap/servers/slapd/back-ldbm/dblayer.c
  86. 1 1
      ldap/servers/slapd/back-ldbm/idl.c
  87. 1 1
      ldap/servers/slapd/back-ldbm/idl_new.c
  88. 3 3
      ldap/servers/slapd/back-ldbm/idl_shim.c
  89. 12 12
      ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
  90. 1 1
      ldap/servers/slapd/back-ldbm/sort.c
  91. 1 1
      ldap/servers/slapd/back-ldbm/vlv_key.h
  92. 2 2
      ldap/servers/slapd/back-ldbm/vlv_srch.h
  93. 1 1
      ldap/servers/slapd/ch_malloc.c
  94. 1 1
      ldap/servers/slapd/connection.c
  95. 5 5
      ldap/servers/slapd/csngen.c
  96. 11 11
      ldap/servers/slapd/daemon.c
  97. 1 1
      ldap/servers/slapd/detach.c
  98. 6 6
      ldap/servers/slapd/dn.c
  99. 2 2
      ldap/servers/slapd/dse.c
  100. 2 1
      ldap/servers/slapd/entry.c

+ 1 - 1
include/ldaputil/certmap.h

@@ -121,7 +121,7 @@ NSAPI_PUBLIC void *ldapu_realloc (void *ptr, int size);
 NSAPI_PUBLIC void ldapu_free (void *ptr);
 
 
-NSAPI_PUBLIC int ldaputil_exit ();
+NSAPI_PUBLIC int ldaputil_exit(void);
 
 #ifdef __cplusplus
 }

+ 1 - 1
include/ldaputil/ldaputil.h

@@ -74,7 +74,7 @@ extern void ldapu_certmap_listinfo_free (void *certmap_listinfo);
 
 extern void ldapu_propval_list_free (void *propval_list);
 
-NSAPI_PUBLIC extern int ldaputil_exit ();
+NSAPI_PUBLIC extern int ldaputil_exit(void);
 
 NSAPI_PUBLIC extern int ldapu_cert_to_user (void *cert, LDAP *ld,
 					    const char *basedn,

+ 1 - 1
include/libaccess/aclproto.h

@@ -118,7 +118,7 @@ NSAPI_PUBLIC int ACL_DatabaseNamesFree(NSErr_t *errp, char **names, int count);
 
 NSAPI_PUBLIC int ACL_InitAttr2Index(void);
 NSAPI_PUBLIC int ACL_Attr2Index(const char *attrname);
-NSAPI_PUBLIC void ACL_Attr2IndexListDestroy();
+NSAPI_PUBLIC void ACL_Attr2IndexListDestroy(void);
 NSAPI_PUBLIC void ACL_AttrGetterHashDestroy(void);
 NSAPI_PUBLIC void ACL_Destroy(void);
 NSAPI_PUBLIC void ACL_DestroyPools(void);

+ 1 - 1
include/libadmin/libadmin.h

@@ -61,7 +61,7 @@ NSAPI_PUBLIC int ADM_Init(void);
 
 /* Since everyone seems to be doing this independently, at least centralize
    the code.  Useful for onClicks and automatic help */
-NSAPI_PUBLIC char *helpJavaScript();
+NSAPI_PUBLIC char *helpJavaScript(void);
 NSAPI_PUBLIC char *helpJavaScriptForTopic( char *topic );
 
 /* Report an error.  Takes 3 args: 1. Category of error 

+ 1 - 1
include/netsite.h

@@ -104,7 +104,7 @@ NSAPI_PUBLIC char *INTdns_guess_domain(char * hname);
 
 #ifdef INTNSAPI
 
-NSAPI_PUBLIC char *INTsystem_version();
+NSAPI_PUBLIC char *INTsystem_version(void);
 
 /*
    Depending on the system, memory allocated via these macros may come from 

+ 1 - 1
include/public/nsacl/plistdef.h

@@ -45,7 +45,7 @@ typedef struct PListStruct_s *PList_t;
 #ifdef __cplusplus
 typedef void (PListFunc_t)(char*, const void*, void*);
 #else
-typedef void (PListFunc_t)();
+typedef void (PListFunc_t)(void);
 #endif
 
 #ifndef INTNSACL

+ 22 - 13
ldap/include/avl.h

@@ -39,6 +39,20 @@ typedef struct avlnode {
 	struct avlnode	*avl_right;
 } Avlnode;
 
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#endif
+
+#ifndef _IFP
+#define _IFP
+typedef int (*IFP)(); /* takes undefined arguments */
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic pop
+#endif
+
 #define NULLAVL	((Avlnode *) NULL)
 
 /* balance factor values */
@@ -49,14 +63,14 @@ typedef struct avlnode {
 /* avl routines */
 #define avl_getone(x)	(x == 0 ? 0 : (x)->avl_data)
 #define avl_onenode(x)	(x == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0))
-extern int		avl_insert();
-extern caddr_t		avl_delete();
-extern caddr_t		avl_find();
-extern caddr_t		avl_getfirst();
-extern caddr_t		avl_getnext();
-extern int		avl_dup_error();
-extern int		avl_apply();
-extern int		avl_free();
+extern int avl_insert(Avlnode **root, void *data, IFP fcmp, IFP fdup);
+extern caddr_t avl_delete(Avlnode **root, void *data, IFP fcmp );
+extern caddr_t avl_find(Avlnode *root, void *data, IFP fcmp );
+extern caddr_t avl_getfirst(Avlnode *root );
+extern caddr_t avl_getnext(void);
+extern int avl_dup_error(void);
+extern int avl_apply(Avlnode *root, IFP fn, void *arg, int stopflag, int type);
+extern int avl_free(Avlnode *root, IFP dfree);
 
 /* apply traversal types */
 #define AVL_PREORDER	1
@@ -65,11 +79,6 @@ extern int		avl_free();
 /* what apply returns if it ran out of nodes */
 #define AVL_NOMORE	-6
 
-#ifndef _IFP
-#define _IFP
-typedef int	(*IFP)();
-#endif
-
 caddr_t avl_find_lin( Avlnode *root, caddr_t data, IFP fcmp );
 
 #endif /* _AVL */

+ 13 - 13
ldap/libraries/libavl/avl.c

@@ -218,14 +218,14 @@ ravl_insert(
 int
 avl_insert(
     Avlnode	**root,
-    caddr_t	data,
+    void       *data,
     IFP		fcmp,
     IFP		fdup
 )
 {
 	int	taller;
 
-	return( ravl_insert( root, data, &taller, fcmp, fdup, 0 ) );
+       return ravl_insert( root, (caddr_t)data, &taller, fcmp, fdup, 0 );
 }
 
 /* 
@@ -458,11 +458,11 @@ ravl_delete(
  */
 
 caddr_t
-avl_delete( Avlnode **root, caddr_t data, IFP fcmp )
+avl_delete( Avlnode **root, void *data, IFP fcmp )
 {
 	int	shorter;
 
-	return( ravl_delete( root, data, fcmp, &shorter ) );
+       return ravl_delete( root, (caddr_t)data, fcmp, &shorter );
 }
 
 static int
@@ -536,18 +536,18 @@ int
 avl_apply(
     Avlnode	*root,
     IFP		fn,
-    caddr_t	arg,
+    void       *arg,
     int		stopflag,
     int		type
 )
 {
 	switch ( type ) {
 	case AVL_INORDER:
-		return( avl_inapply( root, fn, arg, stopflag ) );
+              return avl_inapply( root, fn, (caddr_t)arg, stopflag);
 	case AVL_PREORDER:
-		return( avl_preapply( root, fn, arg, stopflag ) );
+              return avl_preapply( root, fn, (caddr_t)arg, stopflag);
 	case AVL_POSTORDER:
-		return( avl_postapply( root, fn, arg, stopflag ) );
+              return avl_postapply( root, fn, (caddr_t)arg, stopflag);
 	default:
 		fprintf( stderr, "Invalid traversal type %d\n", type );
 		return( -1 );
@@ -649,11 +649,11 @@ avl_free( Avlnode *root, IFP dfree )
  */
 
 caddr_t
-avl_find( Avlnode *root, caddr_t data, IFP fcmp )
+avl_find(Avlnode *root, void *data, IFP fcmp)
 {
 	int	cmp;
 
-	while ( root != 0 && (cmp = (*fcmp)( data, root->avl_data )) != 0 ) {
+       while ( root != 0 && (cmp = (*fcmp)( (caddr_t)data, root->avl_data )) != 0 ) {
 		if ( cmp < 0 )
 			root = root->avl_left;
 		else
@@ -753,7 +753,7 @@ avl_getfirst( Avlnode *root )
 }
 
 caddr_t
-avl_getnext()
+avl_getnext(void)
 {
 	if ( avl_list == 0 )
 		return( 0 );
@@ -767,12 +767,12 @@ avl_getnext()
 	return( avl_list[ avl_nextlist++ ] );
 }
 
-int avl_dup_error()
+int avl_dup_error(void)
 {
 	return( -1 );
 }
 
-int avl_dup_ok()
+int avl_dup_ok(void)
 {
 	return( 0 );
 }

+ 2 - 2
ldap/servers/plugins/acct_usability/acct_usability.c

@@ -53,7 +53,7 @@ auc_set_plugin_id(void *pluginID)
 }
 
 void *
-auc_get_plugin_id()
+auc_get_plugin_id(void)
 {
     return _PluginID;
 }
@@ -65,7 +65,7 @@ auc_set_plugin_dn(char *pluginDN)
 }
 
 char *
-auc_get_plugin_dn()
+auc_get_plugin_dn(void)
 {
     return _PluginDN;
 }

+ 1 - 1
ldap/servers/plugins/acctpolicy/acct_init.c

@@ -75,7 +75,7 @@ acct_policy_set_plugin_id(void *pluginID)
 }
 
 void *
-acct_policy_get_plugin_id()
+acct_policy_get_plugin_id(void)
 {
     return _PluginID;
 }

+ 20 - 20
ldap/servers/plugins/acl/acl.h

@@ -765,7 +765,7 @@ extern int DS_LASSSFEval(NSErr_t *errp, char *attribute,
 		PList_t global_auth);
 
 /* other function declaration */
-int 		aclinit_main();
+int               aclinit_main(void);
 int			acl_match_substring (struct slapi_filter *f, char *str, int match);
 void		acl_print_acllib_err(NSErr_t *errp, char * str);
 void		acl_initBlock ( Slapi_PBlock *pb );
@@ -798,8 +798,8 @@ int		acl_verify_syntax(Slapi_PBlock *pb, const Slapi_DN *e_sdn,
 int		acllist_insert_aci_needsLock_ext( Slapi_PBlock *pb, const Slapi_DN *e_sdn,
 			const struct berval* aci_attr);
 char *		acl_access2str ( int access );
-int 		acl_init_ext ();
-void		acl_remove_ext ();
+int               acl_init_ext(void);
+void              acl_remove_ext(void);
 void * 		acl_get_ext (ext_type type, void *object);
 void  		acl_set_ext (ext_type type, void *object, void *data);
 void		acl_reset_ext_status (ext_type type, void *object);
@@ -813,19 +813,19 @@ void        acl_copyEval_context ( struct acl_pblock *aclpb, aclEvalContext *src
                         aclEvalContext *dest , int copy_attr_only );
 struct acl_pblock *	acl_get_aclpb ( Slapi_PBlock *pb, int type );
 int 		acl_client_anonymous ( Slapi_PBlock *pb );
-short		acl_get_aclsignature();
+short              acl_get_aclsignature(void);
 void		acl_set_aclsignature( short value);
-void		acl_regen_aclsignature();
+void              acl_regen_aclsignature(void);
 struct acl_pblock * acl_new_proxy_aclpb( Slapi_PBlock *pb );
 void 		acl_set_authorization_dn( Slapi_PBlock *pb, char *dn, int type );
 void 		acl_init_aclpb ( Slapi_PBlock *pb , Acl_PBlock *aclpb, 
 								const char *dn, int copy_from_aclcb);
-int 		acl_create_aclpb_pool ();
-void        acl_destroy_aclpb_pool ();
+int               acl_create_aclpb_pool(void);
+void        acl_destroy_aclpb_pool(void);
 int		acl_skip_access_check ( Slapi_PBlock *pb,  Slapi_Entry *e, int access );
 
-int			aclext_alloc_lockarray ();
-void		aclext_free_lockarray();
+int                     aclext_alloc_lockarray(void);
+void              aclext_free_lockarray(void);
 
 int			aclutil_str_append(char **str1, const char *str2);
 void		aclutil_print_err (int rv , const Slapi_DN *sdn,
@@ -839,7 +839,7 @@ char *		aclutil_expand_paramString ( char *str, Slapi_Entry *e );
 void		acllist_init_scan (Slapi_PBlock *pb, int scope, const char *base);
 aci_t * 	acllist_get_first_aci (Acl_PBlock *aclpb, PRUint32 *cookie );
 aci_t * 	acllist_get_next_aci ( Acl_PBlock *aclpb, aci_t *curraci, PRUint32 *cookie );
-aci_t *		acllist_get_aci_new ();
+aci_t *              acllist_get_aci_new(void);
 void		acllist_free_aci (aci_t *item);
 void		acllist_acicache_READ_UNLOCK(void);
 void		acllist_acicache_READ_LOCK(void);
@@ -847,13 +847,13 @@ void		acllist_acicache_WRITE_UNLOCK(void);
 void		acllist_acicache_WRITE_LOCK(void);
 void		acllist_aciscan_update_scan ( Acl_PBlock *aclpb, char *edn );
 int 		acllist_remove_aci_needsLock( const Slapi_DN *sdn,  const struct berval *attr );
-void		free_acl_avl_list();
+void              free_acl_avl_list(void);
 int		acllist_insert_aci_needsLock( const Slapi_DN *e_sdn, const struct berval* aci_attr);
-int 		acllist_init ();
-void		acllist_free();
+int               acllist_init(void);
+void              acllist_free(void);
 int			acllist_moddn_aci_needsLock ( Slapi_DN *oldsdn, char *newdn );
 void		acllist_print_tree ( Avlnode *root, int *depth, char *start, char *side);
-AciContainer *acllist_get_aciContainer_new ( );
+AciContainer *acllist_get_aciContainer_new(void);
 void		acllist_free_aciContainer (  AciContainer **container);
 void 		acllist_done_aciContainer (  AciContainer *);
 void		free_targetattrfilters( Targetattrfilter ***attrFilterArray);
@@ -863,9 +863,9 @@ void 		aclg_regen_ugroup_signature( aclUserGroup *ugroup);
 void		aclg_markUgroupForRemoval ( aclUserGroup *u_group );
 void		aclg_reader_incr_ugroup_refcnt(aclUserGroup* u_group);
 int			aclg_numof_usergroups(void);
-int 		aclgroup_init ();
-void		aclgroup_free();
-void		aclg_regen_group_signature ();
+int               aclgroup_init(void);
+void              aclgroup_free(void);
+void              aclg_regen_group_signature(void);
 void		aclg_reset_userGroup ( struct acl_pblock *aclpb );
 void     	aclg_init_userGroup ( struct acl_pblock *aclpb, const char *dn , int got_lock);
 aclUserGroup * aclg_get_usersGroup ( struct acl_pblock *aclpb , char *n_dn);
@@ -873,11 +873,11 @@ aclUserGroup * aclg_get_usersGroup ( struct acl_pblock *aclpb , char *n_dn);
 void		aclg_lock_groupCache (int type );
 void		aclg_unlock_groupCache (int type );
 
-int			aclanom_init();
+int                     aclanom_init(void);
 int 		aclanom_match_profile (Slapi_PBlock *pb,  struct acl_pblock *aclpb, 
 									Slapi_Entry *e, char *attr, int access);
 void		aclanom_get_suffix_info(Slapi_Entry *e, struct acl_pblock *aclpb );
-void		aclanom_invalidateProfile();
+void              aclanom_invalidateProfile(void);
 void		aclanom__del_profile (int closing);
 
 typedef enum{
@@ -888,7 +888,7 @@ typedef enum{
 }acl_lock_flag_t;
 void 		aclanom_gen_anomProfile (acl_lock_flag_t lock_flag);
 int 		aclanom_is_client_anonymous ( Slapi_PBlock *pb );
-int 		aclinit_main ();
+int               aclinit_main(void);
 typedef struct aclinit_handler_callback_data {
 #define		ACL_ADD_ACIS 	1
 #define		ACL_REMOVE_ACIS 0

+ 6 - 6
ldap/servers/plugins/acl/acl_ext.c

@@ -18,11 +18,11 @@ static void acl__done_aclpb ( struct acl_pblock *aclpb );
 static void	acl__dump_stats ( struct acl_pblock *aclpb , const char *block_type);
 static char * acl__get_aclpb_type ( Acl_PBlock *aclpb );
 #endif
-static Acl_PBlock * acl__get_aclpb_from_pool ( );
+static Acl_PBlock * acl__get_aclpb_from_pool(void);
 static int acl__put_aclpb_back_to_pool ( Acl_PBlock *aclpb );
-static Acl_PBlock * acl__malloc_aclpb ( );
+static Acl_PBlock * acl__malloc_aclpb(void);
 static void acl__free_aclpb ( Acl_PBlock **aclpb_ptr);
-static PRLock *aclext_get_lock ();
+static PRLock *aclext_get_lock(void);
 
 
 struct acl_pbqueue {
@@ -179,7 +179,7 @@ aclext_free_lockarray()
 static PRUint32 slot_id =0;
 
 static PRLock *
-aclext_get_lock ()
+aclext_get_lock(void)
 {
 
 	PRUint16 slot = slot_id % ACLEXT_MAX_LOCKS;
@@ -545,7 +545,7 @@ acl_destroy_aclpb_pool ()
  *
  */
 static Acl_PBlock *
-acl__get_aclpb_from_pool ( )
+acl__get_aclpb_from_pool(void)
 {
 	Acl_PBlock		*aclpb = NULL;
 	Acl_PBlock		*t_aclpb = NULL;
@@ -626,7 +626,7 @@ acl__put_aclpb_back_to_pool ( Acl_PBlock *aclpb )
  *
  */
 static Acl_PBlock *
-acl__malloc_aclpb ( )
+acl__malloc_aclpb(void)
 {
 	Acl_PBlock		*aclpb = NULL;
 

+ 10 - 9
ldap/servers/plugins/acl/acllist.c

@@ -68,7 +68,7 @@ static int		__acllist_aciContainer_node_dup ( caddr_t d1, caddr_t d2 );
 void my_print( Avlnode	*root );
 
 int
-acllist_init ()
+acllist_init(void)
 {
 
 	if (( aci_rwlock = slapi_new_rwlock() ) == NULL ) {
@@ -86,7 +86,7 @@ acllist_init ()
 }
 
 void
-acllist_free()
+acllist_free(void)
 {
    if(aci_rwlock){
        slapi_destroy_rwlock(aci_rwlock);
@@ -470,7 +470,7 @@ acllist_done_aciContainer ( AciContainer *head )
 	head->acic_list = NULL;
 }
 
-static void
+static int
 free_aci_avl_container(AciContainer *data)
 {
 	aci_t *head, *next = NULL;
@@ -485,17 +485,18 @@ free_aci_avl_container(AciContainer *data)
 	data->acic_list = NULL;
 
 	acllist_free_aciContainer(&data);
+       return 0;
 }
 
 void
-free_acl_avl_list()
+free_acl_avl_list(void)
 {
 	avl_free(acllistRoot,free_aci_avl_container);
 	acllistRoot = NULL;
 }
 
 aci_t *
-acllist_get_aci_new ()
+acllist_get_aci_new(void)
 {
 	aci_t	*aci_item;
 
@@ -862,14 +863,14 @@ start:
 }
 
 void
-acllist_acicache_READ_UNLOCK( )
+acllist_acicache_READ_UNLOCK(void)
 {
 	ACILIST_UNLOCK_READ ();
 
 }
 
 void
-acllist_acicache_READ_LOCK()
+acllist_acicache_READ_LOCK(void)
 {
 	/* get a reader lock */
 	ACILIST_LOCK_READ ();	
@@ -877,14 +878,14 @@ acllist_acicache_READ_LOCK()
 }
 
 void
-acllist_acicache_WRITE_UNLOCK( )
+acllist_acicache_WRITE_UNLOCK(void)
 {
 	ACILIST_UNLOCK_WRITE ();
 
 }
 
 void
-acllist_acicache_WRITE_LOCK( )
+acllist_acicache_WRITE_LOCK(void)
 {
 	ACILIST_LOCK_WRITE ();
 

+ 1 - 1
ldap/servers/plugins/acl/aclplugin.c

@@ -267,7 +267,7 @@ aclplugin_init (Slapi_PBlock *pb )
 {
 
 	int rc = 0; /* OK */
-	rc = aclinit_main ( pb );
+       rc = aclinit_main();
 
 	return  rc;
 

+ 7 - 7
ldap/servers/plugins/automember/automember.c

@@ -54,8 +54,8 @@ static int automember_add_pre_op(Slapi_PBlock *pb);
 /*
  * Config cache management functions
  */
-static int automember_load_config();
-static void automember_delete_config();
+static int automember_load_config(void);
+static void automember_delete_config(void);
 static int automember_parse_config_entry(Slapi_Entry * e, int apply);
 static void automember_free_config_entry(struct configEntry ** entry);
 
@@ -63,7 +63,7 @@ static void automember_free_config_entry(struct configEntry ** entry);
  * helpers
  */
 static Slapi_DN *automember_get_sdn(Slapi_PBlock *pb);
-static Slapi_DN *automember_get_config_area();
+static Slapi_DN *automember_get_config_area(void);
 static void automember_set_config_area(Slapi_DN *sdn);
 static int automember_dn_is_config(Slapi_DN *sdn);
 static int automember_oktodo(Slapi_PBlock *pb);
@@ -140,7 +140,7 @@ automember_set_plugin_sdn(Slapi_DN *pluginDN)
 }
 
 Slapi_DN *
-automember_get_plugin_sdn()
+automember_get_plugin_sdn(void)
 {
     return _PluginDN;
 }
@@ -405,7 +405,7 @@ automember_get_config()
  * Parse and load the config entries.
  */
 static int
-automember_load_config()
+automember_load_config(void)
 {
     int status = 0;
     int result;
@@ -829,7 +829,7 @@ automember_delete_configEntry(PRCList *entry)
 }
 
 static void
-automember_delete_config()
+automember_delete_config(void)
 {
     PRCList *list;
 
@@ -865,7 +865,7 @@ automember_set_config_area(Slapi_DN *sdn)
 }
 
 Slapi_DN *
-automember_get_config_area()
+automember_get_config_area(void)
 {
     return _ConfigAreaDN;
 }

+ 6 - 6
ldap/servers/plugins/automember/automember.h

@@ -86,20 +86,20 @@ struct configEntry {
 /*
  * Config fetch function
  */
-PRCList *automember_get_config();
+PRCList *automember_get_config(void);
 
 /*
  * Config cache locking functions
  */
-void automember_config_read_lock();
-void automember_config_write_lock();
-void automember_config_unlock();
+void automember_config_read_lock(void);
+void automember_config_write_lock(void);
+void automember_config_unlock(void);
 
 /*
  * Plugin identity functions
  */
 void automember_set_plugin_id(void *pluginID);
-void *automember_get_plugin_id();
+void *automember_get_plugin_id(void);
 void automember_set_plugin_dn(char *pluginDN);
-char *automember_get_plugin_dn();
+char *automember_get_plugin_dn(void);
 

+ 5 - 5
ldap/servers/plugins/chainingdb/cb.h

@@ -458,19 +458,19 @@ void chainingdb_prev_search_results ( Slapi_PBlock *pb );
 long cb_atol(char *str);
 
 Slapi_Entry * cb_LDAPMessage2Entry(LDAP * ctx, LDAPMessage * msg, int attrsonly);
-char * cb_get_rootdn();
+char * cb_get_rootdn(void);
 struct berval ** referrals2berval(char ** referrals);
 cb_backend_instance * cb_get_instance(Slapi_Backend * be);
-cb_backend * cb_get_backend_type();
-int cb_debug_on();
+cb_backend * cb_get_backend_type(void);
+int cb_debug_on(void);
 void cb_set_debug(int on);
 int cb_ping_farm(cb_backend_instance *cb,cb_outgoing_conn * cnx,time_t end);
 void cb_update_failed_conn_cpt ( cb_backend_instance *cb ) ;
 void cb_reset_conn_cpt( cb_backend_instance *cb ) ;
 int  cb_check_availability( cb_backend_instance *cb, Slapi_PBlock *pb ) ;
 
-time_t current_time();
-char* get_localhost_DNS();
+time_t current_time(void);
+char* get_localhost_DNS(void);
 
 /* this function is called when state of a backend changes */
 void cb_be_state_change (void *handle, char *be_name, int old_be_state, int new_be_state);

+ 2 - 2
ldap/servers/plugins/chainingdb/cb_conn_stateless.c

@@ -62,14 +62,14 @@ PRUint32 PR_GetThreadID(PRThread *thread);
 
 /* returns the threadId of the current thread modulo MAX_CONN_ARRAY 
 => gives the position of the thread in the array of secure connections */
-static int PR_ThreadSelf() {
+static int PR_ThreadSelf(void) {
 	PRThread *thr = PR_GetCurrentThread();
 	PRUint32 myself = PR_GetThreadID(thr);
 	myself &= 0x000007FF ;
 	return myself;
 }
 
-static int PR_MyThreadId() {
+static int PR_MyThreadId(void) {
 	PRThread *thr = PR_GetCurrentThread();
 	PRUint32 myself = PR_GetThreadID(thr);
 	return myself;

+ 2 - 2
ldap/servers/plugins/cos/cos.c

@@ -75,12 +75,12 @@ void cos_set_plugin_identity(void * identity)
 	cos_plugin_identity=identity;
 }
 
-void * cos_get_plugin_identity()
+void * cos_get_plugin_identity(void)
 {
 	return cos_plugin_identity;
 }
 
-int cos_version()
+int cos_version(void)
 {
 	return COS_VERSION;
 }

+ 7 - 7
ldap/servers/plugins/cos/cos_cache.c

@@ -89,14 +89,14 @@ struct objclass {
 
 /*** from proto-slap.h ***/
 
-int config_get_schemacheck();
+int config_get_schemacheck(void);
 void oc_lock_read( void );
 void oc_unlock( void );
-struct objclass* g_get_global_oc_nolock();
+struct objclass* g_get_global_oc_nolock(void);
 int slapd_log_error_proc( char *subsystem, char *fmt, ... );
 
 /* defined in cos.c */
-void * cos_get_plugin_identity();
+void * cos_get_plugin_identity(void);
 
 /*** end secrets ***/
 
@@ -199,7 +199,7 @@ typedef struct _cos_cache cosCache;
 static cosCache *pCache; /* always the current global cache, only use getref to get */
 
 /* the place to start if you want a new cache */
-static int cos_cache_create();
+static int cos_cache_create(void);
 
 /* cache index related functions */
 static int cos_cache_index_all(cosCache *pCache);
@@ -284,7 +284,7 @@ static Slapi_CondVar *start_cond = NULL;
 	fires off the cache re-creation when one is detected
 	also registers vattr callbacks
 */
-int cos_cache_init()
+int cos_cache_init(void)
 {
 	int ret = 0;
 
@@ -439,7 +439,7 @@ static void cos_cache_wait_on_change(void *arg)
 	releasing its refcount to the old cache and allowing it
 	to be destroyed.
 */
-static int cos_cache_create()
+static int cos_cache_create(void)
 {
 	int ret = -1;
 	cosCache *pNewCache;
@@ -3384,7 +3384,7 @@ bail:
 	--------------
 	notifies the cache thread we are stopping
 */
-void cos_cache_stop()
+void cos_cache_stop(void)
 {
 	LDAPDebug( LDAP_DEBUG_TRACE, "--> cos_cache_stop\n",0,0,0);
 

+ 2 - 2
ldap/servers/plugins/cos/cos_cache.h

@@ -18,8 +18,8 @@
 
 typedef void cos_cache;
 
-int cos_cache_init();
-void cos_cache_stop();
+int cos_cache_init(void);
+void cos_cache_stop(void);
 int cos_cache_getref(cos_cache **ppCache);
 int cos_cache_addref(cos_cache *pCache);
 int cos_cache_release(cos_cache *pCache);

+ 2 - 2
ldap/servers/plugins/deref/deref.c

@@ -131,7 +131,7 @@ deref_set_plugin_id(void *pluginID)
 }
 
 void *
-deref_get_plugin_id()
+deref_get_plugin_id(void)
 {
     return _PluginID;
 }
@@ -143,7 +143,7 @@ deref_set_plugin_dn(char *pluginDN)
 }
 
 char *
-deref_get_plugin_dn()
+deref_get_plugin_dn(void)
 {
     return _PluginDN;
 }

+ 19 - 19
ldap/servers/plugins/dna/dna.c

@@ -221,7 +221,7 @@ static int dna_load_plugin_config(Slapi_PBlock *pb, int use_eventq);
 static int dna_parse_config_entry(Slapi_PBlock *pb, Slapi_Entry * e, int apply);
 static void dna_delete_config(PRCList *list);
 static void dna_free_config_entry(struct configEntry ** entry);
-static int dna_load_host_port();
+static int dna_load_host_port(void);
 
 /**
  *
@@ -263,10 +263,10 @@ static void dna_create_valcheck_filter(struct configEntry *config_entry, PRUint6
 static int dna_isrepl(Slapi_PBlock *pb);
 static int dna_get_remote_config_info( struct dnaServer *server, char **bind_dn, char **bind_passwd,
                                        char **bind_method, int *is_ssl, int *port);
-static int dna_load_shared_servers();
-static void dna_delete_global_servers();
+static int dna_load_shared_servers(void);
+static void dna_delete_global_servers(void);
 static int dna_get_shared_config_attr_val(struct configEntry *config_entry, char *attr, char *value);
-static PRCList *dna_config_copy();
+static PRCList *dna_config_copy(void);
 /**
  *
  * the ops (where the real work is done)
@@ -285,7 +285,7 @@ static int dna_be_txn_mod_pre_op(Slapi_PBlock *pb);
 /**
  * debug functions - global, for the debugger
  */
-void dna_dump_config();
+void dna_dump_config(void);
 void dna_dump_config_entry(struct configEntry *);
 
 /*
@@ -295,7 +295,7 @@ void dna_dump_config_entry(struct configEntry *);
  * hold the read lock while starting a transaction(potential deadlock).
  */
 static PRCList *
-dna_config_copy()
+dna_config_copy(void)
 {
     PRCList *copy = (PRCList *)slapi_ch_calloc(1, sizeof(struct configEntry));
     PRCList *config_list;
@@ -361,32 +361,32 @@ dna_config_copy()
  * Deal with cache locking
  *
  */
-void dna_read_lock()
+void dna_read_lock(void)
 {
     slapi_rwlock_rdlock(g_dna_cache_lock);
 }
 
-void dna_write_lock()
+void dna_write_lock(void)
 {
     slapi_rwlock_wrlock(g_dna_cache_lock);
 }
 
-void dna_unlock()
+void dna_unlock(void)
 {
     slapi_rwlock_unlock(g_dna_cache_lock);
 }
 
-void dna_server_read_lock()
+void dna_server_read_lock(void)
 {
     slapi_rwlock_rdlock(g_dna_cache_server_lock);
 }
 
-void dna_server_write_lock()
+void dna_server_write_lock(void)
 {
     slapi_rwlock_wrlock(g_dna_cache_server_lock);
 }
 
-void dna_server_unlock()
+void dna_server_unlock(void)
 {
     slapi_rwlock_unlock(g_dna_cache_server_lock);
 }
@@ -396,7 +396,7 @@ void dna_server_unlock()
  * Get the dna plug-in version
  *
  */
-int dna_version()
+int dna_version(void)
 {
     return DNA_PLUGIN_VERSION;
 }
@@ -409,7 +409,7 @@ void setPluginID(void *pluginID)
     _PluginID = pluginID;
 }
 
-void *getPluginID()
+void *getPluginID(void)
 {
     return _PluginID;
 }
@@ -419,7 +419,7 @@ void setPluginDN(const char *pluginDN)
     _PluginDN = pluginDN;
 }
 
-const char *getPluginDN()
+const char *getPluginDN(void)
 {
     return _PluginDN;
 }
@@ -764,7 +764,7 @@ out:
  * Free the global linkedl ist of shared servers
  */
 static void
-dna_delete_global_servers()
+dna_delete_global_servers(void)
 {
     struct dnaServer *server, *next;
 
@@ -784,7 +784,7 @@ dna_delete_global_servers()
  * shared server config list.
  */
 static int
-dna_load_shared_servers()
+dna_load_shared_servers(void)
 {
     struct configEntry *config_entry = NULL;
     struct dnaServer *server = NULL, *global_servers = NULL;
@@ -1521,7 +1521,7 @@ dna_delete_shared_servers(PRCList **servers)
 }
 
 static int
-dna_load_host_port()
+dna_load_host_port(void)
 {
     int status = DNA_SUCCESS;
     Slapi_Entry *e = NULL;
@@ -4663,7 +4663,7 @@ bail:
 /**
  * debug functions to print config
  */
-void dna_dump_config()
+void dna_dump_config(void)
 {
     PRCList *list;
 

+ 1 - 1
ldap/servers/plugins/http/http_client.c

@@ -105,7 +105,7 @@ static void _http_shutdown( void );
  * Get the presence plug-in version
  *
  */
-int http_client_version()
+int http_client_version(void)
 {
 	return HTTP_PLUGIN_VERSION;
 }

+ 1 - 1
ldap/servers/plugins/http/http_client.h

@@ -39,7 +39,7 @@ typedef void (*api_http_init)(Slapi_ComponentId *plugin_id);
 typedef int (*api_http_get_text)(char *url, char **data, int *bytesRead);
 typedef int (*api_http_get_binary)(char *url, char **data, int *bytesRead);
 typedef int (*api_http_get_redirected_uri)(char *url, char **data, int *bytesRead);
-typedef void (*api_http_shutdown)();
+typedef void (*api_http_shutdown)(void);
 typedef int (*api_http_post)(char *url, httpheader **httpheaderArray, char *body, char **data, int *bytesRead);
 
 /* API ID for http_apib_get_interface */

+ 2 - 4
ldap/servers/plugins/http/http_impl.c

@@ -37,8 +37,6 @@
 
 int slapd_log_error_proc( char *subsystem, char *fmt, ... );
 
-char *config_get_instancedir();
-
 /*** from ldaplog.h ***/
 
 /* edited ldaplog.h for LDAPDebug()*/
@@ -132,7 +130,7 @@ int http_impl_get_text(char *url, char **data, int *bytesRead);
 int http_impl_get_binary(char *url, char **data, int *bytesRead);
 int http_impl_get_redirected_uri(char *url, char **data, int *bytesRead);
 int http_impl_post(char *url, httpheader **httpheaderArray, char *body, char **data, int *bytesRead);
-void http_impl_shutdown();
+void http_impl_shutdown(void);
 
 /**
  * Http handling functions
@@ -1270,7 +1268,7 @@ int http_impl_post(char *url, httpheader **httpheaderArray, char *body, char **d
 	return status;
 }
 
-void http_impl_shutdown()
+void http_impl_shutdown(void)
 {
 	/**
 	 * Put cleanup code here

+ 1 - 1
ldap/servers/plugins/http/http_impl.h

@@ -24,7 +24,7 @@ int http_impl_get_text(char *url, char **data, int *bytesRead);
 int http_impl_get_binary(char *url, char **data, int *bytesRead);
 int http_impl_get_redirected_uri(char *url, char **data, int *bytesRead);
 int http_impl_post(char *url, httpheader **httpheaderArray, char *body, char **data, int *bytesRead);
-void http_impl_shutdown();
+void http_impl_shutdown(void);
 
 #ifdef __cplusplus
 }

+ 4 - 4
ldap/servers/plugins/linkedattrs/linked_attrs.c

@@ -55,8 +55,8 @@ static int linked_attrs_add_pre_op(Slapi_PBlock *pb);
 /*
  * Config cache management functions
  */
-static int linked_attrs_load_config();
-static void linked_attrs_delete_config();
+static int linked_attrs_load_config(void);
+static void linked_attrs_delete_config(void);
 static int linked_attrs_parse_config_entry(Slapi_Entry * e, int apply);
 static void linked_attrs_insert_config_index(struct configEntry *entry);
 static void linked_attrs_free_config_entry(struct configEntry ** entry);
@@ -380,7 +380,7 @@ linked_attrs_get_config()
  * --- cn=etc
  */
 static int
-linked_attrs_load_config()
+linked_attrs_load_config(void)
 {
     int status = 0;
     int result;
@@ -783,7 +783,7 @@ linked_attrs_delete_configEntry(PRCList *entry)
 }
 
 static void
-linked_attrs_delete_config()
+linked_attrs_delete_config(void)
 {
     PRCList *list;
 

+ 8 - 8
ldap/servers/plugins/linkedattrs/linked_attrs.h

@@ -79,29 +79,29 @@ typedef struct _task_data
 /*
  * Debug functions - global, for the debugger
  */
-void linked_attrs_dump_config();
-void linked_attrs_dump_config_index();
+void linked_attrs_dump_config(void);
+void linked_attrs_dump_config_index(void);
 void linked_attrs_dump_config_entry(struct configEntry *);
 
 /*
  * Config fetch function
  */
-PRCList *linked_attrs_get_config();
+PRCList *linked_attrs_get_config(void);
 
 /*
  * Config cache locking functions
  */
-void linked_attrs_read_lock();
-void linked_attrs_write_lock();
-void linked_attrs_unlock();
+void linked_attrs_read_lock(void);
+void linked_attrs_write_lock(void);
+void linked_attrs_unlock(void);
 
 /*
  * Plugin identity functions
  */
 void linked_attrs_set_plugin_id(void *pluginID);
-void *linked_attrs_get_plugin_id();
+void *linked_attrs_get_plugin_id(void);
 void linked_attrs_set_plugin_dn(const char *pluginDN);
-char *linked_attrs_get_plugin_dn();
+char *linked_attrs_get_plugin_dn(void);
 
 /*
  * Fixup task callback

+ 12 - 12
ldap/servers/plugins/memberof/memberof.h

@@ -71,22 +71,22 @@ typedef struct memberofconfig {
 int memberof_config(Slapi_Entry *config_e, Slapi_PBlock *pb);
 void memberof_copy_config(MemberOfConfig *dest, MemberOfConfig *src);
 void memberof_free_config(MemberOfConfig *config);
-MemberOfConfig *memberof_get_config();
-void memberof_lock();
-void memberof_unlock();
-void memberof_rlock_config();
-void memberof_wlock_config();
-void memberof_unlock_config();
-int memberof_config_get_all_backends();
+MemberOfConfig *memberof_get_config(void);
+void memberof_lock(void);
+void memberof_unlock(void);
+void memberof_rlock_config(void);
+void memberof_wlock_config(void);
+void memberof_unlock_config(void);
+int memberof_config_get_all_backends(void);
 void memberof_set_config_area(Slapi_DN *sdn);
-Slapi_DN * memberof_get_config_area();
+Slapi_DN * memberof_get_config_area(void);
 void memberof_set_plugin_area(Slapi_DN *sdn);
-Slapi_DN * memberof_get_plugin_area();
+Slapi_DN * memberof_get_plugin_area(void);
 int memberof_shared_config_validate(Slapi_PBlock *pb);
 int memberof_apply_config (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* e,
 	int *returncode, char *returntext, void *arg);
-void *memberof_get_plugin_id();
-void memberof_release_config();
-PRUint64 get_plugin_started();
+void *memberof_get_plugin_id(void);
+void memberof_release_config(void);
+PRUint64 get_plugin_started(void);
 
 #endif	/* _MEMBEROF_H_ */

+ 7 - 7
ldap/servers/plugins/mep/mep.c

@@ -57,8 +57,8 @@ static int mep_modrdn_pre_op(Slapi_PBlock *pb);
 /*
  * Config cache management functions
  */
-static int mep_load_config();
-static void mep_delete_config();
+static int mep_load_config(void);
+static void mep_delete_config(void);
 static int mep_parse_config_entry(Slapi_Entry * e, int apply);
 static void mep_free_config_entry(struct configEntry ** entry);
 
@@ -66,7 +66,7 @@ static void mep_free_config_entry(struct configEntry ** entry);
  * helpers
  */
 static Slapi_DN *mep_get_sdn(Slapi_PBlock * pb);
-static Slapi_DN *mep_get_config_area();
+static Slapi_DN *mep_get_config_area(void);
 static void mep_set_config_area(Slapi_DN *sdn);
 static int mep_dn_is_config(Slapi_DN *sdn);
 static int mep_dn_is_template(Slapi_DN *dn);
@@ -136,7 +136,7 @@ mep_set_plugin_sdn(Slapi_DN *pluginDN)
 }
 
 Slapi_DN *
-mep_get_plugin_sdn()
+mep_get_plugin_sdn(void)
 {
     return _PluginDN;
 }
@@ -390,7 +390,7 @@ mep_get_config()
  * --- cn=etc,...
  */
 static int
-mep_load_config()
+mep_load_config(void)
 {
     int status = 0;
     int result;
@@ -749,7 +749,7 @@ mep_delete_configEntry(PRCList *entry)
 }
 
 static void
-mep_delete_config()
+mep_delete_config(void)
 {
     PRCList *list;
 
@@ -990,7 +990,7 @@ mep_set_config_area(Slapi_DN *sdn)
 }
 
 static Slapi_DN *
-mep_get_config_area()
+mep_get_config_area(void)
 {
     return _ConfigAreaDN;
 }

+ 6 - 6
ldap/servers/plugins/mep/mep.h

@@ -82,20 +82,20 @@ struct configEntry {
 /*
  * Config fetch function
  */
-PRCList *mep_get_config();
+PRCList *mep_get_config(void);
 
 /*
  * Config cache locking functions
  */
-void mep_config_read_lock();
-void mep_config_write_lock();
-void mep_config_unlock();
+void mep_config_read_lock(void);
+void mep_config_write_lock(void);
+void mep_config_unlock(void);
 
 /*
  * Plugin identity functions
  */
 void mep_set_plugin_id(void *pluginID);
-void *mep_get_plugin_id();
+void *mep_get_plugin_id(void);
 void mep_set_plugin_dn(char *pluginDN);
-char *mep_get_plugin_dn();
+char *mep_get_plugin_dn(void);
 

+ 9 - 9
ldap/servers/plugins/pam_passthru/pam_passthru.h

@@ -107,25 +107,25 @@ typedef struct pam_passthruconfig {
  */
 
 void pam_passthruauth_set_plugin_identity(void * identity);
-void * pam_passthruauth_get_plugin_identity();
+void * pam_passthruauth_get_plugin_identity(void);
 void pam_passthruauth_set_plugin_sdn(const Slapi_DN *plugin_sdn);
-const Slapi_DN *pam_passthruauth_get_plugin_sdn();
-const char *pam_passthruauth_get_plugin_dn();
-void pam_passthru_read_lock();
-void pam_passthru_write_lock();
-void pam_passthru_unlock();
+const Slapi_DN *pam_passthruauth_get_plugin_sdn(void);
+const char *pam_passthruauth_get_plugin_dn(void);
+void pam_passthru_read_lock(void);
+void pam_passthru_write_lock(void);
+void pam_passthru_unlock(void);
 
 /*
  * pam_ptconfig.c:
  */
 int pam_passthru_load_config(int skip_validate);
-void pam_passthru_delete_config();
+void pam_passthru_delete_config(void);
 Pam_PassthruConfig *pam_passthru_get_config( Slapi_DN *bind_sdn );
 int pam_passthru_validate_config (Slapi_Entry* e, char *returntext);
 int pam_passthru_dn_is_config(Slapi_DN *sdn);
 void pam_passthru_set_config_area(Slapi_DN *sdn);
-Slapi_DN* pam_passthru_get_config_area();
-void pam_passthru_free_config_area();
+Slapi_DN* pam_passthru_get_config_area(void);
+void pam_passthru_free_config_area(void);
 
 /*
  * pam_ptimpl.c

+ 3 - 3
ldap/servers/plugins/pam_passthru/pam_ptconfig.c

@@ -215,13 +215,13 @@ check_missing_suffix_flag(int val) {
 	return PR_FALSE;
 }
 
-static char *get_missing_suffix_values()
+static char *get_missing_suffix_values(void)
 {
 	return PAMPT_MISSING_SUFFIX_ERROR_STRING ", " PAMPT_MISSING_SUFFIX_ALLOW_STRING ", "
 		PAMPT_MISSING_SUFFIX_IGNORE_STRING;
 }
 
-static char *get_map_method_values()
+static char *get_map_method_values(void)
 {
 	return PAMPT_MAP_METHOD_DN_STRING " or " PAMPT_MAP_METHOD_RDN_STRING " or " PAMPT_MAP_METHOD_ENTRY_STRING;
 }
@@ -333,7 +333,7 @@ parse_map_method(char *map_method, int *one, int *two, int *three, char *returnt
 }
 
 static void
-print_suffixes()
+print_suffixes(void)
 {
 	void *cookie = NULL;
 	Slapi_DN *sdn = NULL;

+ 1 - 1
ldap/servers/plugins/passthru/passthru.h

@@ -136,6 +136,6 @@ void passthru_free_bervals( struct berval **bvs );
 /*
  * ptpreop.c
  */
-void passthru_free_config();
+void passthru_free_config(void);
 
 #endif	/* _PASSTHRU_H_ */

+ 4 - 4
ldap/servers/plugins/posix-winsync/posix-group-func.h

@@ -14,10 +14,10 @@ int dn_in_set(const char* uid, char **uids);
 int modGroupMembership(Slapi_Entry *entry, Slapi_Mods *smods, int *do_modify, int newposixgroup);
 int addGroupMembership(Slapi_Entry *entry, Slapi_Entry *ad_entry);
 char * searchUid(const char *udn);
-void memberUidLock();
-void memberUidUnlock();
-int memberUidLockInit();
-void memberUidLockDestroy();
+void memberUidLock(void);
+void memberUidUnlock(void);
+int memberUidLockInit(void);
+void memberUidLockDestroy(void);
 int addUserToGroupMembership(Slapi_Entry *entry);
 void propogateDeletionsUpward(Slapi_Entry *, const Slapi_DN *, Slapi_ValueSet*, Slapi_ValueSet *, int);
 int hasObjectClass(Slapi_Entry *entry, const char *objectClass);

+ 2 - 2
ldap/servers/plugins/posix-winsync/posix-winsync.c

@@ -73,7 +73,7 @@
 Slapi_Value **
 valueset_get_valuearray(const Slapi_ValueSet *vs); /* stolen from proto-slap.h */
 void *
-posix_winsync_get_plugin_identity();
+posix_winsync_get_plugin_identity(void);
 void *
 posix_winsync_agmt_init(const Slapi_DN *ds_subtree, const Slapi_DN *ad_subtree);
 
@@ -1995,7 +1995,7 @@ posix_winsync_set_plugin_identity(void * identity)
 }
 
 void *
-posix_winsync_get_plugin_identity()
+posix_winsync_get_plugin_identity(void)
 {
     return posix_winsync_plugin_id;
 }

+ 16 - 16
ldap/servers/plugins/posix-winsync/posix-wsp-ident.h

@@ -19,7 +19,7 @@
 #define POSIX_WINSYNC_LOWER_CASE "posixWinsyncLowerCaseUID"
 #define POSIX_WINSYNC_MAP_NESTED_GROUPING "posixWinsyncMapNestedGrouping"
 
-void * posix_winsync_get_plugin_identity();
+void * posix_winsync_get_plugin_identity(void);
 
 typedef struct posix_winsync_config_struct {
     Slapi_Mutex *lock; /* for config access */
@@ -34,25 +34,25 @@ typedef struct posix_winsync_config_struct {
 } POSIX_WinSync_Config;
 
 int posix_winsync_config(Slapi_Entry *config_e);
-void posix_winsync_config_free();
-POSIX_WinSync_Config *posix_winsync_get_config();
-PRBool posix_winsync_config_get_mapMemberUid();
-PRBool posix_winsync_config_get_msSFUSchema();
-PRBool posix_winsync_config_get_lowercase();
-PRBool posix_winsync_config_get_createMOFTask();
-Slapi_DN *posix_winsync_config_get_suffix();
-void posix_winsync_config_reset_MOFTaskCreated();
-void posix_winsync_config_set_MOFTaskCreated();
-PRBool posix_winsync_config_get_MOFTaskCreated();
-PRBool posix_winsync_config_get_mapNestedGrouping();
+void posix_winsync_config_free(void);
+POSIX_WinSync_Config *posix_winsync_get_config(void);
+PRBool posix_winsync_config_get_mapMemberUid(void);
+PRBool posix_winsync_config_get_msSFUSchema(void);
+PRBool posix_winsync_config_get_lowercase(void);
+PRBool posix_winsync_config_get_createMOFTask(void);
+Slapi_DN *posix_winsync_config_get_suffix(void);
+void posix_winsync_config_reset_MOFTaskCreated(void);
+void posix_winsync_config_set_MOFTaskCreated(void);
+PRBool posix_winsync_config_get_MOFTaskCreated(void);
+PRBool posix_winsync_config_get_mapNestedGrouping(void);
 
 int posix_group_task_add(Slapi_PBlock *pb, Slapi_Entry *e,
     Slapi_Entry *eAfter, int *returncode, char *returntext,
     void *arg);
 
-PRUint64 get_plugin_started();
-void plugin_op_started();
-void plugin_op_finished();
-void posix_winsync_plugin_op_all_finished();
+PRUint64 get_plugin_started(void);
+void plugin_op_started(void);
+void plugin_op_finished(void);
+void posix_winsync_plugin_op_all_finished(void);
 
 #endif

+ 9 - 9
ldap/servers/plugins/presence/presence.c

@@ -186,7 +186,7 @@ static int presence_vattr_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_typ
  * Local operation functions
  *
  */
-static int loadPluginConfig();
+static int loadPluginConfig(void);
 static int parseConfigEntry(Slapi_Entry *e);
 static int imIDExists(Slapi_Entry *e, char *type, char **value, _Vmap **map, _ConfigEntry **entry);
 static int makeHttpRequest(char *id, _Vmap *map, _ConfigEntry *info, char **buf, int *size);
@@ -194,7 +194,7 @@ static char * replaceIdWithValue(char *str, char *id, char *value);
 static int setIMStatus(char *id, _Vmap *map, _ConfigEntry *info, char *returnedBUF, int size, Slapi_ValueSet **results);
 static int setTypes(PLHashEntry *he, PRIntn i, void *arg);
 
-static void deleteMapTables();
+static void deleteMapTables(void);
 static PRIntn destroyHashEntry(PLHashEntry *he, PRIntn index, void *arg);
 static void logGraphicAttributeValue( Slapi_Attr *attr, const char *attrname );
 static void toLowerCase(char* str);
@@ -202,7 +202,7 @@ static void toLowerCase(char* str);
 /**
  * utility function
  */
-void printMapTable();
+void printMapTable(void);
 PRIntn printIdVattrMapTable(PLHashEntry *he, PRIntn i, void *arg);
 PRIntn printIdConfigMapTable(PLHashEntry *he, PRIntn i, void *arg);
 
@@ -211,7 +211,7 @@ PRIntn printIdConfigMapTable(PLHashEntry *he, PRIntn i, void *arg);
  * Get the presence plug-in version
  *
  */
-int presence_version()
+int presence_version(void)
 {
 	return PRESENCE_PLUGIN_VERSION;
 }
@@ -224,7 +224,7 @@ void setPluginID(void * pluginID)
 	_PluginID=pluginID;
 }
 
-void * getPluginID()
+void * getPluginID(void)
 {
 	return _PluginID;
 }
@@ -234,7 +234,7 @@ void setPluginDN(char *pluginDN)
 	_PluginDN = pluginDN;
 }
 
-char * getPluginDN()
+char * getPluginDN(void)
 {
 	return _PluginDN;
 }
@@ -490,7 +490,7 @@ static int presence_vattr_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_typ
 	return status;
 }
 
-static int loadPluginConfig()
+static int loadPluginConfig(void)
 {
 	int status = PRESENCE_SUCCESS;
 	int result;
@@ -1107,7 +1107,7 @@ logGraphicAttributeValue( Slapi_Attr *attr, const char *attrname )
 }
 
 
-static void deleteMapTables()
+static void deleteMapTables(void)
 {
 	PL_HashTableEnumerateEntries(_IdConfigMapTable, destroyHashEntry, 0);
 	if (_IdConfigMapTable)
@@ -1152,7 +1152,7 @@ static void toLowerCase(char* str)
 /**
  * utility function to print the array
  */
-void printMapTable()
+void printMapTable(void)
 {
 	PL_HashTableEnumerateEntries(_IdVattrMapTable, printIdVattrMapTable, 0);				
 	PL_HashTableEnumerateEntries(_IdConfigMapTable, printIdConfigMapTable, 0);				

+ 1 - 1
ldap/servers/plugins/pwdstorage/pwdstorage.h

@@ -72,7 +72,7 @@ char * sha512_pw_enc( const char *pwd );
 char * salted_sha512_pw_enc( const char *pwd );
 int clear_pw_cmp( const char *userpwd, const char *dbpwd );
 char *clear_pw_enc( const char *pwd );
-void crypt_init();
+void crypt_init(void);
 int crypt_pw_cmp( const char *userpwd, const char *dbpwd );
 char *crypt_pw_enc( const char *pwd );
 int ns_mta_md5_pw_cmp( const char *userpwd, const char *dbpwd );

+ 14 - 14
ldap/servers/plugins/referint/referint.c

@@ -56,17 +56,17 @@ int my_fgetc(PRFileDesc *stream);
 void referint_thread_func(void *arg);
 void writeintegritylog(Slapi_PBlock *pb, char *logfilename, Slapi_DN *sdn, char *newrdn, Slapi_DN *newsuperior, Slapi_DN *requestorsdn);
 int load_config(Slapi_PBlock *pb, Slapi_Entry *config_entry, int apply);
-int referint_get_delay();
-int referint_get_logchanges();
-char *referint_get_logfile();
-char **referint_get_attrs();
+int referint_get_delay(void);
+int referint_get_logchanges(void);
+char *referint_get_logfile(void);
+char **referint_get_attrs(void);
 int referint_postop_modify(Slapi_PBlock *pb);
 int referint_validate_config(Slapi_PBlock *pb);
 static int referint_preop_init(Slapi_PBlock *pb);
 void referint_set_config_area(Slapi_DN *dn);
-Slapi_DN *referint_get_config_area();
+Slapi_DN *referint_get_config_area(void);
 void referint_set_plugin_area(Slapi_DN *sdn);
-Slapi_DN *referint_get_plugin_area();
+Slapi_DN *referint_get_plugin_area(void);
 int referint_sdn_config_cmp(Slapi_DN *sdn);
 void referint_get_config(int *delay, int *logchanges, char **logfile);
 
@@ -91,7 +91,7 @@ static int premodfn = SLAPI_PLUGIN_PRE_MODIFY_FN;
 
 
 static void
-referint_lock()
+referint_lock(void)
 {
     if (use_txn) { /* no lock if betxn is enabled */
         return;
@@ -105,7 +105,7 @@ referint_lock()
 }
 
 static void
-referint_unlock()
+referint_unlock(void)
 {
     if (use_txn) { /* no lock if betxn is enabled */
         return;
@@ -129,7 +129,7 @@ referint_set_config_area(Slapi_DN *dn)
  * which does take the lock.
  */
 Slapi_DN *
-referint_get_config_area()
+referint_get_config_area(void)
 {
     return _ConfigAreaDN;
 }
@@ -143,7 +143,7 @@ referint_set_plugin_area(Slapi_DN *sdn)
 }
 
 Slapi_DN *
-referint_get_plugin_area()
+referint_get_plugin_area(void)
 {
     return _pluginDN;
 }
@@ -488,7 +488,7 @@ bail:
 }
 
 int
-referint_get_delay()
+referint_get_delay(void)
 {
     int delay;
 
@@ -500,7 +500,7 @@ referint_get_delay()
 }
 
 int
-referint_get_logchanges()
+referint_get_logchanges(void)
 {
     int log_changes;
 
@@ -512,7 +512,7 @@ referint_get_logchanges()
 }
 
 char *
-referint_get_logfile()
+referint_get_logfile(void)
 {
     char *log_file;
 
@@ -543,7 +543,7 @@ referint_get_config(int *delay, int *logchanges, char **logfile)
  * might need to find an alternate option instead of copying
  */
 char **
-referint_get_attrs()
+referint_get_attrs(void)
 {
     char **attrs = NULL;
 

+ 2 - 2
ldap/servers/plugins/replication/cl4.h

@@ -44,8 +44,8 @@ char *get_changelog_dataversion(const chglog4Info* cl4);
 void set_changelog_dataversion(chglog4Info* cl4, const char *dataversion);
 
 /* In cl4_config.c */
-int changelog4_config_init();
-void changelog4_config_destroy();
+int changelog4_config_init(void);
+void changelog4_config_destroy(void);
 
 /*
  * backend configuration information

+ 4 - 4
ldap/servers/plugins/replication/cl5.h

@@ -32,13 +32,13 @@ typedef struct changelog5Config
 }changelog5Config;
 
 /* initializes changelog*/
-int changelog5_init();
+int changelog5_init(void);
 /* cleanups changelog data */
-void changelog5_cleanup();
+void changelog5_cleanup(void);
 /* initializes changelog configurationd */
-int changelog5_config_init();
+int changelog5_config_init(void);
 /* cleanups config data */
-void changelog5_config_cleanup();
+void changelog5_config_cleanup(void);
 /* reads changelog configuration */
 int changelog5_read_config (changelog5Config *config); 
 /* cleanups the content of the config structure */

+ 30 - 30
ldap/servers/plugins/replication/cl5_api.c

@@ -246,19 +246,19 @@ static CL5Desc s_cl5Desc;
 static int _cl5Open (const char *dir, const CL5DBConfig *config, CL5OpenMode openMode);
 static int _cl5AppInit (void);
 static int _cl5DBOpen (void);
-static void _cl5SetDefaultDBConfig ();
+static void _cl5SetDefaultDBConfig(void);
 static void _cl5SetDBConfig (const CL5DBConfig *config);
-static int _cl5CheckDBVersion ();
+static int _cl5CheckDBVersion(void);
 static int _cl5ReadDBVersion (const char *dir, char *clVersion, int buflen);
-static int _cl5WriteDBVersion ();
-static void _cl5Close ();
+static int _cl5WriteDBVersion(void);
+static void _cl5Close(void);
 static int  _cl5Delete (const char *dir, PRBool rmDir);
-static void _cl5DBClose ();
+static void _cl5DBClose(void);
 
 /* thread management */
-static int _cl5DispatchDBThreads ();
-static int _cl5AddThread ();
-static void _cl5RemoveThread ();
+static int _cl5DispatchDBThreads(void);
+static int _cl5AddThread(void);
+static void _cl5RemoveThread(void);
 
 /* functions that work with individual changelog files */
 static int _cl5NewDBFile (const char *replName, const char *replGen, CL5DBFile** dbFile);
@@ -314,11 +314,11 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum
 static int _cl5CheckMissingCSN (const CSN *minCsn, const RUV *supplierRUV, CL5DBFile *file);
 
 /* changelog trimming */
-static int _cl5TrimInit ();
-static void _cl5TrimCleanup ();
+static int _cl5TrimInit(void);
+static void _cl5TrimCleanup(void);
 static int _cl5TrimMain (void *param);
-static void _cl5DoTrimming ();
-static void _cl5CompactDBs();
+static void _cl5DoTrimming(void);
+static void _cl5CompactDBs(void);
 static void _cl5PurgeRID(Object *obj,  ReplicaId cleaned_rid);
 static int _cl5PurgeGetFirstEntry (Object *obj, CL5Entry *entry, void **iterator, DB_TXN *txnid, int rid, DBT *key);
 static int _cl5PurgeGetNextEntry (CL5Entry *entry, void *iterator, DBT *key);
@@ -349,8 +349,8 @@ static int _cl5FileEndsWith(const char *filename, const char *ext);
 static PRLock *cl5_diskfull_lock = NULL;
 static int cl5_diskfull_flag = 0;
 
-static void cl5_set_diskfull();
-static void cl5_set_no_diskfull();
+static void cl5_set_diskfull(void);
+static void cl5_set_no_diskfull(void);
 
 /***** Module APIs *****/
 
@@ -361,7 +361,7 @@ static void cl5_set_no_diskfull();
    Return:		CL5_SUCCESS if function is successful;
 				CL5_SYSTEM_ERROR error if NSPR call fails.
  */
-int cl5Init ()
+int cl5Init(void)
 {
 	s_cl5Desc.stLock = slapi_new_rwlock();
 	if (s_cl5Desc.stLock == NULL)
@@ -2369,7 +2369,7 @@ cl5DBData2Entry (const char *data, PRUint32 len, CL5Entry *entry)
 }
 
 /* thread management functions */
-static int _cl5DispatchDBThreads ()
+static int _cl5DispatchDBThreads(void)
 {
 	PRThread *pth = NULL;
 
@@ -2387,7 +2387,7 @@ static int _cl5DispatchDBThreads ()
 	return CL5_SUCCESS;
 }
 
-static int _cl5AddThread ()
+static int _cl5AddThread(void)
 {
 	/* lock the state lock so that nobody can change the state
 	   while backup is in progress 
@@ -2412,7 +2412,7 @@ static int _cl5AddThread ()
 	return CL5_SUCCESS;
 }
 
-static void _cl5RemoveThread ()
+static void _cl5RemoveThread(void)
 {
 	PR_ASSERT (s_cl5Desc.threadCount > 0);
 	PR_AtomicDecrement (&s_cl5Desc.threadCount);
@@ -2991,7 +2991,7 @@ static int _cl5UpgradeMinor(char *fromVersion, char *toVersion)
 	return rc;
 }
 
-static int _cl5CheckDBVersion ()
+static int _cl5CheckDBVersion(void)
 {
 	char clVersion [VERSION_SIZE + 1];
 	char dbVersion [VERSION_SIZE + 1];
@@ -3142,7 +3142,7 @@ static int _cl5ReadDBVersion (const char *dir, char *clVersion, int buflen)
 	return CL5_SUCCESS;		
 }
 
-static int _cl5WriteDBVersion ()
+static int _cl5WriteDBVersion(void)
 {
 	int rc;
 	PRFileDesc *file;
@@ -3190,7 +3190,7 @@ static int _cl5WriteDBVersion ()
 }
 
 /* must be called under the state lock */
-static void _cl5Close ()
+static void _cl5Close(void)
 {
 	PRIntervalTime interval;
 
@@ -3237,7 +3237,7 @@ static void _cl5Close ()
 	}
 }
 
-static void _cl5DBClose ()
+static void _cl5DBClose(void)
 {
 	if (NULL != s_cl5Desc.dbFiles)
 	{
@@ -3365,7 +3365,7 @@ static int  _cl5Delete (const char *clDir, int rmDir)
 	return CL5_SUCCESS;
 }
 
-static void _cl5SetDefaultDBConfig ()
+static void _cl5SetDefaultDBConfig(void)
 {
   s_cl5Desc.dbConfig.maxConcurrentWrites= CL5_DEFAULT_CONFIG_MAX_CONCURRENT_WRITES;
   s_cl5Desc.dbConfig.fileMode           = FILE_CREATE_MODE;
@@ -3380,7 +3380,7 @@ static void _cl5SetDBConfig (const CL5DBConfig *config)
 }
 
 /* Trimming helper functions */
-static int _cl5TrimInit ()
+static int _cl5TrimInit(void)
 {
 	/* just create the lock while we are singlethreaded */
 	s_cl5Desc.dbTrim.lock = PR_NewLock();
@@ -3398,7 +3398,7 @@ static int _cl5TrimInit ()
 	}
 }
 
-static void _cl5TrimCleanup ()
+static void _cl5TrimCleanup(void)
 {
 	if (s_cl5Desc.dbTrim.lock)
 		PR_DestroyLock (s_cl5Desc.dbTrim.lock);
@@ -3421,7 +3421,7 @@ static int _cl5TrimMain (void *param)
 		{
 			/* time to trim */
 			timePrev = timeNow; 
-			_cl5DoTrimming (0 /* there's no cleaned rid */);
+                     _cl5DoTrimming();
 		}
 		if ((s_cl5Desc.dbTrim.compactInterval > 0) &&
 		    (timeNow - timeCompactPrev >= s_cl5Desc.dbTrim.compactInterval))
@@ -3461,7 +3461,7 @@ static int _cl5TrimMain (void *param)
  *   change sent to the consumer in the changelog and will fail because the
  *   change was removed.
  */
-static void _cl5DoTrimming ()
+static void _cl5DoTrimming(void)
 {
 	Object *obj;
 	long numToTrim;
@@ -3528,7 +3528,7 @@ static void _cl5DoPurging (Replica *replica)
 
 /* clear free page files to reduce changelog */
 static void
-_cl5CompactDBs()
+_cl5CompactDBs(void)
 {
 #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 4400
 	int rc;
@@ -6674,7 +6674,7 @@ cl5_is_diskfull()
 }
 
 static void
-cl5_set_diskfull()
+cl5_set_diskfull(void)
 {
 	PR_Lock(cl5_diskfull_lock);
     cl5_diskfull_flag = 1;
@@ -6682,7 +6682,7 @@ cl5_set_diskfull()
 }
 
 static void
-cl5_set_no_diskfull()
+cl5_set_no_diskfull(void)
 {
 	PR_Lock(cl5_diskfull_lock);
     cl5_diskfull_flag = 0;

+ 9 - 9
ldap/servers/plugins/replication/cl5_api.h

@@ -136,7 +136,7 @@ enum
 				CL5_BAD_DATA if invalid directory is passed;
 				CL5_SYSTEM error if NSPR call fails.
  */
-int cl5Init ();
+int cl5Init(void);
 
 /* Name:		cl5Cleanup
    Description:	performs cleanup of the changelog module. Must be called by a single
@@ -144,7 +144,7 @@ int cl5Init ();
    Parameters:  none
    Return:      none
  */
-void cl5Cleanup ();
+void cl5Cleanup(void);
 
 /* Name:		cl5Open 
    Description:	opens changelog ; must be called after changelog is
@@ -170,7 +170,7 @@ int cl5Open (const char *dir, const CL5DBConfig *config);
 				CL5_BAD_STATE if db is not in the open state;
 				CL5_SYSTEM_ERROR if NSPR call fails
  */
-int cl5Close ();
+int cl5Close(void);
 
 /* Name:		cl5Delete
    Description:	removes changelog
@@ -238,7 +238,7 @@ int cl5ImportLDIF (const char *clDir, const char *ldifFile, Object **replicas);
    Return:		changelog state
  */
 
-int cl5GetState ();
+int cl5GetState(void);
 
 /* Name:		cl5ConfigTrimming
    Description:	sets changelog trimming parameters
@@ -398,7 +398,7 @@ void cl5DeleteOnClose (PRBool rm);
    Return:		copy of the directory; caller needs to free the string
  */
  
-char *cl5GetDir ();
+char *cl5GetDir(void);
 
 /* Name: cl5Exist
    Description: checks if a changelog exists in the specified directory
@@ -440,8 +440,8 @@ PRBool cl5HelperEntry (const char *csnstr, CSN *csn);
 CSN** cl5BuildCSNList (const RUV *consRuv, const RUV *supRuv);
 void cl5DestroyCSNList (CSN*** csns);
 
-int cl5_is_diskfull();
-int cl5_diskspace_is_available();
+int cl5_is_diskfull(void);
+int cl5_diskspace_is_available(void);
 
 /* Name: cl5DbDirIsEmpty
    Description: See if the given cldb directory is empty or doesn't yet exist.
@@ -457,14 +457,14 @@ int cl5DbDirIsEmpty(const char *dir);
    Parameters:	none
    Return:		TRUE
 */
-int cl5WriteRUV();
+int cl5WriteRUV(void);
 
 /* Name: cl5DeleteRUV
    Description: Read and delete RUVs from changelog db's.  Called after backup.
    Parameters:	none
    Return:		TRUE
 */
-int cl5DeleteRUV();
+int cl5DeleteRUV(void);
 void cl5CleanRUV(ReplicaId rid);
 void cl5NotifyCleanup(int rid);
 void trigger_cl_purging(Replica *replica);

+ 4 - 4
ldap/servers/plugins/replication/cl5_clcache.c

@@ -144,11 +144,11 @@ static int	clcache_skip_change ( CLC_Buffer *buf );
 static int	clcache_load_buffer_bulk ( CLC_Buffer *buf, int flag );
 static int	clcache_open_cursor ( DB_TXN *txn, CLC_Buffer *buf, DBC **cursor );
 static int	clcache_cursor_get ( DBC *cursor, CLC_Buffer *buf, int flag );
-static struct csn_seq_ctrl_block *clcache_new_cscb ();
+static struct csn_seq_ctrl_block *clcache_new_cscb(void);
 static void	clcache_free_cscb ( struct csn_seq_ctrl_block ** cscb );
 static CLC_Buffer	*clcache_new_buffer ( ReplicaId consumer_rid );
 static void	clcache_delete_buffer ( CLC_Buffer **buf );
-static CLC_Busy_List *clcache_new_busy_list ();
+static CLC_Busy_List *clcache_new_busy_list(void);
 static void	clcache_delete_busy_list ( CLC_Busy_List **bl );
 static int	clcache_enqueue_busy_list( DB *db, CLC_Buffer *buf );
 static void csn_dup_or_init_by_csn ( CSN **csn1, CSN *csn2 );
@@ -886,7 +886,7 @@ clcache_skip_change ( CLC_Buffer *buf )
 }
 
 static struct csn_seq_ctrl_block *
-clcache_new_cscb ()
+clcache_new_cscb(void)
 {
 	struct csn_seq_ctrl_block *cscb;
 
@@ -978,7 +978,7 @@ clcache_delete_buffer ( CLC_Buffer **buf )
 }
 
 static CLC_Busy_List *
-clcache_new_busy_list ()
+clcache_new_busy_list(void)
 {
 	CLC_Busy_List *bl;
 	int welldone = 0;

+ 2 - 2
ldap/servers/plugins/replication/cl5_clcache.h

@@ -21,11 +21,11 @@
 typedef struct clc_buffer CLC_Buffer;
 
 int	 clcache_init ( DB_ENV **dbenv );
-void clcache_set_config ();
+void clcache_set_config(void);
 int	 clcache_get_buffer ( CLC_Buffer **buf, DB *db, ReplicaId consumer_rid, const RUV *consumer_ruv, const RUV *local_ruv );
 int	 clcache_load_buffer ( CLC_Buffer *buf, CSN **anchorCSN );
 void clcache_return_buffer ( CLC_Buffer **buf );
 int	 clcache_get_next_change ( CLC_Buffer *buf, void **key, size_t *keylen, void **data, size_t *datalen, CSN **csn );
-void clcache_destroy ();
+void clcache_destroy(void);
 
 #endif

+ 1 - 1
ldap/servers/plugins/replication/csnpl.h

@@ -20,7 +20,7 @@
 
 typedef struct csnpl CSNPL;
 
-CSNPL* csnplNew ();
+CSNPL* csnplNew(void);
 void csnplFree (CSNPL **csnpl);
 int csnplInsert (CSNPL *csnpl, const CSN *csn);
 int csnplRemove (CSNPL *csnpl, const CSN *csn);

+ 2 - 2
ldap/servers/plugins/replication/legacy_consumer.c

@@ -49,7 +49,7 @@ static int legacy_consumer_config_modify (Slapi_PBlock *pb, Slapi_Entry* e, Slap
 static int legacy_consumer_config_delete (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* entryAfter, int *returncode, char *returntext, void *arg);
 
 static int legacy_consumer_extract_config(Slapi_Entry* entry, char *returntext);
-static int legacy_consumer_read_config ();
+static int legacy_consumer_read_config(void);
 static void legacy_consumer_encode_pw (Slapi_Entry *e);
 static void set_legacy_purl (Slapi_PBlock *pb, const char *purl);
 static int get_legacy_referral (Slapi_Entry *e, char **referral, char **state);
@@ -428,7 +428,7 @@ legacy_consumer_extract_config(Slapi_Entry* entry, char *returntext)
 
 
 static int 
-legacy_consumer_read_config ()
+legacy_consumer_read_config(void)
 {
     int rc = LDAP_SUCCESS;
     int scope= LDAP_SCOPE_BASE;

+ 1 - 1
ldap/servers/plugins/replication/llist.h

@@ -17,7 +17,7 @@
 #define LLIST_H
 typedef struct llist LList;
 
-LList* llistNew ();
+LList* llistNew(void);
 void   llistDestroy (LList **list, FNFree fnFree);
 void*  llistGetFirst(LList *list, void **iterator);
 void*  llistGetNext (LList *list, void **iterator);

+ 20 - 12
ldap/servers/plugins/replication/repl.h

@@ -164,7 +164,7 @@ typedef struct repl {
 /* Functions */
 
 /* repl_rootdse.c */
-int repl_rootdse_init();
+int repl_rootdse_init(void);
 
 /* In repl.c */
 Slapi_Entry *get_changerecord(const chglog4Info *cl4, changeNumber cnum, int *err);
@@ -173,7 +173,7 @@ changeNumber replog_get_lastchangenum(const chglog4Info *cl4, int *err);
 void changelog_housekeeping(time_t cur_time );
 
 /* In repl_config.c */
-int repl_config_init ();
+int repl_config_init(void);
 
 /* Legacy Plugin Functions */
 
@@ -233,11 +233,19 @@ extern char	*filter_objectclass;
 extern char	*type_cn;
 extern char	*type_objectclass;
 
-/* JCMREPL - IFP should be defined centrally */
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#endif
 
+/* JCMREPL - IFP should be defined centrally */
 #ifndef _IFP
 #define _IFP
-typedef int	(*IFP)();
+typedef int (*IFP)(); /* takes undefined arguments */
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic pop
 #endif
 
 /* In cl4.c */
@@ -268,8 +276,8 @@ void ldapi_initialize_changenumbers(chglog4Info *cl4, changeNumber first, change
 /* #define REPL_PROTOCOL_71_TOTALUPDATE 4 */
 
 /* In repl_globals.c */
-int decrement_repl_active_threads();
-int increment_repl_active_threads();
+int decrement_repl_active_threads(void);
+int increment_repl_active_threads(void);
 
 /* operation extensions */
 
@@ -285,8 +293,8 @@ typedef enum
 } ext_type;
 
 /* general extension functions - repl_ext.c */
-void repl_sup_init_ext ();	/* initializes registrations - must be called first */
-void repl_con_init_ext ();	/* initializes registrations - must be called first */
+void repl_sup_init_ext(void);       /* initializes registrations - must be called first */
+void repl_con_init_ext(void);       /* initializes registrations - must be called first */
 int repl_sup_register_ext (ext_type type); /* registers an extension of the specified type */
 int repl_con_register_ext (ext_type type); /* registers an extension of the specified type */
 void* repl_sup_get_ext (ext_type type, void *object); /* retireves the extension from the object */
@@ -352,7 +360,7 @@ void  multimaster_mtnode_extension_destructor (void* ext,void *object,void *pare
 
 /* In repl_init.c */
 
-int get_legacy_stop();
+int get_legacy_stop(void);
 
 /* In repl_entry.c */
 void repl_entry_init(int argc, char** argv);
@@ -370,8 +378,8 @@ int legacy_postop( Slapi_PBlock *pb, const char* caller, int operation_type);
 #endif
 
 void profile_log(char *file,int line);
-void profile_open();
-void profile_close();
+void profile_open(void);
+void profile_close(void);
 
 /* in repl_controls.c */
 void add_repl_control_mods( Slapi_PBlock *pb, Slapi_Mods *smods );
@@ -388,7 +396,7 @@ int modrdn2reple( Slapi_Entry *e, char *newrdn, int deloldrdn, LDAPMod **ldm );
 void process_legacy_cf(Slapi_PBlock *pb);
 int legacy_consumer_is_replicationdn(const char *dn);
 int legacy_consumer_is_replicationpw(struct berval *creds);
-int legacy_consumer_config_init();
+int legacy_consumer_config_init(void);
 
 /* function that gets called when a backend state is changed */
 void legacy_consumer_be_state_change (void *handle, char *be_name,

+ 21 - 21
ldap/servers/plugins/replication/repl5.h

@@ -229,9 +229,9 @@ int multimaster_be_betxnpostop_modify (Slapi_PBlock *pb);
 
 /* In repl5_init.c */
 extern int repl5_is_betxn;
-char* get_thread_private_agmtname ();
+char* get_thread_private_agmtname(void);
 void  set_thread_private_agmtname (const char *agmtname);
-void* get_thread_private_cache ();
+void* get_thread_private_cache(void);
 void  set_thread_private_cache (void *buf);
 char* get_repl_session_id (Slapi_PBlock *pb, char *id, CSN **opcsn);
 
@@ -274,9 +274,9 @@ void replsupplier_notify(Repl_Supplier *rs, PRUint32 eventmask);
 PRUint32 replsupplier_get_status(Repl_Supplier *rs);
 
 /* In repl5_plugins.c */
-int multimaster_set_local_purl();
-const char *multimaster_get_local_purl();
-PRBool multimaster_started();
+int multimaster_set_local_purl(void);
+const char *multimaster_get_local_purl(void);
+PRBool multimaster_started(void);
 
 /* In repl5_schedule.c */
 typedef struct schedule Schedule;
@@ -395,8 +395,8 @@ int agmt_maxcsn_to_smod (Replica *r, Slapi_Mod *smod);
 int agmt_set_WaitForAsyncResults(Repl_Agmt *ra, const Slapi_Entry *e);
 
 /* In repl5_agmtlist.c */
-int agmtlist_config_init();
-void agmtlist_shutdown();
+int agmtlist_config_init(void);
+void agmtlist_shutdown(void);
 void agmtlist_notify_all(Slapi_PBlock *pb);
 Object* agmtlist_get_first_agreement_for_replica (Replica *r);
 Object* agmtlist_get_next_agreement_for_replica (Replica *r, Object *prev);
@@ -571,8 +571,8 @@ Object *replica_get_replica_from_dn (const Slapi_DN *dn);
 int replica_update_ruv(Replica *replica, const CSN *csn, const char *replica_purl);
 Object *replica_get_replica_for_op (Slapi_PBlock *pb);
 /* the functions below manipulate replica hash */
-int replica_init_name_hash ();
-void replica_destroy_name_hash ();
+int replica_init_name_hash(void);
+void replica_destroy_name_hash(void);
 int replica_add_by_name (const char *name, Object *replica);
 int replica_delete_by_name (const char *name);
 Object* replica_get_by_name (const char *name);
@@ -588,8 +588,8 @@ void replica_enumerate_replicas (FNEnumReplica fn, void *arg);
 int replica_reload_ruv (Replica *r);
 int replica_check_for_data_reload (Replica *r, void *arg);
 /* the functions below manipulate replica dn hash */
-int replica_init_dn_hash ();
-void replica_destroy_dn_hash ();
+int replica_init_dn_hash(void);
+void replica_destroy_dn_hash(void);
 int replica_add_by_dn (const char *dn);
 int replica_delete_by_dn (const char *dn);
 int replica_is_being_configured (const char *dn);
@@ -652,15 +652,15 @@ CSN* replica_generate_next_csn ( Slapi_PBlock *pb, const CSN *basecsn );
 int replica_get_attr ( Slapi_PBlock *pb, const char *type, void *value );
 
 /* mapping tree extensions manipulation */
-void multimaster_mtnode_extension_init ();
-void multimaster_mtnode_extension_destroy ();
-void multimaster_mtnode_construct_replicas ();
+void multimaster_mtnode_extension_init(void);
+void multimaster_mtnode_extension_destroy(void);
+void multimaster_mtnode_construct_replicas(void);
 
 void multimaster_be_state_change (void *handle, char *be_name, int old_be_state, int new_be_state);
 
 /* In repl5_replica_config.c */
-int replica_config_init();
-void replica_config_destroy ();
+int replica_config_init(void);
+void replica_config_destroy(void);
 int get_replica_type(Replica *r);
 int replica_execute_cleanruv_task_ext(Object *r, ReplicaId rid);
 void add_cleaned_rid(ReplicaId rid, Replica *r, char *maxcsn, char *forcing);
@@ -668,8 +668,8 @@ int is_cleaned_rid(ReplicaId rid);
 int replica_cleanall_ruv_abort(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
                                int *returncode, char *returntext, void *arg);
 void replica_cleanallruv_thread_ext(void *arg);
-void stop_ruv_cleaning();
-int task_aborted();
+void stop_ruv_cleaning(void);
+int task_aborted(void);
 void replica_abort_task_thread(void *arg);
 void remove_cleaned_rid(ReplicaId rid);
 int process_repl_agmts(Replica *replica, int *agmt_info, char *oid, Slapi_Task *task, struct berval *payload, int op);
@@ -701,7 +701,7 @@ typedef struct _cleanruv_data
 } cleanruv_data;
 
 /* replutil.c */
-LDAPControl* create_managedsait_control ();
+LDAPControl* create_managedsait_control(void);
 LDAPControl* create_backend_control(Slapi_DN *sdn);
 void repl_set_mtn_state_and_referrals(const Slapi_DN *sdn, const char *mtn_state,
 									  const RUV *ruv, char **ruv_referrals,
@@ -739,7 +739,7 @@ ReplicaId agmt_get_consumerRID(Repl_Agmt *ra);
 /* For replica release tuning */
 int agmt_get_WaitForAsyncResults(Repl_Agmt *ra);
 
-PRBool ldif_dump_is_running();
+PRBool ldif_dump_is_running(void);
 
 void windows_init_agreement_from_entry(Repl_Agmt *ra, Slapi_Entry *e);
 int windows_handle_modify_agreement(Repl_Agmt *ra, const char *type, Slapi_Entry *e);
@@ -749,7 +749,7 @@ void windows_conn_delete(Repl_Connection *conn);
 void windows_update_done(Repl_Agmt *ra, int is_total);
 
 /* repl_session_plugin.c */
-void repl_session_plugin_init();
+void repl_session_plugin_init(void);
 void repl_session_plugin_call_agmt_init_cb(Repl_Agmt *ra);
 int repl_session_plugin_call_pre_acquire_cb(const Repl_Agmt *ra, int is_total,
         char **data_guid, struct berval **data);

+ 1 - 1
ldap/servers/plugins/replication/repl5_inc_protocol.c

@@ -203,7 +203,7 @@ repl5_inc_op_free(repl5_inc_operation *op)
 	slapi_ch_free((void**)&op);
 }
 
-static repl5_inc_operation *repl5_inc_operation_new()
+static repl5_inc_operation *repl5_inc_operation_new(void)
 {
 	repl5_inc_operation *ret = NULL;
 	ret = (repl5_inc_operation *) slapi_ch_calloc(1,sizeof(repl5_inc_operation));

+ 1 - 1
ldap/servers/plugins/replication/repl5_init.c

@@ -610,7 +610,7 @@ check_for_ldif_dump(Slapi_PBlock *pb)
  * returns 0 if success
  */
 static int
-create_repl_schema_policy()
+create_repl_schema_policy(void)
 {
 	/* DN part of this entry_string: no need to be optimized. */
         char entry_string[1024];

+ 4 - 4
ldap/servers/plugins/replication/repl5_prot_private.h

@@ -48,12 +48,12 @@ typedef struct private_repl_protocol
 	int repl90consumer; /* Flag to tell us if this is a 9.0-style consumer we're talking to */
 } Private_Repl_Protocol;
 
-extern Private_Repl_Protocol *Repl_5_Inc_Protocol_new();
-extern Private_Repl_Protocol *Repl_5_Tot_Protocol_new();
+extern Private_Repl_Protocol *Repl_5_Inc_Protocol_new(Repl_Protocol *rp);
+extern Private_Repl_Protocol *Repl_5_Tot_Protocol_new(Repl_Protocol *rp);
 extern int repl5_tot_last_rcv_msgid(Repl_Connection *conn);
 extern int repl5_tot_flowcontrol_detection(Repl_Connection *conn, int increment);
-extern Private_Repl_Protocol *Windows_Inc_Protocol_new();
-extern Private_Repl_Protocol *Windows_Tot_Protocol_new();
+extern Private_Repl_Protocol *Windows_Inc_Protocol_new(Repl_Protocol *rp);
+extern Private_Repl_Protocol *Windows_Tot_Protocol_new(Repl_Protocol *rp);
 
 #define PROTOCOL_TERMINATION_NORMAL 301
 #define PROTOCOL_TERMINATION_ABNORMAL 302

+ 4 - 4
ldap/servers/plugins/replication/repl5_replica_config.c

@@ -68,8 +68,8 @@ static int replica_cleanallruv_send_abort_extop(Repl_Agmt *ra, Slapi_Task *task,
 static int replica_cleanallruv_check_maxcsn(Repl_Agmt *agmt, char *basedn, char *rid_text, char *maxcsn, Slapi_Task *task);
 static int replica_cleanallruv_replica_alive(Repl_Agmt *agmt);
 static int replica_cleanallruv_check_ruv(char *repl_root, Repl_Agmt *ra, char *rid_text, Slapi_Task *task, char *force);
-static int get_cleanruv_task_count();
-static int get_abort_cleanruv_task_count();
+static int get_cleanruv_task_count(void);
+static int get_abort_cleanruv_task_count(void);
 static int replica_cleanup_task (Object *r, const char *task_name, char *returntext, int apply_mods);
 static int replica_task_done(Replica *replica);
 static void delete_cleaned_rid_config(cleanruv_data *data);
@@ -3540,7 +3540,7 @@ replica_cleanallruv_check_ruv(char *repl_root, Repl_Agmt *agmt, char *rid_text,
 }
 
 static int
-get_cleanruv_task_count()
+get_cleanruv_task_count(void)
 {
    int i, count = 0;
 
@@ -3556,7 +3556,7 @@ get_cleanruv_task_count()
 }
 
 static int
-get_abort_cleanruv_task_count()
+get_abort_cleanruv_task_count(void)
 {
    int i, count = 0;
 

+ 1 - 1
ldap/servers/plugins/replication/repl_init.c

@@ -168,7 +168,7 @@ legacy_entry_init( Slapi_PBlock *pb )
  * Create the entry at the top of the replication configuration subtree.
  */
 static int
-create_config_top()
+create_config_top(void)
 {
 	/* DN part of this entry_string: no need to be optimized. */
 	char *entry_string = slapi_ch_strdup("dn: cn=replication,cn=config\nobjectclass: top\nobjectclass: extensibleobject\ncn: replication\n");

+ 2 - 2
ldap/servers/plugins/replication/repl_shared.h

@@ -93,10 +93,10 @@ extern char *windows_repl_plugin_name;
 extern char *repl_plugin_name_cl;
 
 /* repl_monitor.c */
-int repl_monitor_init();
+int repl_monitor_init(void);
 
 /* In replutil.c */
-char ** get_cleattrs();
+char ** get_cleattrs(void);
 unsigned long strntoul( char *from, size_t len, int base );
 void freepmods( LDAPMod **pmods );
 char *copy_berval (struct berval* from);

+ 1 - 1
ldap/servers/plugins/replication/replutil.c

@@ -893,7 +893,7 @@ repl_chain_on_update(Slapi_PBlock *pb, Slapi_DN * target_dn,
     /* if using global password policy, chain the bind request so that the 
        master can update and replicate the password policy op attrs */
 	if (op_type == SLAPI_OPERATION_BIND) {
-        extern int config_get_pw_is_global_policy();
+        extern int config_get_pw_is_global_policy(void);
         if (!config_get_pw_is_global_policy()) {
 #ifdef DEBUG_CHAIN_ON_UPDATE
             if (is_internal) {

+ 1 - 1
ldap/servers/plugins/replication/windowsrepl.h

@@ -19,7 +19,7 @@ typedef struct subtreepair {
 	Slapi_DN *DSsubtree;
 } subtreePair;
 
-Dirsync_Private* windows_private_new();
+Dirsync_Private* windows_private_new(void);
 void windows_private_set_windows_subtree (const Repl_Agmt *ra,Slapi_DN* sdn );
 const Slapi_DN* windows_private_get_windows_subtree (const Repl_Agmt *ra);
 void windows_private_set_directory_subtree (const Repl_Agmt *ra,Slapi_DN* sdn );

+ 1 - 1
ldap/servers/plugins/rever/rever.h

@@ -32,7 +32,7 @@ int rever_cmp( char *userpwd, char *dbpwd );
 char *rever_enc( char *pwd );
 char *rever_dec( char *pwd );
 int rever_init( Slapi_PBlock *pb );
-void init_pbe_plugin();
+void init_pbe_plugin(void);
 
 int encode(char *inPlain, char **outCipher, int mech);
 int decode(char *inCipher, char **outPlain, int mech, char *algid);

+ 6 - 6
ldap/servers/plugins/roles/roles_cache.c

@@ -158,7 +158,7 @@ static void berval_set_string(struct berval *bv, const char* string);
 static void roles_cache_role_def_delete(roles_cache_def *role_def);
 static void roles_cache_role_def_free(roles_cache_def *role_def);
 static void roles_cache_role_object_free(role_object *this_role);
-static void roles_cache_role_object_nested_free(role_object_nested *this_role);
+static int roles_cache_role_object_nested_free(role_object_nested *this_role);
 static int roles_cache_dump( caddr_t data, caddr_t arg );
 static int roles_cache_add_entry_cb(Slapi_Entry* e, void *callback_data);
 static void roles_cache_result_cb( int rc, void *callback_data);
@@ -601,10 +601,8 @@ static int roles_cache_update(roles_cache_def *suffix_to_update)
 		if ( (operation == SLAPI_OPERATION_MODIFY) ||
 			 (operation == SLAPI_OPERATION_DELETE) )
 		{
-			/* delete it */
-			int dummy;
 
-			to_delete = (role_object *)avl_delete(&(suffix_to_update->avl_tree), dn, roles_cache_find_node, &dummy);
+                     to_delete = (role_object *)avl_delete(&(suffix_to_update->avl_tree), dn, roles_cache_find_node);
 			roles_cache_role_object_free(to_delete);
 			to_delete = NULL;
 			if ( slapi_is_loglevel_set(SLAPI_LOG_PLUGIN) ) 
@@ -2162,14 +2160,14 @@ static void roles_cache_role_object_free(role_object *this_role)
 /* roles_cache_role_object_nested_free
    ------------------------------------
 */
-static void roles_cache_role_object_nested_free(role_object_nested *this_role)
+static int roles_cache_role_object_nested_free(role_object_nested *this_role)
 {
 	slapi_log_error(SLAPI_LOG_PLUGIN, 
 					ROLES_PLUGIN_SUBSYSTEM, "--> roles_cache_role_object_nested_free\n");
 
 	if ( this_role == NULL )
 	{
-		return;
+              return 0;
 	}
 
 	slapi_sdn_free(&this_role->dn);
@@ -2179,6 +2177,8 @@ static void roles_cache_role_object_nested_free(role_object_nested *this_role)
 
 	slapi_log_error(SLAPI_LOG_PLUGIN, 
 					ROLES_PLUGIN_SUBSYSTEM, "<-- roles_cache_role_object_nested_free\n");
+
+       return 0;
 }
 
 static int roles_cache_dump( caddr_t data, caddr_t arg )

+ 3 - 3
ldap/servers/plugins/roles/roles_cache.h

@@ -42,8 +42,8 @@
 #define SLAPI_ROLE_DEFINITION_ALREADY_EXIST -5
 
 /* From roles_cache.c */
-int roles_cache_init();
-void roles_cache_stop();
+int roles_cache_init(void);
+void roles_cache_stop(void);
 void roles_cache_change_notify(Slapi_PBlock *pb);
 int roles_cache_listroles(Slapi_Entry *entry, int return_value, Slapi_ValueSet **valueset_out);
 int roles_cache_listroles_ext(vattr_context *c, Slapi_Entry *entry, int return_value, Slapi_ValueSet **valueset_out);
@@ -58,6 +58,6 @@ int roles_sp_compare_value(vattr_sp_handle *handle, vattr_context *c, Slapi_Entr
 
 int roles_sp_list_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_type_list_context *type_context,int flags);
 
-void * roles_get_plugin_identity();
+void * roles_get_plugin_identity(void);
 
 #endif /* _ROLES_CACHE_H */

+ 1 - 1
ldap/servers/plugins/roles/roles_plugin.c

@@ -314,7 +314,7 @@ int roles_sp_list_types(vattr_sp_handle *handle,Slapi_Entry *e,vattr_type_list_c
 }
 
 /* What do we do on shutdown ? */
-int roles_sp_cleanup()
+int roles_sp_cleanup(void)
 {
 	return 0;
 }

+ 3 - 3
ldap/servers/plugins/rootdn_access/rootdn_access.c

@@ -86,7 +86,7 @@ rootdn_set_plugin_id(void *pluginID)
 }
 
 void *
-rootdn_get_plugin_id()
+rootdn_get_plugin_id(void)
 {
     return _PluginID;
 }
@@ -98,7 +98,7 @@ rootdn_set_plugin_dn(char *pluginDN)
 }
 
 char *
-rootdn_get_plugin_dn()
+rootdn_get_plugin_dn(void)
 {
     return _PluginDN;
 }
@@ -182,7 +182,7 @@ rootdn_start(Slapi_PBlock *pb)
 }
 
 static void
-rootdn_free()
+rootdn_free(void)
 {
     slapi_ch_free_string(&daysAllowed);
     daysAllowed = NULL;

+ 2 - 2
ldap/servers/plugins/sync/sync.h

@@ -101,13 +101,13 @@ void sync_send_modified_entries (Slapi_PBlock *pb, Sync_UpdateNode *upd, int chg
 int sync_persist_initialize (int argc, char **argv);
 PRThread *sync_persist_add (Slapi_PBlock *pb);
 int sync_persist_startup (PRThread *tid, Sync_Cookie *session_cookie);
-int sync_persist_terminate_all ();
+int sync_persist_terminate_all(void);
 int sync_persist_terminate (PRThread *tid);
 
 Slapi_PBlock *sync_pblock_copy(Slapi_PBlock *src);
 
 /* prototype for functions not in slapi-plugin.h */
-Slapi_ComponentId *plugin_get_default_component_id();
+Slapi_ComponentId *plugin_get_default_component_id(void);
 
 
 /*

+ 4 - 4
ldap/servers/plugins/sync/sync_persist.c

@@ -28,10 +28,10 @@ static int plugin_closing = 0;
 static PRUint64 thread_count = 0;
 static int sync_add_request( SyncRequest *req );
 static void sync_remove_request( SyncRequest *req );
-static SyncRequest *sync_request_alloc();
+static SyncRequest *sync_request_alloc(void);
 void sync_queue_change( Slapi_Entry *e, Slapi_Entry *eprev, ber_int_t chgtype );
 static void sync_send_results( void *arg );
-static void sync_request_wakeup_all();
+static void sync_request_wakeup_all(void);
 static void sync_node_free( SyncQueueNode **node );
 
 static int sync_acquire_connection (Slapi_Connection *conn);
@@ -383,7 +383,7 @@ sync_persist_terminate_all ()
  * Allocate and initialize an empty Sync node.
  */
 static SyncRequest *
-sync_request_alloc()
+sync_request_alloc(void)
 {
 	SyncRequest *req;
 
@@ -466,7 +466,7 @@ sync_remove_request( SyncRequest *req )
 }
 
 static void
-sync_request_wakeup_all()
+sync_request_wakeup_all(void)
 {
 	if ( SYNC_IS_INITIALIZED()) {
 		PR_Lock( sync_request_list->sync_req_cvarlock );

+ 1 - 1
ldap/servers/plugins/syntaxes/bin.c

@@ -173,7 +173,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
 }
 
 static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
 {
 	return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
 }

+ 1 - 1
ldap/servers/plugins/syntaxes/bitstring.c

@@ -94,7 +94,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
 }
 
 static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
 {
 	return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
 }

+ 1 - 1
ldap/servers/plugins/syntaxes/ces.c

@@ -292,7 +292,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
 }
 
 static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
 {
 	return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
 }

+ 1 - 1
ldap/servers/plugins/syntaxes/cis.c

@@ -673,7 +673,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
 }
 
 static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
 {
 	return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
 }

+ 1 - 1
ldap/servers/plugins/syntaxes/dn.c

@@ -100,7 +100,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
 }
 
 static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
 {
 	return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
 }

+ 1 - 1
ldap/servers/plugins/syntaxes/int.c

@@ -152,7 +152,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
 }
 
 static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
 {
 	return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
 }

+ 1 - 1
ldap/servers/plugins/syntaxes/nameoptuid.c

@@ -99,7 +99,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
 }
 
 static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
 {
 	return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
 }

+ 1 - 1
ldap/servers/plugins/syntaxes/numericstring.c

@@ -157,7 +157,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
 }
 
 static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
 {
 	return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
 }

+ 1 - 1
ldap/servers/plugins/syntaxes/tel.c

@@ -141,7 +141,7 @@ matching_rule_plugin_init(Slapi_PBlock *pb)
 }
 
 static int
-register_matching_rule_plugins()
+register_matching_rule_plugins(void)
 {
 	return syntax_register_matching_rule_plugins(mr_plugin_table, mr_plugin_table_size, matching_rule_plugin_init);
 }

+ 2 - 2
ldap/servers/plugins/syntaxes/validate_task.c

@@ -48,7 +48,7 @@ static int syntax_validate_task_callback(Slapi_Entry *e, void *callback_data);
 static const char *fetch_attr(Slapi_Entry *e, const char *attrname,
                               const char *default_val);
 static void syntax_validate_set_plugin_id(void * plugin_id);
-static void *syntax_validate_get_plugin_id();
+static void *syntax_validate_get_plugin_id(void);
 
 
 /*
@@ -286,7 +286,7 @@ syntax_validate_set_plugin_id(void * plugin_id)
 }
 
 static void *
-syntax_validate_get_plugin_id()
+syntax_validate_get_plugin_id(void)
 {
         return _PluginID;
 }

+ 1 - 1
ldap/servers/plugins/usn/usn.c

@@ -631,7 +631,7 @@ usn_set_identity(void *identity)
 }
 
 void *
-usn_get_identity()
+usn_get_identity(void)
 {
     return _usn_identity;
 }

+ 2 - 2
ldap/servers/plugins/usn/usn.h

@@ -21,9 +21,9 @@
 
 /* usn.c */
 void usn_set_identity(void *identity);
-void *usn_get_identity();
+void *usn_get_identity(void);
 
 /* usn_cleanup.c */
 int usn_cleanup_start(Slapi_PBlock *pb);
-int usn_cleanup_close();
+int usn_cleanup_close(void);
 

+ 1 - 1
ldap/servers/plugins/usn/usn_cleanup.c

@@ -32,7 +32,7 @@ usn_cleanup_start(Slapi_PBlock *pb)
 }
 
 int
-usn_cleanup_close()
+usn_cleanup_close(void)
 {
     int rc = slapi_plugin_task_unregister_handler("USN tombstone cleanup task",
                                          usn_cleanup_add);

+ 10 - 10
ldap/servers/plugins/views/views.c

@@ -91,10 +91,10 @@ static Slapi_Counter *op_counter = NULL;
 int views_init( Slapi_PBlock *pb ); 
 static int views_start( Slapi_PBlock *pb );
 static int views_close( Slapi_PBlock *pb );
-static int views_cache_create();
+static int views_cache_create(void);
 static void views_update_views_cache( Slapi_Entry *e, char *dn, int modtype, Slapi_PBlock *pb, void *caller_data );
 static int views_cache_build_view_list(viewEntry **pViews);
-static int views_cache_index();
+static int views_cache_index(void);
 static int 	views_dn_views_cb (Slapi_Entry* e, void *callback_data);
 static int views_cache_add_dn_views(char *dn, viewEntry **pViews);
 static void views_cache_add_ll_entry(void** attrval, void *theVal);
@@ -110,7 +110,7 @@ static int view_search_rewrite_callback(Slapi_PBlock *pb);
 static void views_cache_backend_state_change(void *handle, char *be_name, int old_be_state, int new_be_state); 
 static void views_cache_act_on_change_thread(void *arg);
 static viewEntry *views_cache_find_view(char *view);
-static void views_cache_free();
+static void views_cache_free(void);
 
 /* our api broker published api */
 static void *api[3];
@@ -136,7 +136,7 @@ void view_set_plugin_identity(void * identity)
 	view_plugin_identity=identity;
 }
 
-void * view_get_plugin_identity()
+void * view_get_plugin_identity(void)
 {
 	return view_plugin_identity;
 }
@@ -179,17 +179,17 @@ int views_init( Slapi_PBlock *pb )
     return ret;
 }
 
-void views_read_lock()
+void views_read_lock(void)
 {
 	slapi_rwlock_rdlock(g_views_cache_lock);
 }
 
-void views_write_lock()
+void views_write_lock(void)
 {
 	slapi_rwlock_wrlock(g_views_cache_lock);
 }
 
-void views_unlock()
+void views_unlock(void)
 {
 	slapi_rwlock_unlock(g_views_cache_lock);
 }
@@ -379,7 +379,7 @@ static int views_close( Slapi_PBlock *pb )
 	return SLAPI_PLUGIN_SUCCESS;
 }
 
-static void views_cache_free()
+static void views_cache_free(void)
 {
 	viewEntry *head = theCache.pCacheViews;
 	viewEntry *current;
@@ -421,7 +421,7 @@ static void views_cache_free()
 	---------------------
 	Walks the views in the DIT and populates the cache.
 */
-static int views_cache_create()
+static int views_cache_create(void)
 {
 	int ret = SLAPI_PLUGIN_FAILURE;
 
@@ -538,7 +538,7 @@ int views_cache_dn_compare(const void *e1, const void *e2)
  * ----------------
  * indexes the cache for fast look up of views
  */
-static int views_cache_index()
+static int views_cache_index(void)
 {
 	int ret = SLAPI_PLUGIN_FAILURE;
 	int i;

+ 0 - 2
ldap/servers/slapd/agtmmap.h

@@ -39,8 +39,6 @@ extern "C" {
 #define NUM_SNMP_INT_TBL_ROWS 5
 #define SNMP_FIELD_LENGTH 100
 
-extern int			errno;
-
 #if !defined(_MAX_PATH)
 #define _MAX_PATH 256
 #endif

+ 3 - 3
ldap/servers/slapd/attrsyntax.c

@@ -68,7 +68,7 @@ static void attr_syntax_insert_tmp( struct asyntaxinfo *asip );
 static void attr_syntax_remove( struct asyntaxinfo *asip );
 
 #ifdef ATTR_LDAP_DEBUG
-static void attr_syntax_print();
+static void attr_syntax_print(void);
 #endif
 static int attr_syntax_init(void);
 
@@ -206,7 +206,7 @@ attr_syntax_free( struct asyntaxinfo *a )
 }
 
 static struct asyntaxinfo *
-attr_syntax_new()
+attr_syntax_new(void)
 {
 	return (struct asyntaxinfo *)slapi_ch_calloc(1, sizeof(struct asyntaxinfo));
 }
@@ -1243,7 +1243,7 @@ attr_syntax_printnode(PLHashEntry *he, PRIntn i, void *arg)
 }
 
 void
-attr_syntax_print()
+attr_syntax_print(void)
 {
 	printf( "*** attr_syntax_print ***\n" );
 	PL_HashTableEnumerateEntries(name2asi, attr_syntax_printnode, 0);

+ 4 - 4
ldap/servers/slapd/auth.c

@@ -24,8 +24,8 @@ char* client_auth_config_file = NULL;
 
 /* forward declarations */
 
-static void generate_id();
-static Slapi_ComponentId * auth_get_component_id();
+static void generate_id(void);
+static Slapi_ComponentId * auth_get_component_id(void);
 
 #define internal_ld NULL
 
@@ -312,14 +312,14 @@ client_auth_init ()
 
 static Slapi_ComponentId * auth_component_id=NULL;
 
-static void generate_id() 
+static void generate_id(void)
 {
 	if (auth_component_id == NULL ) {
 	    	auth_component_id=generate_componentid (NULL /* Not a plugin */ , COMPONENT_CERT_AUTH);
 	}
 }
 
-static Slapi_ComponentId * auth_get_component_id() {
+static Slapi_ComponentId * auth_get_component_id(void) {
 	return auth_component_id;
 }
 

+ 10 - 10
ldap/servers/slapd/back-ldbm/dblayer.c

@@ -198,10 +198,10 @@ static PRLock *sync_txn_log_flush = NULL;
 static PRCondVar *sync_txn_log_flush_done = NULL;
 static PRCondVar *sync_txn_log_do_flush = NULL;
 static int dblayer_db_remove_ex(dblayer_private_env *env, char const path[], char const dbName[], PRBool use_lock);
-static void dblayer_init_pvt_txn();
+static void dblayer_init_pvt_txn(void);
 static void dblayer_push_pvt_txn(back_txn *txn);
-static back_txn *dblayer_get_pvt_txn();
-static void dblayer_pop_pvt_txn();
+static back_txn *dblayer_get_pvt_txn(void);
+static void dblayer_pop_pvt_txn(void);
 
 static int dblayer_post_restore = 0;
 
@@ -620,7 +620,7 @@ static int dblayer_ioinfo_large(const char *path, int fd, u_int32_t *mbytesp,
 /* Helper function to tell if a file exists */
 /* On Solaris, if you use stat() on a file >4Gbytes, it fails with EOVERFLOW, 
    causing us to think that the file does not exist when it in fact does */
-static int dblayer_exists_large(char *path, int *isdirp)
+static int dblayer_exists_large(const char *path, int *isdirp)
 {
     struct stat64 sb;
 
@@ -657,11 +657,11 @@ static int dblayer_override_libdb_functions(DB_ENV *pEnv, dblayer_private *priv)
     db_env_set_func_open((int (*)(const char *, int, ...))dblayer_open_large);
 #endif  /* !irix */
     db_env_set_func_ioinfo(dblayer_ioinfo_large);
-    db_env_set_func_exists((int (*)())dblayer_exists_large);
+    db_env_set_func_exists(dblayer_exists_large);
 #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 4300
-    db_env_set_func_seek((int (*)())dblayer_seek43_large);
+    db_env_set_func_seek((int (*)(int, off_t, int))dblayer_seek43_large);
 #else
-    db_env_set_func_seek((int (*)())dblayer_seek24_large);
+    db_env_set_func_seek((int (*)(int, off_t, int))dblayer_seek24_large);
 #endif
 
     LDAPDebug(LDAP_DEBUG_TRACE, "Enabled 64-bit files\n", 0, 0, 0);
@@ -7596,7 +7596,7 @@ dblayer_cleanup_txn_stack(void *arg)
 }
 
 static void
-dblayer_init_pvt_txn()
+dblayer_init_pvt_txn(void)
 {
     PR_NewThreadPrivateIndex(&thread_private_txn_stack, dblayer_cleanup_txn_stack);
 }
@@ -7617,7 +7617,7 @@ dblayer_push_pvt_txn(back_txn *txn)
 }
 
 static back_txn *
-dblayer_get_pvt_txn()
+dblayer_get_pvt_txn(void)
 {
     back_txn *txn = NULL;
     dblayer_txn_stack *txn_stack = PR_GetThreadPrivate(thread_private_txn_stack);
@@ -7628,7 +7628,7 @@ dblayer_get_pvt_txn()
 }
 
 static void
-dblayer_pop_pvt_txn()
+dblayer_pop_pvt_txn(void)
 {
     dblayer_txn_stack *elem = NULL;
     dblayer_txn_stack *txn_stack = PR_GetThreadPrivate(thread_private_txn_stack);

+ 1 - 1
ldap/servers/slapd/back-ldbm/idl.c

@@ -42,7 +42,7 @@ void idl_old_set_tune(int val)
 	idl_tune = val;
 }
 
-int idl_old_get_tune() {
+int idl_old_get_tune(void) {
   return idl_tune;
 }
 

+ 1 - 1
ldap/servers/slapd/back-ldbm/idl_new.c

@@ -69,7 +69,7 @@ void idl_new_set_tune(int val)
 	idl_tune = val;
 }
 
-int idl_new_get_tune() {
+int idl_new_get_tune(void) {
   return idl_tune;
 }
 

+ 3 - 3
ldap/servers/slapd/back-ldbm/idl_shim.c

@@ -19,7 +19,7 @@ static int idl_new = 0; /* non-zero if we're doing new IDL style */
 
 
 void idl_old_set_tune(int val);
-int idl_old_get_tune();
+int idl_old_get_tune(void);
 int idl_old_init_private(backend *be, struct attrinfo *a);
 int idl_old_release_private(struct attrinfo *a);
 size_t idl_old_get_allidslimit(struct attrinfo *a);
@@ -30,7 +30,7 @@ int idl_old_store_block( backend *be,DB *db,DBT *key,IDList *idl,DB_TXN *txn,str
 
 
 void idl_new_set_tune(int val);
-int idl_new_get_tune();
+int idl_new_get_tune(void);
 int idl_new_init_private(backend *be, struct attrinfo *a);
 int idl_new_release_private(struct attrinfo *a);
 size_t idl_new_get_allidslimit(struct attrinfo *a, int allidslimit);
@@ -59,7 +59,7 @@ void idl_set_tune(int val)
 	}
 }
 
-int idl_get_tune()
+int idl_get_tune(void)
 {
 	if (idl_new) {
 		return idl_new_get_tune();

+ 12 - 12
ldap/servers/slapd/back-ldbm/proto-back-ldbm.h

@@ -19,7 +19,7 @@
 /*
  * attr.c
  */
-struct attrinfo * attrinfo_new();
+struct attrinfo * attrinfo_new(void);
 void attrinfo_delete(struct attrinfo **pp);
 void ainfo_get( backend *be, char *type, struct attrinfo **at );
 void attr_masks( backend *be, char *type, int *indexmask,
@@ -28,7 +28,7 @@ void attr_masks_ex( backend *be, char *type, int *indexmask,
  int *syntaxmask, struct attrinfo **at );
 int attr_index_config( backend *be, char *fname, int lineno,
  Slapi_Entry *e, int init, int none );
-int ldbm_compute_init();
+int ldbm_compute_init(void);
 void attrinfo_deletetree(ldbm_instance *inst);
 void attr_create_empty(backend *be,char *type,struct attrinfo **ai);
 
@@ -268,9 +268,9 @@ ID idl_iterator_dereference_decrement(idl_iterator *i, const IDList *idl);
 size_t idl_sizeof(IDList *idl);
 int idl_store_block(backend *be,DB *db,DBT *key,IDList *idl,DB_TXN *txn,struct attrinfo *a);
 void idl_set_tune(int val);
-int idl_get_tune();
+int idl_get_tune(void);
 size_t idl_get_allidslimit(struct attrinfo *a, int allidslimit);
-int idl_get_idl_new();
+int idl_get_idl_new(void);
 int idl_new_compare_dups(
 #if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 3200
     DB *db,
@@ -333,7 +333,7 @@ int import_subcount_mother_count(import_subcount_stuff *mothers,ID parent_id);
 void import_subcount_stuff_init(import_subcount_stuff *stuff);
 void import_subcount_stuff_term(import_subcount_stuff *stuff);
 void import_configure_index_buffer_size(size_t size);
-size_t import_get_index_buffer_size();
+size_t import_get_index_buffer_size(void);
 int ldbm_back_fetch_incl_excl(Slapi_PBlock *pb, char ***include,
                   char ***exclude);
 void ldbm_back_free_incl_excl(char **include, char **exclude);
@@ -404,7 +404,7 @@ void get_both_ids( struct ldbminfo *li, ID *nextid, ID *nextid2index );
  * backentry.c
  */
 struct backentry *backentry_init( Slapi_Entry *e );
-struct backentry *backentry_alloc();
+struct backentry *backentry_alloc(void);
 void backentry_free( struct backentry **bep );
 struct backentry *backentry_dup( struct backentry * );
 void backentry_clear_entry( struct backentry * );
@@ -499,7 +499,7 @@ int ldbm_back_entry_release( Slapi_PBlock *pb, void *backend_info_ptr );
 void ldbm_back_search_results_release( void **search_results );
 int ldbm_back_init( Slapi_PBlock *pb ); 
 void ldbm_back_prev_search_results( Slapi_PBlock *pb );
-int ldbm_back_isinitialized();
+int ldbm_back_isinitialized(void);
 
 /*
  * monitor.c
@@ -535,10 +535,10 @@ struct vlv_response
 int vlv_init(ldbm_instance *inst);
 void vlv_close(ldbm_instance *inst);
 int vlv_remove_callbacks(ldbm_instance *inst);
-const Slapi_Entry **vlv_get_search_entries();
+const Slapi_Entry **vlv_get_search_entries(void);
 struct vlvIndex* vlv_find_searchname(const char * name, backend *be);
 struct vlvIndex* vlv_find_indexname(const char * name, backend *be);
-char *vlv_getindexnames();
+char *vlv_getindexnames(backend *be);
 int vlv_search_build_candidate_list(Slapi_PBlock *pb, const Slapi_DN *base, int *rc, const sort_spec* sort_control, 
                     const struct vlv_request *vlv_request_control, IDList** candidates, struct vlv_response *vlv_response_control);
 int vlv_update_index(struct vlvIndex* p, back_txn *txn, struct ldbminfo *li, Slapi_PBlock *pb, struct backentry* oldEntry, struct backentry* newEntry);
@@ -570,7 +570,7 @@ int indexfile_primary_modifyall(backend *be, LDAPMod **mods_to_perform,char **in
  * bedse.c
  */
 #if 0
-int bedse_init();
+int bedse_init(void);
 int bedse_search(Slapi_PBlock *pb);
 struct dse_callback *bedse_register_callback(int operation, const Slapi_DN *base, int scope, const char *filter, int (*fn)(Slapi_PBlock *,Slapi_Entry *,Slapi_Entry *,int*,char*,void *), void *fn_arg);
 void bedse_remove_callback(int operation, const Slapi_DN *base, int scope, const char *filter, int (*fn)(Slapi_PBlock *,Slapi_Entry *,Slapi_Entry *,int*,char*,void *));
@@ -694,9 +694,9 @@ int ldbm_set_last_usn(Slapi_Backend *be);
  * ldbm_entryrdn.c
  */
 void entryrdn_set_switch(int val);
-int entryrdn_get_switch();
+int entryrdn_get_switch(void);
 void entryrdn_set_noancestorid(int val);
-int entryrdn_get_noancestorid();
+int entryrdn_get_noancestorid(void);
 int entryrdn_compare_dups(DB *db, const DBT *a, const DBT *b);
 int entryrdn_index_entry(backend *be, struct backentry *e, int flags, back_txn *txn);
 int entryrdn_index_read(backend *be, const Slapi_DN *sdn, ID *id, back_txn *txn);

+ 1 - 1
ldap/servers/slapd/back-ldbm/sort.c

@@ -42,7 +42,7 @@ static void sort_spec_thing_free(sort_spec_thing *s)
 	slapi_ch_free( (void**)&s);
 }
 
-static sort_spec_thing *sort_spec_thing_allocate()
+static sort_spec_thing *sort_spec_thing_allocate(void)
 {
 	return (sort_spec_thing *) slapi_ch_calloc(1,sizeof (sort_spec_thing));
 }

+ 1 - 1
ldap/servers/slapd/back-ldbm/vlv_key.h

@@ -23,7 +23,7 @@ struct vlv_key
     DBT key;
 };
 
-struct vlv_key *vlv_key_new();
+struct vlv_key *vlv_key_new(void);
 void vlv_key_delete(struct vlv_key **p);
 void vlv_key_addattr(struct vlv_key *p,struct berval *val);
 

+ 2 - 2
ldap/servers/slapd/back-ldbm/vlv_srch.h

@@ -103,7 +103,7 @@ struct vlvIndex
     struct vlvIndex* vlv_next;
 };
 
-struct vlvSearch* vlvSearch_new();
+struct vlvSearch* vlvSearch_new(void);
 void vlvSearch_init(struct vlvSearch*, Slapi_PBlock *pb, const Slapi_Entry *e, ldbm_instance *inst);
 void vlvSearch_reinit(struct vlvSearch* p, const struct backentry *base);
 void vlvSearch_delete(struct vlvSearch** ppvs);
@@ -123,7 +123,7 @@ int vlvSearch_isVlvSearchEntry(Slapi_Entry *e);
 void vlvSearch_addIndex(struct vlvSearch *pSearch, struct vlvIndex *pIndex);
 
 
-struct vlvIndex* vlvIndex_new();
+struct vlvIndex* vlvIndex_new(void);
 void vlvIndex_init(struct vlvIndex* p, backend *be, struct vlvSearch* pSearch, const Slapi_Entry *e);
 void vlvIndex_delete(struct vlvIndex** ppvs);
 PRUint32 vlvIndex_get_indexlength(struct vlvIndex* p, DB *db, back_txn *txn);

+ 1 - 1
ldap/servers/slapd/ch_malloc.c

@@ -49,7 +49,7 @@ static const char* const oom_advice =
   "Can't recover; calling exit(1).\n";
 
 static void
-create_counters()
+create_counters(void)
 {
 	PR_CREATE_COUNTER(slapi_ch_counter_malloc,"slapi_ch","malloc","");
 	PR_CREATE_COUNTER(slapi_ch_counter_calloc,"slapi_ch","calloc","");

+ 1 - 1
ldap/servers/slapd/connection.c

@@ -74,7 +74,7 @@ static PRInt32 op_shutdown= 0;		/* if non-zero, server is shutting down */
 #define LDAP_SOCKET_IO_BUFFER_SIZE 512 /* Size of the buffer we give to the I/O system for reads */
 
 static struct Slapi_work_q *
-create_work_q()
+create_work_q(void)
 {
 	struct Slapi_work_q *work_q = (struct Slapi_work_q *)PR_StackPop(work_q_stack);
 	if (!work_q) {

+ 5 - 5
ldap/servers/slapd/csngen.c

@@ -95,7 +95,7 @@ static int _csngen_adjust_local_time (CSNGen *gen, time_t cur_time);
  */
 
 static int _csngen_start_test_threads (CSNGen *gen);
-static void _csngen_stop_test_threads ();
+static void _csngen_stop_test_threads(void);
 static void _csngen_gen_tester_main (void *data); 
 static void _csngen_local_tester_main (void *data); 
 static void _csngen_remote_tester_main (void *data); 
@@ -290,7 +290,7 @@ int csngen_adjust_time(CSNGen *gen, const CSN* csn)
     time_t remote_time, remote_offset, cur_time;
 	PRUint16 remote_seqnum;
     int rc;
-    extern int config_get_ignore_time_skew();
+    extern int config_get_ignore_time_skew(void);
     int ignore_time_skew = config_get_ignore_time_skew();
 
     if (gen == NULL || csn == NULL)
@@ -500,7 +500,7 @@ void csngen_test ()
         DS_Sleep(PR_SecondsToInterval(TEST_TIME));
     }
     
-    _csngen_stop_test_threads(gen);
+    _csngen_stop_test_threads();
     csngen_dump_state (gen);    
     slapi_log_error(SLAPI_LOG_FATAL, NULL, "csn generator test is complete...");
 }
@@ -617,7 +617,7 @@ _csngen_cmp_callbacks (const void *el1, const void *el2)
 static int 
 _csngen_adjust_local_time (CSNGen *gen, time_t cur_time)
 {
-    extern int config_get_ignore_time_skew();
+    extern int config_get_ignore_time_skew(void);
     int ignore_time_skew = config_get_ignore_time_skew();
     time_t time_diff = cur_time - gen->state.sampled_time;
 
@@ -779,7 +779,7 @@ _csngen_start_test_threads(CSNGen *gen)
     return 0;
 }
 
-static void _csngen_stop_test_threads ()
+static void _csngen_stop_test_threads(void)
 {
 	s_must_exit = 1;
 

+ 11 - 11
ldap/servers/slapd/daemon.c

@@ -79,7 +79,7 @@ static int readsignalpipe = SLAPD_INVALID_SOCKET;
 static PRThread *disk_thread_p = NULL;
 static PRCondVar *diskmon_cvar = NULL;
 static PRLock *diskmon_mutex = NULL;
-void disk_monitoring_stop();
+void disk_monitoring_stop(void);
 
 typedef struct listener_info {
 #ifdef ENABLE_NUNC_STANS
@@ -102,7 +102,7 @@ static int enable_nunc_stans = 0; /* if nunc-stans is set to enabled, set to 1 i
 
 #define SLAPD_POLL_LISTEN_READY(xxflagsxx) (xxflagsxx & PR_POLL_READ)
 
-static int get_configured_connection_table_size();
+static int get_configured_connection_table_size(void);
 #ifdef RESOLVER_NEEDS_LOW_FILE_DESCRIPTORS
 static void get_loopback_by_addr( void );
 #endif
@@ -125,7 +125,7 @@ static void* catch_signals();
 static int createsignalpipe( void );
 
 static char *
-get_pid_file()
+get_pid_file(void)
 {
     return(pid_file);
 }
@@ -161,8 +161,8 @@ static void ns_handle_new_connection(struct ns_job_t *job);
 static void handle_pr_read_ready(Connection_Table *ct, PRIntn num_poll);
 static int clear_signal(struct POLL_STRUCT *fds);
 static void unfurl_banners(Connection_Table *ct,daemon_ports_t *ports, PRFileDesc **n_tcps, PRFileDesc **s_tcps, PRFileDesc **i_unix);
-static int write_pid_file();
-static int init_shutdown_detect();
+static int write_pid_file(void);
+static int init_shutdown_detect(void);
 
 /*
  * NSPR has different implementations for PRMonitor, depending
@@ -758,7 +758,7 @@ handle_listeners(Connection_Table *ct)
  * these attributes and convert them to AES if they are DES encoded.
  */
 static void
-convert_pbe_des_to_aes()
+convert_pbe_des_to_aes(void)
 {
     Slapi_PBlock *pb = NULL;
     Slapi_Entry **entries = NULL;
@@ -1314,7 +1314,7 @@ void slapd_daemon( daemon_ports_t *ports )
 	be_flushall();
 	op_thread_cleanup();
 	housekeeping_stop(); /* Run this after op_thread_cleanup() logged sth */
-	disk_monitoring_stop(disk_thread_p);
+       disk_monitoring_stop();
 
 	threads = g_get_active_threadcnt();
 	if ( threads > 0 ) {
@@ -2660,7 +2660,7 @@ ns_handle_new_connection(struct ns_job_t *job)
 }
 #endif
 
-static int init_shutdown_detect()
+static int init_shutdown_detect(void)
 {
   /* First of all, we must reset the signal mask to get rid of any blockages
    * the process may have inherited from its parent (such as the console), which
@@ -2794,7 +2794,7 @@ unfurl_banners(Connection_Table *ct,daemon_ports_t *ports, PRFileDesc **n_tcps,
 
 /* On UNIX, we create a file with our PID in it */
 static int
-write_pid_file()
+write_pid_file(void)
 {
 	FILE *fp = NULL;
 	/* 
@@ -3243,7 +3243,7 @@ catch_signals()
 #endif /* HPUX */
  
 static int
-get_configured_connection_table_size()
+get_configured_connection_table_size(void)
 {
 	int size = config_get_conntablesize();
 	int maxdesc = config_get_maxdescriptors();
@@ -3421,7 +3421,7 @@ get_loopback_by_addr( void )
 #endif /* RESOLVER_NEEDS_LOW_FILE_DESCRIPTORS */
 
 void
-disk_monitoring_stop()
+disk_monitoring_stop(void)
 {
 	if ( disk_thread_p ) {
 		PR_Lock( diskmon_mutex );

+ 1 - 1
ldap/servers/slapd/detach.c

@@ -45,7 +45,7 @@
 #endif /* USE_SYSCONF */
 
 static int
-set_workingdir()
+set_workingdir(void)
 {
 	int rc = 0;
 	char *workingdir = config_get_workingdir();

+ 6 - 6
ldap/servers/slapd/dn.c

@@ -72,8 +72,8 @@ static int ndn_cache_lookup(char *dn, size_t dn_len, char **result, char **udn,
 static void ndn_cache_update_lru(struct ndn_cache_lru **node);
 static void ndn_cache_add(char *dn, size_t dn_len, char *ndn, size_t ndn_len);
 static void ndn_cache_delete(char *dn);
-static void ndn_cache_flush();
-static void ndn_cache_free();
+static void ndn_cache_flush(void);
+static void ndn_cache_free(void);
 static int ndn_started = 0;
 static PRLock *lru_lock = NULL;
 static Slapi_RWLock *ndn_cache_lock = NULL;
@@ -1820,7 +1820,7 @@ PR_DEFINE_COUNTER(slapi_sdn_counter_udn_deleted);
 PR_DEFINE_COUNTER(slapi_sdn_counter_udn_exist);
 
 static void
-sdn_create_counters()
+sdn_create_counters(void)
 {
 	PR_CREATE_COUNTER(slapi_sdn_counter_created,"Slapi_DN","created","");
 	PR_CREATE_COUNTER(slapi_sdn_counter_deleted,"Slapi_DN","deleted","");
@@ -1843,7 +1843,7 @@ sdn_create_counters()
 #define FLAG_UDN 3
 
 Slapi_DN *
-slapi_sdn_new()
+slapi_sdn_new(void)
 {
     Slapi_DN *sdn= (Slapi_DN *)slapi_ch_malloc(sizeof(Slapi_DN));    
     slapi_sdn_init(sdn);
@@ -3024,7 +3024,7 @@ ndn_cache_add(char *dn, size_t dn_len, char *ndn, size_t ndn_len)
  *  cache is full, remove the least used dn's.  lru_lock/ndn_cache write lock are already taken
  */
 static void
-ndn_cache_flush()
+ndn_cache_flush(void)
 {
     struct ndn_cache_lru *node, *next, *flush_node;
     int i;
@@ -3048,7 +3048,7 @@ ndn_cache_flush()
 }
 
 static void
-ndn_cache_free()
+ndn_cache_free(void)
 {
     struct ndn_cache_lru *node, *next, *flush_node;
 

+ 2 - 2
ldap/servers/slapd/dse.c

@@ -114,7 +114,7 @@ static int dse_permission_to_write(struct dse* pdse, int loglevel);
 static int dse_write_file_nolock(struct dse* pdse);
 static int dse_apply_nolock(struct dse* pdse, IFP fp, caddr_t arg);
 static int dse_replace_entry( struct dse* pdse, Slapi_Entry *e, int write_file, int use_lock );
-static dse_search_set* dse_search_set_new ();
+static dse_search_set* dse_search_set_new(void);
 static void dse_search_set_delete (dse_search_set *ss);
 static void dse_search_set_clean (dse_search_set *ss);
 static void dse_free_entry (void **data);
@@ -2722,7 +2722,7 @@ dse_unset_dont_ever_write_dse_files()
 }
 
 static dse_search_set* 
-dse_search_set_new ()
+dse_search_set_new(void)
 {
 	dse_search_set *ss;
 

+ 2 - 1
ldap/servers/slapd/entry.c

@@ -668,13 +668,14 @@ entry_attrs_new(entry_attrs **pea)
 /*
  * Delete an attribute type tree node.
  */
-static void
+static int
 attr_type_node_free( caddr_t data )
 {
 	entry_attr_data	*ea = (entry_attr_data *)data;
 	if ( NULL != ea && ea->ead_allocated ) {
 		slapi_ch_free( (void **)&ea );
 	}
+       return 0;
 }
 
 

Some files were not shown because too many files changed in this diff