diff options
author | Rich Megginson <rmeggins@redhat.com> | 2009-08-31 12:24:54 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2009-08-31 15:06:55 -0600 |
commit | f29916c68df46594bd0c1500ffcb131b70991a43 (patch) | |
tree | b9b41e09342af5fcda6ea411f82b6891c31379d5 /ldap | |
parent | 6b08e5b7953dd87e6f4ad92df04d93e670d6d052 (diff) | |
download | ds-f29916c68df46594bd0c1500ffcb131b70991a43.tar.gz ds-f29916c68df46594bd0c1500ffcb131b70991a43.tar.xz ds-f29916c68df46594bd0c1500ffcb131b70991a43.zip |
Clean up build warnings
This cleans up the following warnings:
ds.git/ldap/servers/slapd/back-ldbm/ldbm_usn.c:102: warning: unused variable 'li'
ds.git/ldap/servers/plugins/replication/repl5_agmt.c:1184: warning: too many arguments for format
ds.git/ldap/servers/plugins/syntaxes/dn.c:143: warning: unused variable 'val_copy'
ds.git/ldap/servers/plugins/syntaxes/deliverymethod.c:264: warning: unused variable 'p'
ds.git/ldap/servers/plugins/syntaxes/facsimile.c:269: warning: unused variable 'p'
ds.git/ldap/servers/plugins/usn/usn.c:107: warning: value computed is not used
ds.git/ldap/servers/plugins/usn/usn.c:263: warning: control reaches end of non-void function
ds.git/ldap/servers/plugins/usn/usn.c:525: warning: control reaches end of non-void function
The only one I'm not sure about is changing usn_get_attr to always return a 0 - please review that usage.
With these fixes, I only see the llu and lld format warnings on RHEL5 with the default rpmbuild compiler flags.
Reviewed by: nhosoi (Thanks!)
Diffstat (limited to 'ldap')
-rw-r--r-- | ldap/servers/plugins/replication/repl5_agmt.c | 2 | ||||
-rw-r--r-- | ldap/servers/plugins/syntaxes/deliverymethod.c | 1 | ||||
-rw-r--r-- | ldap/servers/plugins/syntaxes/dn.c | 1 | ||||
-rw-r--r-- | ldap/servers/plugins/syntaxes/facsimile.c | 1 | ||||
-rw-r--r-- | ldap/servers/plugins/usn/usn.c | 8 | ||||
-rw-r--r-- | ldap/servers/slapd/back-ldbm/ldbm_usn.c | 1 |
6 files changed, 7 insertions, 7 deletions
diff --git a/ldap/servers/plugins/replication/repl5_agmt.c b/ldap/servers/plugins/replication/repl5_agmt.c index dc9b3be2..d1550044 100644 --- a/ldap/servers/plugins/replication/repl5_agmt.c +++ b/ldap/servers/plugins/replication/repl5_agmt.c @@ -1179,7 +1179,7 @@ _agmt_set_default_fractional_attrs(Repl_Agmt *ra) if (0 != rc) { slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "_agmt_set_default_fractional_attrs: failed to " - "parse default config (%s) attribute value: %s\n", + "parse default config (%s) attribute %s value: %s\n", SLAPI_PLUGIN_DEFAULT_CONFIG, type_nsds5ReplicatedAttributeList, val); } diff --git a/ldap/servers/plugins/syntaxes/deliverymethod.c b/ldap/servers/plugins/syntaxes/deliverymethod.c index 62a41249..67c9b5ad 100644 --- a/ldap/servers/plugins/syntaxes/deliverymethod.c +++ b/ldap/servers/plugins/syntaxes/deliverymethod.c @@ -261,7 +261,6 @@ pdm_validate(const char *start, const char *end) { int rc = 0; /* Assume string is valid */ size_t length = 0; - const char *p = NULL; if ((start == NULL) || (end == NULL)) { rc = 1; diff --git a/ldap/servers/plugins/syntaxes/dn.c b/ldap/servers/plugins/syntaxes/dn.c index 6ab62949..c3f8287d 100644 --- a/ldap/servers/plugins/syntaxes/dn.c +++ b/ldap/servers/plugins/syntaxes/dn.c @@ -140,7 +140,6 @@ dn_assertion2keys_sub( Slapi_PBlock *pb, char *initial, char **any, char *final, static int dn_validate( struct berval *val ) { int rc = 0; /* Assume value is valid */ - char *val_copy = NULL; /* A 0 length value is valid for the DN syntax. */ if (val == NULL) { diff --git a/ldap/servers/plugins/syntaxes/facsimile.c b/ldap/servers/plugins/syntaxes/facsimile.c index fa604219..2000978b 100644 --- a/ldap/servers/plugins/syntaxes/facsimile.c +++ b/ldap/servers/plugins/syntaxes/facsimile.c @@ -266,7 +266,6 @@ fax_parameter_validate(const char *start, const char *end) { int rc = 0; /* Assume string is valid */ size_t length = 0; - const char *p = NULL; if ((start == NULL) || (end == NULL)) { rc = 1; diff --git a/ldap/servers/plugins/usn/usn.c b/ldap/servers/plugins/usn/usn.c index fd8f7c58..19b146a5 100644 --- a/ldap/servers/plugins/usn/usn.c +++ b/ldap/servers/plugins/usn/usn.c @@ -100,9 +100,9 @@ usn_init(Slapi_PBlock *pb) goto bail; } if (slapi_pblock_set(pb, SLAPI_PLUGIN_START_FN, - (void *)usn_start) != 0 ) { + (void *)usn_start) != 0 || slapi_pblock_set(pb, SLAPI_PLUGIN_CLOSE_FN, - (void *)usn_close) != 0 || + (void *)usn_close) != 0 ) { slapi_log_error(SLAPI_LOG_FATAL, USN_PLUGIN_SUBSYSTEM, "usn_init: failed to register close callback & task\n"); rc = -1; @@ -260,6 +260,8 @@ usn_close(Slapi_PBlock *pb) csngen_free(&_usn_csngen); slapi_log_error(SLAPI_LOG_TRACE, USN_PLUGIN_SUBSYSTEM, "<-- usn_close\n"); + + return 0; } /* @@ -522,6 +524,8 @@ usn_get_attr(Slapi_PBlock *pb, const char* type, void *value) } else { *(int *)value = 0; } + + return 0; } void diff --git a/ldap/servers/slapd/back-ldbm/ldbm_usn.c b/ldap/servers/slapd/back-ldbm/ldbm_usn.c index e8dd7237..b502d43d 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_usn.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_usn.c @@ -99,7 +99,6 @@ static int usn_get_last_usn(Slapi_Backend *be, PRUint64 *last_usn) { struct attrinfo *ai = NULL; - struct ldbminfo *li = (struct ldbminfo *)be->be_database->plg_private; int rc = -1; DB *db = NULL; DBC *dbc = NULL; |