summaryrefslogtreecommitdiff
path: root/lib/tdb2/test/run-tdb1-wronghash-fail.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-03-22 10:47:27 +1030
committerRusty Russell <rusty@rustcorp.com.au>2012-03-22 03:29:32 +0100
commit4816ffacb81d3234231730149c7b0629bb3646a4 (patch)
treef4c58312dfe25b31dd1a049a07a77b8c40503b64 /lib/tdb2/test/run-tdb1-wronghash-fail.c
parent4ea9f8d4c0d08343910d85f44eebdd2d7bff6571 (diff)
downloadsamba-4816ffacb81d3234231730149c7b0629bb3646a4.tar.gz
samba-4816ffacb81d3234231730149c7b0629bb3646a4.tar.bz2
samba-4816ffacb81d3234231730149c7b0629bb3646a4.zip
lib/tdb2: fix -Wcast-qual warnings.
We use tdb_mkdata() to get rid of many of them from the tests, and explicit cast_const() in a few places. tlist_for_each() still causes a warning, but that needs to be fixed in CCAN. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Thu Mar 22 03:29:32 CET 2012 on sn-devel-104
Diffstat (limited to 'lib/tdb2/test/run-tdb1-wronghash-fail.c')
-rw-r--r--lib/tdb2/test/run-tdb1-wronghash-fail.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/tdb2/test/run-tdb1-wronghash-fail.c b/lib/tdb2/test/run-tdb1-wronghash-fail.c
index 19f926c787..6a9dae3a70 100644
--- a/lib/tdb2/test/run-tdb1-wronghash-fail.c
+++ b/lib/tdb2/test/run-tdb1-wronghash-fail.c
@@ -58,8 +58,7 @@ int main(int argc, char *argv[])
O_CREAT|O_RDWR|O_TRUNC, 0600, &log_attr);
ok1(tdb);
ok1(log_count == 0);
- d.dptr = (void *)"Hello";
- d.dsize = 5;
+ d = tdb_mkdata("Hello", strlen("Hello"));
ok1(tdb_store(tdb, d, d, TDB_INSERT) == TDB_SUCCESS);
tdb_close(tdb);