Sunday, September 4, 2016

[389-commits] include/ldaputil include/libaccess include/libadmin include/netsite.h include/public ldap/include ldap/libraries ldap/servers lib/libsi18n

include/ldaputil/certmap.h | 2
include/ldaputil/ldaputil.h | 2
include/libaccess/aclproto.h | 2
include/libadmin/libadmin.h | 2
include/netsite.h | 2
include/public/nsacl/plistdef.h | 2
ldap/include/avl.h | 35 -
ldap/libraries/libavl/avl.c | 26
ldap/servers/plugins/acct_usability/acct_usability.c | 4
ldap/servers/plugins/acctpolicy/acct_init.c | 2
ldap/servers/plugins/acl/acl.h | 40 -
ldap/servers/plugins/acl/acl_ext.c | 12
ldap/servers/plugins/acl/acllist.c | 19
ldap/servers/plugins/acl/aclplugin.c | 2
ldap/servers/plugins/automember/automember.c | 14
ldap/servers/plugins/automember/automember.h | 12
ldap/servers/plugins/chainingdb/cb.h | 10
ldap/servers/plugins/chainingdb/cb_conn_stateless.c | 4
ldap/servers/plugins/cos/cos.c | 4
ldap/servers/plugins/cos/cos_cache.c | 14
ldap/servers/plugins/cos/cos_cache.h | 4
ldap/servers/plugins/deref/deref.c | 4
ldap/servers/plugins/dna/dna.c | 38 -
ldap/servers/plugins/http/http_client.c | 2
ldap/servers/plugins/http/http_client.h | 2
ldap/servers/plugins/http/http_impl.c | 6
ldap/servers/plugins/http/http_impl.h | 2
ldap/servers/plugins/linkedattrs/linked_attrs.c | 8
ldap/servers/plugins/linkedattrs/linked_attrs.h | 16
ldap/servers/plugins/memberof/memberof.h | 24
ldap/servers/plugins/mep/mep.c | 14
ldap/servers/plugins/mep/mep.h | 12
ldap/servers/plugins/pam_passthru/pam_passthru.h | 18
ldap/servers/plugins/pam_passthru/pam_ptconfig.c | 6
ldap/servers/plugins/passthru/passthru.h | 2
ldap/servers/plugins/posix-winsync/posix-group-func.h | 8
ldap/servers/plugins/posix-winsync/posix-winsync.c | 4
ldap/servers/plugins/posix-winsync/posix-wsp-ident.h | 32 -
ldap/servers/plugins/presence/presence.c | 18
ldap/servers/plugins/pwdstorage/pwdstorage.h | 2
ldap/servers/plugins/referint/referint.c | 28
ldap/servers/plugins/replication/cl4.h | 4
ldap/servers/plugins/replication/cl5.h | 8
ldap/servers/plugins/replication/cl5_api.c | 60 +-
ldap/servers/plugins/replication/cl5_api.h | 18
ldap/servers/plugins/replication/cl5_clcache.c | 8
ldap/servers/plugins/replication/cl5_clcache.h | 4
ldap/servers/plugins/replication/csnpl.h | 2
ldap/servers/plugins/replication/legacy_consumer.c | 4
ldap/servers/plugins/replication/llist.h | 2
ldap/servers/plugins/replication/repl.h | 32 -
ldap/servers/plugins/replication/repl5.h | 42 -
ldap/servers/plugins/replication/repl5_inc_protocol.c | 2
ldap/servers/plugins/replication/repl5_init.c | 2
ldap/servers/plugins/replication/repl5_prot_private.h | 8
ldap/servers/plugins/replication/repl5_replica_config.c | 8
ldap/servers/plugins/replication/repl_init.c | 2
ldap/servers/plugins/replication/repl_shared.h | 4
ldap/servers/plugins/replication/replutil.c | 2
ldap/servers/plugins/replication/windowsrepl.h | 2
ldap/servers/plugins/rever/rever.h | 2
ldap/servers/plugins/roles/roles_cache.c | 12
ldap/servers/plugins/roles/roles_cache.h | 6
ldap/servers/plugins/roles/roles_plugin.c | 2
ldap/servers/plugins/rootdn_access/rootdn_access.c | 6
ldap/servers/plugins/sync/sync.h | 4
ldap/servers/plugins/sync/sync_persist.c | 8
ldap/servers/plugins/syntaxes/bin.c | 2
ldap/servers/plugins/syntaxes/bitstring.c | 2
ldap/servers/plugins/syntaxes/ces.c | 2
ldap/servers/plugins/syntaxes/cis.c | 2
ldap/servers/plugins/syntaxes/dn.c | 2
ldap/servers/plugins/syntaxes/int.c | 2
ldap/servers/plugins/syntaxes/nameoptuid.c | 2
ldap/servers/plugins/syntaxes/numericstring.c | 2
ldap/servers/plugins/syntaxes/tel.c | 2
ldap/servers/plugins/syntaxes/validate_task.c | 4
ldap/servers/plugins/usn/usn.c | 2
ldap/servers/plugins/usn/usn.h | 4
ldap/servers/plugins/usn/usn_cleanup.c | 2
ldap/servers/plugins/views/views.c | 20
ldap/servers/slapd/agtmmap.h | 2
ldap/servers/slapd/attrsyntax.c | 6
ldap/servers/slapd/auth.c | 8
ldap/servers/slapd/back-ldbm/dblayer.c | 20
ldap/servers/slapd/back-ldbm/idl.c | 2
ldap/servers/slapd/back-ldbm/idl_new.c | 2
ldap/servers/slapd/back-ldbm/idl_shim.c | 6
ldap/servers/slapd/back-ldbm/proto-back-ldbm.h | 24
ldap/servers/slapd/back-ldbm/sort.c | 2
ldap/servers/slapd/back-ldbm/vlv_key.h | 2
ldap/servers/slapd/back-ldbm/vlv_srch.h | 4
ldap/servers/slapd/ch_malloc.c | 2
ldap/servers/slapd/connection.c | 2
ldap/servers/slapd/csngen.c | 10
ldap/servers/slapd/daemon.c | 22
ldap/servers/slapd/detach.c | 2
ldap/servers/slapd/dn.c | 12
ldap/servers/slapd/dse.c | 4
ldap/servers/slapd/entry.c | 3
ldap/servers/slapd/eventq.c | 2
ldap/servers/slapd/factory.c | 2
ldap/servers/slapd/fe.h | 24
ldap/servers/slapd/fedse.c | 8
ldap/servers/slapd/filter.c | 3
ldap/servers/slapd/filterentry.c | 23
ldap/servers/slapd/generation.c | 2
ldap/servers/slapd/getfilelist.c | 3
ldap/servers/slapd/index_subsys.h | 2
ldap/servers/slapd/index_subsystem.c | 6
ldap/servers/slapd/ldaputil.c | 4
ldap/servers/slapd/libglobs.c | 158 ++---
ldap/servers/slapd/localhost.c | 4
ldap/servers/slapd/log.c | 12
ldap/servers/slapd/main.c | 42 -
ldap/servers/slapd/mapping_tree.c | 14
ldap/servers/slapd/plugin.c | 14
ldap/servers/slapd/plugin_mr.c | 4
ldap/servers/slapd/protect_db.c | 8
ldap/servers/slapd/protect_db.h | 2
ldap/servers/slapd/proto-slap.h | 460 ++++++++--------
ldap/servers/slapd/psearch.c | 4
ldap/servers/slapd/resourcelimit.c | 4
ldap/servers/slapd/sasl_map.c | 4
ldap/servers/slapd/saslbind.c | 4
ldap/servers/slapd/schema.c | 4
ldap/servers/slapd/slap.h | 14
ldap/servers/slapd/slapi-plugin.h | 2
ldap/servers/slapd/slapi-private.h | 59 +-
ldap/servers/slapd/snmp_collator.c | 30 -
ldap/servers/slapd/snmp_collator.h | 4
ldap/servers/slapd/ssl.c | 12
ldap/servers/slapd/str2filter.c | 6
ldap/servers/slapd/tools/ldclt/ldcltU.c | 2
ldap/servers/slapd/tools/pwenc.c | 7
ldap/servers/slapd/tools/rsearch/infadd.c | 2
ldap/servers/slapd/tools/rsearch/nametable.h | 2
ldap/servers/slapd/tools/rsearch/rsearch.c | 6
ldap/servers/slapd/util.c | 4
ldap/servers/slapd/uuid.c | 18
ldap/servers/slapd/uuid.h | 2
ldap/servers/slapd/vattr.c | 12
ldap/servers/snmp/ldap-agent.h | 2
ldap/servers/snmp/main.c | 2
lib/libsi18n/makstrdb.c | 2
145 files changed, 976 insertions(+), 928 deletions(-)

