From 229f8b324a0f4a77eed5ef5fcdf87a3758a50d66 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 29 Oct 2014 14:18:38 +0100 Subject: dns: Fix a compile warning by casting explicitly Signed-off-by: Kai Blin Reviewed-by: Jeremy Allison --- source4/dns_server/dns_query.c | 2 +- source4/dns_server/dns_update.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/dns_server') diff --git a/source4/dns_server/dns_query.c b/source4/dns_server/dns_query.c index b57cdb8bc70..16e14c1b86b 100644 --- a/source4/dns_server/dns_query.c +++ b/source4/dns_server/dns_query.c @@ -328,7 +328,7 @@ static WERROR handle_question(struct dns_server *dns, continue; } if ((question->question_type != DNS_QTYPE_ALL) && - (recs[ri].wType != question->question_type)) { + (recs[ri].wType != (enum dns_record_type) question->question_type)) { werror_return = WERR_OK; continue; } diff --git a/source4/dns_server/dns_update.c b/source4/dns_server/dns_update.c index 04e7d9adff7..b18c3c5ab0c 100644 --- a/source4/dns_server/dns_update.c +++ b/source4/dns_server/dns_update.c @@ -103,7 +103,7 @@ static WERROR check_one_prerequisite(struct dns_server *dns, W_ERROR_NOT_OK_RETURN(werror); for (i = 0; i < acount; i++) { - if (ans[i].wType == pr->rr_type) { + if (ans[i].wType == (enum dns_record_type) pr->rr_type) { found = true; break; } @@ -145,7 +145,7 @@ static WERROR check_one_prerequisite(struct dns_server *dns, } for (i = 0; i < acount; i++) { - if (ans[i].wType == pr->rr_type) { + if (ans[i].wType == (enum dns_record_type) pr->rr_type) { found = true; break; } @@ -309,7 +309,7 @@ static WERROR dns_rr_to_dnsp(TALLOC_CTX *mem_ctx, ZERO_STRUCTP(r); - r->wType = rrec->rr_type; + r->wType = (enum dns_record_type) rrec->rr_type; r->dwTtlSeconds = rrec->ttl; r->rank = DNS_RANK_ZONE; @@ -605,7 +605,7 @@ static WERROR handle_one_update(struct dns_server *dns, } } for (i = first; i < rcount; i++) { - if (recs[i].wType == update->rr_type) { + if (recs[i].wType == (enum dns_record_type) update->rr_type) { recs[i] = (struct dnsp_DnssrvRpcRecord) { .wType = DNS_TYPE_TOMBSTONE, }; -- cgit v1.2.1