From 4816ffacb81d3234231730149c7b0629bb3646a4 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 22 Mar 2012 10:47:27 +1030 Subject: 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 Autobuild-User: Rusty Russell Autobuild-Date: Thu Mar 22 03:29:32 CET 2012 on sn-devel-104 --- lib/tdb2/test/run-tdb1-no-lock-during-traverse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/tdb2/test/run-tdb1-no-lock-during-traverse.c') diff --git a/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c b/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c index 7392d14875..127e69ad1c 100644 --- a/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c +++ b/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c @@ -22,8 +22,7 @@ static bool prepare_entries(struct tdb_context *tdb) for (i = 0; i < NUM_ENTRIES; i++) { key.dsize = sizeof(i); key.dptr = (void *)&i; - data.dsize = strlen("world"); - data.dptr = (void *)"world"; + data = tdb_mkdata("world", strlen("world")); if (tdb_store(tdb, key, data, 0) != TDB_SUCCESS) return false; -- cgit