New commits:
commit 5b0c9c0a90b73f0b1a200d9ccb1209ccc5dcd7e3
Author: Lukas Slebodnik <lslebodn@redhat.com>
Date: Fri Sep 2 15:10:44 2016 +0000

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!)

diff --git a/include/ldaputil/certmap.h b/include/ldaputil/certmap.h
index 5b71c6d..ca66469 100644
--- a/include/ldaputil/certmap.h
+++ b/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
}
diff --git a/include/ldaputil/ldaputil.h b/include/ldaputil/ldaputil.h
index 23fa3a0..7e586f1 100644
--- a/include/ldaputil/ldaputil.h
+++ b/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,
diff --git a/include/libaccess/aclproto.h b/include/libaccess/aclproto.h
index 3ff89f5..ab8fdf9 100644
--- a/include/libaccess/aclproto.h
+++ b/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);
diff --git a/include/libadmin/libadmin.h b/include/libadmin/libadmin.h
index 7db6d13..3336199 100644
--- a/include/libadmin/libadmin.h
+++ b/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
diff --git a/include/netsite.h b/include/netsite.h
index 9db5cb1..f80aaee 100644
--- a/include/netsite.h
+++ b/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
diff --git a/include/public/nsacl/plistdef.h b/include/public/nsacl/plistdef.h
index cdf9fb4..fdc5be4 100644
--- a/include/public/nsacl/plistdef.h
+++ b/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);

No comments:

Post a Comment