Bug 5913 - Build failure: Mismatching function declarations for ldb_search
Summary: Build failure: Mismatching function declarations for ldb_search
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.2.4
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-21 04:52 UTC by Steven Don
Modified: 2009-01-01 15:11 UTC (History)
0 users

See Also:


Attachments

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.

Thanks,

Volker