Bug 677440 - clean up compiler warnings in 389-ds-base 1.2.8
Summary: clean up compiler warnings in 389-ds-base 1.2.8
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Directory Server
Version: 1.2.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 639035 389_1.2.8 677464
TreeView+ depends on / blocked
 
Reported: 2011-02-14 19:41 UTC by Rich Megginson
Modified: 2015-12-07 16:50 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 677464 (view as bug list)
Environment:
Last Closed: 2015-12-07 16:50:10 UTC


Attachments (Terms of Use)
0001-Bug-677440-clean-up-compiler-warnings-in-389-ds-base.patch (15.81 KB, patch)
2011-02-14 19:54 UTC, Rich Megginson
no flags Details | Diff
0001-Bug-677440-clean-up-compiler-warnings-in-389-ds-base.patch (15.83 KB, patch)
2011-02-14 19:59 UTC, Rich Megginson
nkinder: review+
Details | Diff

Description Rich Megginson 2011-02-14 19:41:03 UTC
Building on RHEL6 x86_64 with
CFLAGS="-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic" and configure --enable-debug

There are several compiler warnings in 1.2.8
../ds.git/ldap/servers/slapd/attrsyntax.c: In function 'slapi_attr_is_dn_syntax_attr':
../ds.git/ldap/servers/slapd/attrsyntax.c:829: warning: suggest parentheses around assignment used as truth value
../ds.git/ldap/servers/slapd/libglobs.c: In function 'config_get_anon_access_switch':
../ds.git/ldap/servers/slapd/libglobs.c:4623: warning: assignment makes pointer from integer without a cast
../ds.git/ldap/servers/slapd/libglobs.c:4625: warning: return makes integer from pointer without a cast
../ds.git/ldap/servers/slapd/result.c:1699: warning: format '%u' expects type 'unsigned int', but argument 6 has type 'ber_tag_t'
... several of these ...
../ds.git/ldap/servers/plugins/acl/aclparse.c: In function 'acl_check_for_target_macro':
../ds.git/ldap/servers/plugins/acl/aclparse.c:1644: warning: initialization makes integer from pointer without a cast
../ds.git/ldap/servers/plugins/acl/aclparse.c:1649: warning: assignment makes integer from pointer without a cast
../ds.git/ldap/servers/plugins/acl/aclparse.c:1650: warning: comparison between pointer and integer
../ds.git/ldap/servers/slapd/back-ldbm/archive.c: In function 'ldbm_back_ldbm2archive':
../ds.git/ldap/servers/slapd/back-ldbm/archive.c:432: warning: implicit declaration of function 'is_slapd_running'
../ds.git/ldap/servers/slapd/back-ldbm/dblayer.c: In function 'dblayer_sys_pages':
../ds.git/ldap/servers/slapd/back-ldbm/dblayer.c:927: warning: format '%u' expects type 'unsigned int *', but argument 3 has type 'size_t *'
../ds.git/ldap/servers/slapd/back-ldbm/dblayer.c: In function 'commit_good_database':
../ds.git/ldap/servers/slapd/back-ldbm/dblayer.c:4217: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t'
../ds.git/ldap/servers/slapd/back-ldbm/import-threads.c:726: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'size_t'
... several of these ...
../ds.git/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c: In function '_back_crypt_crypto_op':
../ds.git/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1513: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'
../ds.git/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c:1516: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
../ds.git/ldap/servers/plugins/chainingdb/cb_bind.c: In function 'cb_sasl_bind_once_s':
../ds.git/ldap/servers/plugins/chainingdb/cb_bind.c:186: warning: pointer type mismatch in conditional expression
../ds.git/ldap/servers/plugins/chainingdb/cb_bind.c:188: warning: format '%s' expects type 'char *', but argument 4 has type 'void * const'
../ds.git/ldap/servers/plugins/chainingdb/cb_conn_stateless.c: In function 'cb_get_connection':
../ds.git/ldap/servers/plugins/chainingdb/cb_conn_stateless.c:174: warning: unused variable 'error2'
../ds.git/ldap/servers/plugins/mep/mep.c: In function 'mep_modrdn_post_op':
../ds.git/ldap/servers/plugins/mep/mep.c:2374: warning: label 'bail' defined but not used
../ds.git/ldap/servers/plugins/replication/cl5_api.c: In function '_cl5AppInit':
../ds.git/ldap/servers/plugins/replication/cl5_api.c:1973: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
../ds.git/ldap/servers/plugins/replication/cl5_api.c: In function 'cl5WriteRUV':
../ds.git/ldap/servers/plugins/replication/cl5_api.c:6250: warning: implicit declaration of function 'is_slapd_running'
../ds.git/ldap/servers/slapd/connection.c:2702: warning: format ‘%u’ expects type ‘unsigned int’, but argument 6 has type ‘ber_len_t’
../ds.git/ldap/servers/slapd/connection.c:2702: warning: format ‘%u’ expects type ‘unsigned int’, but argument 7 has type ‘ber_len_t’
../ds.git/ldap/servers/slapd/main.c: In function ‘slapd_exemode_db2ldif’:
../ds.git/ldap/servers/slapd/main.c:2329: warning: implicit declaration of function ‘is_slapd_running’

Comment 1 Rich Megginson 2011-02-14 19:54:24 UTC
Created attachment 478695 [details]
0001-Bug-677440-clean-up-compiler-warnings-in-389-ds-base.patch

Comment 2 Rich Megginson 2011-02-14 19:59:40 UTC
Created attachment 478698 [details]
0001-Bug-677440-clean-up-compiler-warnings-in-389-ds-base.patch

fix formatting problems in previous patch

Comment 3 Rich Megginson 2011-02-14 20:58:53 UTC
To ssh://git.fedorahosted.org/git/389/ds.git
   cee5f05..79a3fae  master -> master
commit 79a3fae13fd3ae772b2a37343ef78a1d1e0cb24d
Author: Rich Megginson <rmeggins@redhat.com>
Date:   Tue Feb 8 11:28:31 2011 -0700
    * added is_slapd_running to shared header file
    * added parentheses around assignment used as truth value
    * added printf format string for ber_tag_t and ber_len_t
    * fixed type usage in config_get_anon_access_switch
    * fixed variable declaration in acl_check_for_target_macro
    * use %lu for size_t in scanf and printf
    * fixed usage of matcheddnp in cb_sasl_bind_once_s
    Reviewed by: nkinder (Thanks!)
To ssh://git.fedorahosted.org/git/389/ds.git
   b6871e9..b339ee0  389-ds-base-1.2.8 -> 389-ds-base-1.2.8
commit b339ee0e211b31abe038bb25e8abbf2314161f0f
Author: Rich Megginson <rmeggins@redhat.com>
Date:   Tue Feb 8 11:28:31 2011 -0700

Comment 4 Amita Sharma 2011-05-13 06:49:53 UTC
Requesting Dev to test this issue please.

Comment 5 Rich Megginson 2011-05-13 20:36:28 UTC
the above issues in 79a3fae13fd3ae772b2a37343ef78a1d1e0cb24d are fixed.  You can mark this as VERIFIED.

Comment 6 Jenny Severance 2011-05-16 16:53:23 UTC
based on comment #5 - marking bug verified.


Note You need to log in before you can comment on or make changes to this bug.