diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-01-29 16:42:24 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-02-01 15:23:34 +0100 |
commit | 331505f09d61cdc5c920293fc36ac1853235177b (patch) | |
tree | 91b63710499120a8437a67696bdb4fd9d0e89227 /source4 | |
parent | 07b06e51bbf95168899081ba2aa92a4e6a5bac12 (diff) | |
download | samba-331505f09d61cdc5c920293fc36ac1853235177b.tar.gz samba-331505f09d61cdc5c920293fc36ac1853235177b.tar.bz2 samba-331505f09d61cdc5c920293fc36ac1853235177b.zip |
s4:NBT-WINSREPLICATION: fix compiler warnings
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/nbt/winsreplication.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c index 6d75aac80e..a693f2490a 100644 --- a/source4/torture/nbt/winsreplication.c +++ b/source4/torture/nbt/winsreplication.c @@ -1147,7 +1147,8 @@ static bool test_conflict_same_owner(struct torture_context *tctx, wins_name_cur->id = ++ctx->a.max_version; if (wins_name_cur->flags & 2) { wins_name_cur->addresses.addresses.num_ips = records[i].num_ips; - wins_name_cur->addresses.addresses.ips = discard_const(records[i].ips); + wins_name_cur->addresses.addresses.ips = discard_const_p(struct wrepl_ip, + records[i].ips); } else { wins_name_cur->addresses.ip = records[i].ips[0].ip; } @@ -4830,7 +4831,8 @@ static bool test_conflict_different_owner(struct torture_context *tctx, wins_name_r1->id = ++records[i].r1.owner->max_version; if (wins_name_r1->flags & 2) { wins_name_r1->addresses.addresses.num_ips = records[i].r1.num_ips; - wins_name_r1->addresses.addresses.ips = discard_const(records[i].r1.ips); + wins_name_r1->addresses.addresses.ips = discard_const_p(struct wrepl_ip, + records[i].r1.ips); } else { wins_name_r1->addresses.ip = records[i].r1.ips[0].ip; } @@ -4852,7 +4854,8 @@ static bool test_conflict_different_owner(struct torture_context *tctx, wins_name_r2->id = ++records[i].r2.owner->max_version; if (wins_name_r2->flags & 2) { wins_name_r2->addresses.addresses.num_ips = records[i].r2.num_ips; - wins_name_r2->addresses.addresses.ips = discard_const(records[i].r2.ips); + wins_name_r2->addresses.addresses.ips = discard_const_p(struct wrepl_ip, + records[i].r2.ips); } else { wins_name_r2->addresses.ip = records[i].r2.ips[0].ip; } @@ -4929,7 +4932,8 @@ static bool test_conflict_different_owner(struct torture_context *tctx, WREPL_NODE_B, false); wins_name_r2->id = ++records[i].r2.owner->max_version; wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1); - wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1); + wins_name_r2->addresses.addresses.ips = discard_const_p(struct wrepl_ip, + addresses_B_1); wins_name_r2->unknown = "255.255.255.255"; ret &= test_wrepl_update_one(tctx, ctx, records[i].r2.owner, wins_name_r2); ret &= test_wrepl_is_applied(tctx, ctx, records[i].r2.owner, wins_name_r2, true); @@ -4941,7 +4945,8 @@ static bool test_conflict_different_owner(struct torture_context *tctx, WREPL_NODE_B, false); wins_name_r2->id = ++records[i].r2.owner->max_version; wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1); - wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1); + wins_name_r2->addresses.addresses.ips = discard_const_p(struct wrepl_ip, + addresses_B_1); wins_name_r2->unknown = "255.255.255.255"; ret &= test_wrepl_update_one(tctx, ctx, records[i].r2.owner, wins_name_r2); ret &= test_wrepl_is_applied(tctx, ctx, records[i].r2.owner, wins_name_r2, true); @@ -6589,7 +6594,8 @@ static bool test_conflict_owned_released_vs_replica(struct torture_context *tctx wins_name->id = ++ctx->b.max_version; if (wins_name->flags & 2) { wins_name->addresses.addresses.num_ips = records[i].replica.num_ips; - wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips); + wins_name->addresses.addresses.ips = discard_const_p(struct wrepl_ip, + records[i].replica.ips); } else { wins_name->addresses.ip = records[i].replica.ips[0].ip; } @@ -9286,7 +9292,8 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx, wins_name->id = ++ctx->b.max_version; if (wins_name->flags & 2) { wins_name->addresses.addresses.num_ips = records[i].replica.num_ips; - wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips); + wins_name->addresses.addresses.ips = discard_const_p(struct wrepl_ip, + records[i].replica.ips); } else { wins_name->addresses.ip = records[i].replica.ips[0].ip; } @@ -9401,7 +9408,8 @@ static bool test_conflict_owned_active_vs_replica(struct torture_context *tctx, WREPL_NODE_B, false); wins_name->id = ++ctx->b.max_version; wins_name->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1); - wins_name->addresses.addresses.ips = discard_const(addresses_B_1); + wins_name->addresses.addresses.ips = discard_const_p(struct wrepl_ip, + addresses_B_1); wins_name->unknown = "255.255.255.255"; ret &= test_wrepl_update_one(tctx, ctx, &ctx->b, wins_name); ret &= test_wrepl_is_applied(tctx, ctx, &ctx->b, wins_name, true); |