NO-JIRA: fix compiler "unused variable" error in release builds
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/ab43cf19 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/ab43cf19 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/ab43cf19 Branch: refs/heads/master Commit: ab43cf19d5d26b7b57e982332fbe4355caaf70a8 Parents: e39ef7b Author: Alan Conway <acon...@redhat.com> Authored: Fri May 18 10:05:49 2018 -0400 Committer: Alan Conway <acon...@redhat.com> Committed: Thu May 24 14:49:32 2018 -0400 ---------------------------------------------------------------------- src/policy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/ab43cf19/src/policy.c ---------------------------------------------------------------------- diff --git a/src/policy.c b/src/policy.c index b1a231d..ae93c18 100644 --- a/src/policy.c +++ b/src/policy.c @@ -840,9 +840,8 @@ bool qd_policy_host_pattern_add(qd_policy_t *policy, char *hostPattern) void *oldp = qd_parse_tree_add_pattern_str(policy->hostname_tree, hostPattern, hostPattern); if (oldp) { void *recovered = qd_parse_tree_add_pattern_str(policy->hostname_tree, (char *)oldp, oldp); - if (!recovered) { - assert (recovered); - } + assert (recovered); + (void)recovered; /* Silence compiler complaints of unused variable */ } sys_mutex_unlock(policy->tree_lock); if (oldp) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org