The branch, master has been updated
via 3aa6f08 build: Add more -Werror flags now the tree is clean of
these errors
via d6f47bd s4-torture: Fix format string errors found by -Werror=format
via ea6b8ee lib/tdb: Fix format string errors found by -Werror=format
in tdb tests
via 17bddd1 lib/ntdb: Fix format string errors found by -Werror=format
in ntdb tests
via 5b4792d lib/ccan: Fix format string errors found by -Werror=format
in ccan failtest
via 0f21fe7 auth/kerberos: Do not do pointer arithmatic on a void *
from 2dfb2a4 s4-samba-tool ldapcmp: Fix synopsis
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3aa6f085c22ce33ead23f7ebb604be5525759eee
Author: Andrew Bartlett <[email protected]>
Date: Mon Jul 30 13:40:57 2012 +1000
build: Add more -Werror flags now the tree is clean of these errors
Autobuild-User(master): Andrew Bartlett <[email protected]>
Autobuild-Date(master): Mon Jul 30 08:23:24 CEST 2012 on sn-devel-104
commit d6f47bd5a36dab6c338bac2874e81c1a3480990d
Author: Andrew Bartlett <[email protected]>
Date: Mon Jul 30 14:05:50 2012 +1000
s4-torture: Fix format string errors found by -Werror=format
commit ea6b8ee026a4c53d9dfb5a42e4d9e485b89018e3
Author: Andrew Bartlett <[email protected]>
Date: Mon Jul 30 13:40:37 2012 +1000
lib/tdb: Fix format string errors found by -Werror=format in tdb tests
commit 17bddd15de8420629b91f02869fa99880cd80bca
Author: Andrew Bartlett <[email protected]>
Date: Mon Jul 30 13:40:19 2012 +1000
lib/ntdb: Fix format string errors found by -Werror=format in ntdb tests
commit 5b4792d9d29ce27a5e69aedf0fcb65373e8aae31
Author: Andrew Bartlett <[email protected]>
Date: Mon Jul 30 13:39:41 2012 +1000
lib/ccan: Fix format string errors found by -Werror=format in ccan failtest
commit 0f21fe7666b1c265d8144ed975140b67e764835e
Author: Andrew Bartlett <[email protected]>
Date: Mon Jul 30 13:22:16 2012 +1000
auth/kerberos: Do not do pointer arithmatic on a void *
Found with -Werror=pointer-arith
Andrew Bartlett
-----------------------------------------------------------------------
Summary of changes:
auth/kerberos/gssapi_pac.c | 2 +-
buildtools/wafsamba/samba_autoconf.py | 2 +-
lib/ccan/failtest/failtest.c | 4 ++--
lib/ntdb/test/api-check-callback.c | 2 +-
lib/tdb/test/run-transaction-expand.c | 8 ++++----
source4/torture/rpc/fsrvp.c | 12 ++++++------
6 files changed, 15 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/auth/kerberos/gssapi_pac.c b/auth/kerberos/gssapi_pac.c
index a174052..99181a1 100644
--- a/auth/kerberos/gssapi_pac.c
+++ b/auth/kerberos/gssapi_pac.c
@@ -266,7 +266,7 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
gss_maj = gss_release_buffer_set(&gss_min, &set);
return NT_STATUS_OK;
}
- p = set->elements[1].value + gse_sesskeytype_oid.length;
+ p = (uint8_t *)set->elements[1].value +
gse_sesskeytype_oid.length;
diflen = set->elements[1].length - gse_sesskeytype_oid.length;
if (diflen <= 0) {
gss_maj = gss_release_buffer_set(&gss_min, &set);
diff --git a/buildtools/wafsamba/samba_autoconf.py
b/buildtools/wafsamba/samba_autoconf.py
index 3e4b06a..cfab476 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -622,7 +622,7 @@ 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 -Wstrict-prototypes -Wpointer-arith
-Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -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
-Werror=format -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
diff --git a/lib/ccan/failtest/failtest.c b/lib/ccan/failtest/failtest.c
index 71fcff3..7915a92 100644
--- a/lib/ccan/failtest/failtest.c
+++ b/lib/ccan/failtest/failtest.c
@@ -1259,7 +1259,7 @@ static ssize_t failtest_add_read(int fd, void *buf,
size_t count, off_t off,
set_cleanup(p, cleanup_read, struct read_call);
}
}
- trace("%sread %s:%u fd %i %zu@%llu -> %i\n",
+ trace("%sread %s:%u fd %i %zu@%llu -> %zd\n",
is_pread ? "p" : "", file, line, fd, count, (long long)off,
p->u.read.ret);
errno = p->error;
@@ -1361,7 +1361,7 @@ static ssize_t failtest_add_write(int fd, const void *buf,
else
p->u.write.ret = write(fd, buf, count);
}
- trace("%swrite %s:%i %zu@%llu on fd %i -> %i\n",
+ trace("%swrite %s:%i %zu@%llu on fd %i -> %zd\n",
p->u.write.is_pwrite ? "p" : "",
file, line, count, (long long)off, fd, p->u.write.ret);
errno = p->error;
diff --git a/lib/ntdb/test/api-check-callback.c
b/lib/ntdb/test/api-check-callback.c
index 0263f61..b5ca8a0 100644
--- a/lib/ntdb/test/api-check-callback.c
+++ b/lib/ntdb/test/api-check-callback.c
@@ -27,7 +27,7 @@ static enum NTDB_ERROR check(NTDB_DATA key,
int val;
if (key.dsize != sizeof(val)) {
- diag("Wrong key size: %u\n", key.dsize);
+ diag("Wrong key size: %zu\n", key.dsize);
return NTDB_ERR_CORRUPT;
}
diff --git a/lib/tdb/test/run-transaction-expand.c
b/lib/tdb/test/run-transaction-expand.c
index 7f7b3fc..1271d92 100644
--- a/lib/tdb/test/run-transaction-expand.c
+++ b/lib/tdb/test/run-transaction-expand.c
@@ -80,8 +80,8 @@ int main(int argc, char *argv[])
tdb_ofs_read(tdb, TDB_RECOVERY_HEAD, &off);
tdb_read(tdb, off, &rec, sizeof(rec), DOCONV());
- diag("TDB size = %zu, recovery = %u-%u",
- (size_t)tdb->map_size, off, off + sizeof(rec) + rec.rec_len);
+ diag("TDB size = %zu, recovery = %llu-%llu",
+ (size_t)tdb->map_size, (unsigned long long)off, (unsigned long
long)(off + sizeof(rec) + rec.rec_len));
/* We should only be about 5 times larger than largest record. */
ok1(tdb->map_size < 6 * i * getpagesize());
@@ -104,8 +104,8 @@ int main(int argc, char *argv[])
tdb_ofs_read(tdb, TDB_RECOVERY_HEAD, &off);
tdb_read(tdb, off, &rec, sizeof(rec), DOCONV());
- diag("TDB size = %zu, recovery = %u-%u",
- (size_t)tdb->map_size, off, off + sizeof(rec) + rec.rec_len);
+ diag("TDB size = %zu, recovery = %llu-%llu",
+ (size_t)tdb->map_size, (unsigned long long)off, (unsigned long
long)(off + sizeof(rec) + rec.rec_len));
/* We should only be about 4 times larger than largest record. */
ok1(tdb->map_size < 5 * i * getpagesize());
diff --git a/source4/torture/rpc/fsrvp.c b/source4/torture/rpc/fsrvp.c
index c13041f..8dac2b8 100644
--- a/source4/torture/rpc/fsrvp.c
+++ b/source4/torture/rpc/fsrvp.c
@@ -214,9 +214,9 @@ static bool test_fsrvp_sc_create(struct torture_context
*tctx,
"PrepareShadowCopySet failed");
torture_assert_int_equal(tctx, r_scset_prep.out.result, 0,
"failed PrepareShadowCopySet response");
- torture_comment(tctx, "%s: prepare completed in %lu secs\n",
+ torture_comment(tctx, "%s: prepare completed in %llu secs\n",
GUID_string(tmp_ctx,
r_scset_start.out.pShadowCopySetId),
- (uint64_t)(time_mono(NULL) - start_time));
+ (unsigned long long)(time_mono(NULL) - start_time));
start_time = time_mono(NULL);
ZERO_STRUCT(r_scset_commit);
@@ -227,9 +227,9 @@ static bool test_fsrvp_sc_create(struct torture_context
*tctx,
"CommitShadowCopySet failed");
torture_assert_int_equal(tctx, r_scset_commit.out.result, 0,
"failed CommitShadowCopySet response");
- torture_comment(tctx, "%s: commit completed in %lu secs\n",
+ torture_comment(tctx, "%s: commit completed in %llu secs\n",
GUID_string(tmp_ctx,
r_scset_start.out.pShadowCopySetId),
- (uint64_t)(time_mono(NULL) - start_time));
+ (unsigned long long)(time_mono(NULL) - start_time));
start_time = time_mono(NULL);
ZERO_STRUCT(r_scset_expose);
@@ -240,9 +240,9 @@ static bool test_fsrvp_sc_create(struct torture_context
*tctx,
"ExposeShadowCopySet failed");
torture_assert_int_equal(tctx, r_scset_expose.out.result, 0,
"failed ExposeShadowCopySet response");
- torture_comment(tctx, "%s: expose completed in %lu secs\n",
+ torture_comment(tctx, "%s: expose completed in %llu secs\n",
GUID_string(tmp_ctx,
r_scset_start.out.pShadowCopySetId),
- (uint64_t)(time_mono(NULL) - start_time));
+ (unsigned long long)(time_mono(NULL) - start_time));
ZERO_STRUCT(r_sharemap_get);
r_sharemap_get.in.ShadowCopyId = *r_scset_add.out.pShadowCopyId;
--
Samba Shared Repository