Bug 1412250 - slapi_get_cacertfile() function declaration isn’t a prototype
Summary: slapi_get_cacertfile() function declaration isn’t a prototype
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: 389-ds-base
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-11 15:42 UTC by Christian Heimes
Modified: 2017-05-04 14:54 UTC (History)
7 users (show)

Fixed In Version: 389-ds-base-1.3.6.5-1.fc26
Clone Of:
Environment:
Last Closed: 2017-05-04 14:54:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christian Heimes 2017-01-11 15:42:47 UTC
Description of problem:
/usr/include/dirsrv/slapi-plugin.h contains an invalid function prototype

Version-Release number of selected component (if applicable):
389-ds-base-devel-1.3.5.15-1.fc25.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Compile any component that includes slapi-plugin.h, e.g. FreeIPA

Actual results:
make[4]: Entering directory '/usr/src/freeipa/daemons/ipa-slapi-plugins/ipa-lockout'
/bin/sh ../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../..  -I. -I./../common -I/usr/include/dirsrv -DPREFIX=\""/usr/local"\" -DBINDIR=\""/usr/local/bin"\" -DLIBDIR=\""/usr/local/lib"\" -DLIBEXECDIR=\""/usr/local/libexec"\" -DDATADIR=\""/usr/local/share"\"    -I/usr/include/nspr4 -I/usr/include/nss3 -I/usr/include/nspr4  -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Werror-implicit-function-declaration  -g -O2 -MT ipa_lockout.lo -MD -MP -MF .deps/ipa_lockout.Tpo -c -o ipa_lockout.lo ipa_lockout.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../.. -I. -I./../common -I/usr/include/dirsrv -DPREFIX=\"/usr/local\" -DBINDIR=\"/usr/local/bin\" -DLIBDIR=\"/usr/local/lib\" -DLIBEXECDIR=\"/usr/local/libexec\" -DDATADIR=\"/usr/local/share\" -I/usr/include/nspr4 -I/usr/include/nss3 -I/usr/include/nspr4 -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Werror-implicit-function-declaration -g -O2 -MT ipa_lockout.lo -MD -MP -MF .deps/ipa_lockout.Tpo -c ipa_lockout.c  -fPIC -DPIC -o .libs/ipa_lockout.o
In file included from ipa_lockout.c:50:0:
/usr/include/dirsrv/slapi-plugin.h:6292:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 const char * slapi_get_cacertfile();
 ^~~~~


Expected results:
No warning

Additional info:
The correct function prototype is
const char * slapi_get_cacertfile( void );

Comment 1 Rich Megginson 2017-01-11 16:13:39 UTC
I think this is not an openldap issue since you're using /usr/include/dirsrv/slapi-plugin.h which is a 389-ds-base-devel file.

Comment 2 Christian Heimes 2017-01-11 16:21:02 UTC
Ah, you are right. I selected the wrong component. Thanks Rich!

Comment 3 Noriko Hosoi 2017-01-11 17:11:24 UTC
Thanks, Christian!

The issue has been addressed and fixed in the master branch with this patch:

commit 5b0c9c0a90b73f0b1a200d9ccb1209ccc5dcd7e3
Author: Lukas Slebodnik <lslebodn>
Date:   Fri Sep 2 15:10:44 2016 +0000

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

The change is going to be in 389-ds-base-1.3.6 release.  So far, we have no plan to backport the patch to 1.3.5.  Is it ok with you or too late?

> $ egrep -B 1 slapi_get_cacertfile *.[ch]
> [...]
> slapi-plugin.h:const char * slapi_get_cacertfile(void);
> --
> ssl.c-const char *
> ssl.c:slapi_get_cacertfile()

Comment 4 Christian Heimes 2017-01-12 15:40:36 UTC
It's just a warning and it's not going to cause any trouble soon. I can wait for 1.3.6.


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