Bug 5913 - Build failure: Mismatching function declarations for ldb_search
Build failure: Mismatching function declarations for ldb_search
Product: Samba 3.2
Classification: Unclassified
Component: Build environment
x86 Linux
: P3 normal
: ---
Assigned To: Samba Bugzilla Account
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2008-11-21 04:52 UTC by Steven Don
Modified: 2009-01-01 15:11 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Steven Don 2008-11-21 04:52:36 UTC
With a vanilla 3.2.4 source tree downloaded directly from samba.org, there is a difference in function declarations for ldb_search.

The declaration with the definition at source/lib/ldb/common/ldb.c:754 names the last parameter "_res" (leading underscore).

The declaration at source/lib/include/ldb.h:994 names the last parameter "res".

This causes a build error with at least GCC 4.2.2 that I'm using. Simply changing the name of the parameter in the ldb.h file to match the ldb.c file allows the build to proceed.

Perhaps (?probably?) there is a GCC switch that ignores the actual names of the parameters and does type checking only, but it is apparently not enabled.
Comment 1 Volker Lendecke 2009-01-01 15:11:31 UTC
Pushed the change to all branches.