[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Mon Aug 6 06:48:03 MDT 2012
The branch, master has been updated
via 4e0fb8b Revert "ldb: Add parameter to avoid NULL format string flagged by -Werror=format"
via 33c79c8 build: Make -Werror=format check only run where NULL is still accepted
via 0514a84 Rework recursive waf build to be a selftest-enabled not a developer build
via dd8c0e5 build: Remove duplicate declaration of --enable-selftest
via 49b2720 lib/param: Also enable vlp when --enable-selftest is specified
from 1c7bd2b s3:smbd: remove unused variable in sesssetup.c
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 4e0fb8b4b1b7eadf315aeb599a079eb1d22a4d22
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Aug 6 18:46:41 2012 +1000
Revert "ldb: Add parameter to avoid NULL format string flagged by -Werror=format"
This reverts commit cddcaf7bd2c272bc578ac1e4f7ec438ab94fc243.
-Werror=format is no longer uses when it would cause this to fail.
This is a legitimate use of the ldb_search API.
Andrew Bartlett
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Mon Aug 6 14:47:27 CEST 2012 on sn-devel-104
commit 33c79c8731ea0c1ab78583a7c50953c56aea539f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Aug 6 18:46:30 2012 +1000
build: Make -Werror=format check only run where NULL is still accepted
This is needed because ldb_search() allows a NULL parameter for the format string
and this needs to be permitted by the format string checker before we want to
make this error fatal.
Andrew Bartlett
commit 0514a84f7e7d44eae3c7fcc85fc804af6fbfda6b
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Aug 6 18:33:35 2012 +1000
Rework recursive waf build to be a selftest-enabled not a developer build
This essentially reverts commit a943a9ba2f739e8aee630f774915e8204aa8cf3a.
I've fixed this by making lib/param/parm_table.c honour --enable-selftest.
Andrew Bartlett
commit dd8c0e59a327c697e5f86a0fd3b18478c02c8c63
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Aug 6 18:32:32 2012 +1000
build: Remove duplicate declaration of --enable-selftest
commit 49b27203174647d66fbf6a35266d587cc9e2e5cc
Author: Andrew Bartlett <abartlet at samba.org>
Date: Mon Aug 6 18:32:21 2012 +1000
lib/param: Also enable vlp when --enable-selftest is specified
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_autoconf.py | 21 ++++++++++++++++++---
lib/ldb/ldb_map/ldb_map.c | 2 +-
lib/param/loadparm.h | 2 +-
lib/param/param_table.c | 2 +-
selftest/wscript | 4 ++++
source3/Makefile-smbtorture4 | 2 +-
source3/param/loadparm.c | 2 +-
source3/wscript | 3 ---
8 files changed, 27 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index cfab476..03c2b24 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -437,10 +437,10 @@ def CHECK_STRUCTURE_MEMBER(conf, structname, member,
@conf
-def CHECK_CFLAGS(conf, cflags):
+def CHECK_CFLAGS(conf, cflags, fragment='int main(void) { return 0; }\n'):
'''check if the given cflags are accepted by the compiler
'''
- return conf.check(fragment='int main(void) { return 0; }\n',
+ return conf.check(fragment=fragment,
execute=0,
type='nolink',
ccflags=cflags,
@@ -622,11 +622,26 @@ def SAMBA_CONFIG_H(conf, path=None):
if Options.options.developer:
# we add these here to ensure that -Wstrict-prototypes is not set during configure
- conf.ADD_CFLAGS('-Wall -g -Wshadow -Werror=strict-prototypes -Wstrict-prototypes -Werror=pointer-arith -Wpointer-arith -Wcast-align -Werror=write-strings -Wwrite-strings -Werror-implicit-function-declaration -Werror=format -Wformat=2 -Wno-format-y2k -Wmissing-prototypes -fno-common -Werror=address',
+ conf.ADD_CFLAGS('-Wall -g -Wshadow -Werror=strict-prototypes -Wstrict-prototypes -Werror=pointer-arith -Wpointer-arith -Wcast-align -Werror=write-strings -Wwrite-strings -Werror-implicit-function-declaration -Wformat=2 -Wno-format-y2k -Wmissing-prototypes -fno-common -Werror=address',
testflags=True)
conf.ADD_CFLAGS('-Wcast-qual', testflags=True)
conf.env.DEVELOPER_MODE = True
+ # This check is because for ldb_search(), a NULL format string
+ # is not an error, but some compilers complain about that.
+ if CHECK_CFLAGS(conf, "-Werror=format", '''
+int testformat(char *format, ...) __attribute__ ((format (__printf__, 1, 2)));
+
+int main(void) {
+ testformat(0);
+ return 0;
+}
+
+'''):
+ if not 'EXTRA_CFLAGS' in conf.env:
+ conf.env['EXTRA_CFLAGS'] = []
+ conf.env['EXTRA_CFLAGS'].extend(TO_LIST("-Werror=format"))
+
if Options.options.picky_developer:
conf.ADD_CFLAGS('-Werror', testflags=True)
diff --git a/lib/ldb/ldb_map/ldb_map.c b/lib/ldb/ldb_map/ldb_map.c
index af3d799..d35e5c6 100644
--- a/lib/ldb/ldb_map/ldb_map.c
+++ b/lib/ldb/ldb_map/ldb_map.c
@@ -1015,7 +1015,7 @@ static int map_init_dns(struct ldb_module *module, struct ldb_map_context *data,
return LDB_ERR_OPERATIONS_ERROR;
}
- ret = ldb_search(ldb, data, &res, dn, LDB_SCOPE_BASE, attrs, "(|(objectClass=*)(dn=*))");
+ ret = ldb_search(ldb, data, &res, dn, LDB_SCOPE_BASE, attrs, NULL);
talloc_free(dn);
if (ret != LDB_SUCCESS) {
return ret;
diff --git a/lib/param/loadparm.h b/lib/param/loadparm.h
index eb9c768..8c4a7b1 100644
--- a/lib/param/loadparm.h
+++ b/lib/param/loadparm.h
@@ -157,7 +157,7 @@ enum acl_compatibility {ACL_COMPAT_AUTO, ACL_COMPAT_WINNT, ACL_COMPAT_WIN2K};
enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX,
PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ,
PRINT_CUPS,PRINT_LPRNT,PRINT_LPROS2,PRINT_IPRINT
-#if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
+#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) || defined(ENABLE_BUILD_FARM_HACKS)
,PRINT_TEST,PRINT_VLP
#endif /* DEVELOPER */
};
diff --git a/lib/param/param_table.c b/lib/param/param_table.c
index a793695..ea0fa3d 100644
--- a/lib/param/param_table.c
+++ b/lib/param/param_table.c
@@ -190,7 +190,7 @@ static const struct enum_list enum_printing[] = {
{PRINT_IPRINT, "iprint"},
{PRINT_LPRNT, "nt"},
{PRINT_LPROS2, "os2"},
-#if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
+#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) || defined(ENABLE_BUILD_FARM_HACKS)
{PRINT_TEST, "test"},
{PRINT_VLP, "vlp"},
#endif /* DEVELOPER */
diff --git a/selftest/wscript b/selftest/wscript
index 6359e1a..0277eb5 100644
--- a/selftest/wscript
+++ b/selftest/wscript
@@ -77,6 +77,10 @@ def configure(conf):
conf.ADD_LDFLAGS('-lgcov', testflags=True)
conf.ADD_CFLAGS('--coverage')
+ if Options.options.enable_selftest or Options.options.developer:
+ conf.DEFINE('ENABLE_SELFTEST', 1)
+
+
def cmd_testonly(opt):
'''run tests without doing a build first'''
env = LOAD_ENVIRONMENT()
diff --git a/source3/Makefile-smbtorture4 b/source3/Makefile-smbtorture4
index 4a60a58..dbc0e6d 100644
--- a/source3/Makefile-smbtorture4
+++ b/source3/Makefile-smbtorture4
@@ -6,7 +6,7 @@ SAMBA4_BINARIES="smbtorture,ndrdump"
samba4-configure:
@(cd .. && \
CFLAGS='' $(WAF) reconfigure || \
- CFLAGS='' $(WAF) configure --enable-socket-wrapper --enable-nss-wrapper --enable-uid-wrapper --nonshared-binary=$(SAMBA4_BINARIES) --enable-auto-reconfigure --abi-check-disable --enable-developer)
+ CFLAGS='' $(WAF) configure --enable-selftest --nonshared-binary=$(SAMBA4_BINARIES) --enable-auto-reconfigure --enable-debug)
.PHONY: samba4-configure
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 59f74d7..dc23868 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -397,7 +397,7 @@ static void init_printer_values(struct loadparm_service *pService)
string_set(&pService->szPrintcommand, "lp -r -P%p %s");
break;
-#if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
+#if defined(DEVELOPER) || defined(ENABLE_SELFTEST) || defined(ENABLE_BUILD_FARM_HACKS)
case PRINT_TEST:
case PRINT_VLP: {
diff --git a/source3/wscript b/source3/wscript
index 0be9a43..7b45116 100755
--- a/source3/wscript
+++ b/source3/wscript
@@ -21,9 +21,6 @@ def set_options(opt):
opt.add_option('--with-shared-modules',
help=("Comma-separated list of names of modules to build shared"),
action="store", dest='shared_modules', default=None)
- opt.add_option('--enable-selftest',
- help=("enable options necessary for selftest"),
- action="store_true", dest='enable_selftest', default=False)
opt.SAMBA3_ADD_OPTION('winbind')
opt.SAMBA3_ADD_OPTION('swat')
--
Samba Shared Repository
More information about the samba-cvs
mailing list