#47440 Fix compilation warnings
Closed: wontfix None Opened 7 years ago by lslebodn.

Compilation of freeipa contains few warnings related to dirsrv plugin header files.

A)

/usr/include/dirsrv/slapi-plugin.h:2211:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 void slapi_entrycache_vattrcache_watermark_invalidate();

B)

In file included from ipa_repl_version.c:39:0:
../../ipa-version.h:38:0: warning: "VERSION" redefined [enabled by default]
 #define VERSION "3.2.99"
 ^
In file included from /usr/include/dirsrv/slapi-plugin.h:46:0,
                 from /usr/include/dirsrv/repl-session-plugin.h:44,
                 from ipa_repl_version.c:38:
../../config.h:87:0: note: this is the location of the previous definition

There are also another warnings in the directory server code, which are not related to freeipa. Two patches will be attached.

warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
0001-Fix-compilation-warnings.patch

The patches look good.

May I ask which branch(es) these patches are for?

Patches were created from master branch.

I would like to have patch 0003 and 0004 in the fedora 19 release (RHEL7). Those patches will decrease count of warnings in freeipa build. I am not sure which branch should be used.

Replying to [comment:3 lslebodn]:

Patches were created from master branch.

I would like to have patch 0003 and 0004 in the fedora 19 release (RHEL7). Those patches will decrease count of warnings in freeipa build. I am not sure which branch should be used.

Thank you for the clarification.
F19/RHEL7 is based on 389-ds-base-1.3.1.

Is there any problem with Patch0003 and Patch0004?
They have not been pushed to git repo yet and ticket milestone is still set to "need triage".

Did I forgot to do any formal contribution step?

Replying to [comment:5 lslebodn]:

Is there any problem with Patch0003 and Patch0004?
They have not been pushed to git repo yet and ticket milestone is still set to "need triage".

Did I forgot to do any formal contribution step?

You didn't forget anything. We usually triage tickets weekly on Mondays, so we will be targeting a milestone for this ticket today.

I found an issue with patch 0003 (saslbind.c):

Looking at /usr/include/sasl/saslplug.h

typedef struct sasl_auxprop_plug:
...
...
void (auxprop_lookup)(void glob_context,
sasl_server_params_t sparams,
unsigned flags,
const char
user, unsigned ulen);

This is supposed to be a void return function, not an int. So on rhel6 think patch generates a compiler warning.

Same with F-18 - the auxprop_lookup function is void, not int

But looks like on F-19, they changed to int :P

Looks like we will need some sort of conditional compilation e.g.

if SASL_VERSION_FULL >= 20126

/ use int return /

else

/ use void return /

endif

Thank you very much for review.
I looked to the cyrus-sasl code and this change was introduced in 2.1.24 and SASL_AUXPROP_PLUG_VERSION was also changed from 4 -> 8

So I used SASL_AUXPROP_PLUG_VERSION in patch and not SASL_VERSION_FULL

I've combined all the patches. I had to do a little more work in cert.c as f19 uses a newer version of nss than rhel6. Final patch is out for review...

git merge ticket47440
Updating 904416f..29a1a2d
Fast-forward
include/base/ereport.h | 4 ++--
include/base/file.h | 2 +-
include/i18n.h | 6 +++---
include/libaccess/acl.h | 4 ++--
include/libaccess/aclerror.h | 2 +-
include/libaccess/aclproto.h | 4 ++--
include/libaccess/las.h | 2 +-
include/libaccess/nsautherr.h | 2 +-
include/libaccess/nserror.h | 2 +-
include/libaccess/symbols.h | 4 ++--
include/public/nsacl/aclapi.h | 9 +++++----
include/public/nsacl/acldef.h | 2 +-
.../plugins/posix-winsync/posix-group-func.c | 4 +---
.../plugins/replication/repl-session-plugin.h | 4 ----
ldap/servers/plugins/replication/winsync-plugin.h | 4 ----
ldap/servers/slapd/saslbind.c | 10 +++++++++-
ldap/servers/slapd/slapi-plugin.h | 17 ++++++-----------
lib/base/file.cpp | 4 ++--
lib/base/util.cpp | 10 +++++-----
lib/ldaputil/cert.c | 12 +++++++++---
lib/libaccess/acl.tab.cpp | 2 +-
lib/libaccess/aclerror.cpp | 4 ++--
lib/libaccess/acleval.cpp | 4 ++--
lib/libaccess/aclspace.cpp | 4 ++--
lib/libaccess/acltext.y | 2 +-
lib/libaccess/acltools.cpp | 10 +++++-----
lib/libaccess/lasip.cpp | 8 ++++----
lib/libaccess/nsautherr.cpp | 12 ++++++------
lib/libaccess/oneeval.cpp | 12 ++++++------
lib/libaccess/symbols.cpp | 4 ++--
lib/libadmin/error.c | 2 +-
lib/libsi18n/getstrprop.c | 12 ++++++------
32 files changed, 92 insertions(+), 92 deletions(-)

git push origin master
904416f..29a1a2d master -> master

commit 29a1a2d

1.3.1
45260ff..926cf1d 389-ds-base-1.3.1 -> 389-ds-base-1.3.1

Thanks again lslebodn for submitting the patches!

Server fails to start after applying the first patch(0001-Fix-compilation-warnings.patch​):

[30/Jul/2013:11:47:33 -0600] - Netscape Portable Runtime error -5977: /home/rich/389srv/lib/dirsrv/libns-dshttpd.so.0: undefined symbol: nserrGenerate
[30/Jul/2013:11:47:33 -0600] - Could not open library "/home/rich/389srv/lib/dirsrv/plugins/libacl-plugin.so" for plugin ACL Plugin
[30/Jul/2013:11:47:34 -0600] - Unable to load plugin "cn=ACL Plugin,cn=plugins,cn=config"

git merge ticket47440
Updating 29a1a2d..1cc8ede
Fast-forward
include/libaccess/aclproto.h | 2 +-
include/public/nsacl/aclapi.h | 2 +-
include/public/nsacl/nserrdef.h | 2 +-
ldap/servers/plugins/acl/acl.c | 19 ++++++++++---------
ldap/servers/plugins/acl/acl.h | 2 +-
ldap/servers/plugins/acl/aclutil.c | 2 +-
lib/libaccess/nseframe.cpp | 2 +-
lib/libaccess/register.cpp | 2 +-
8 files changed, 17 insertions(+), 16 deletions(-)

git push origin master
29a1a2d..1cc8ede master -> master

commit 1cc8ede

1.3.1

926cf1d..857029b 389-ds-base-1.3.1 -> 389-ds-base-1.3.1

Metadata Update from @lslebodn:
- Issue assigned to mreynolds
- Issue set to the milestone: 1.3.1.5

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/777

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

7 months ago

Login to comment on this ticket.

Metadata