From cb8aa7a7fd2272b4699fea4d22ee4c19500e6d4c Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 17 Feb 2014 09:16:25 -0500 Subject: Cast away type-mismatches calling xdr_free() (static analysis) --- src/nis.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/nis.c b/src/nis.c index f44065e..82b4c63 100644 --- a/src/nis.c +++ b/src/nis.c @@ -85,7 +85,7 @@ nis_domain(struct plugin_state *state, } map_unlock(); done_with_lock: - xdr_free((xdrproc_t)xdr_string, &domain); + xdr_free((xdrproc_t)xdr_string, (char *) &domain); } else { slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, @@ -150,7 +150,7 @@ nis_match(struct plugin_state *state, (*reply_fn)(state, cdata, reply, reply_xdrs); map_unlock(); done_with_lock: - xdr_free((xdrproc_t)xdr_ypreq_key, &req_key); + xdr_free((xdrproc_t)xdr_ypreq_key, (char *) &req_key); } else { /* XXX */ } @@ -211,7 +211,7 @@ nis_first(struct plugin_state *state, (*reply_fn)(state, cdata, reply, reply_xdrs); map_unlock(); done_with_lock: - xdr_free((xdrproc_t)xdr_ypreq_nokey, &req_nokey); + xdr_free((xdrproc_t)xdr_ypreq_nokey, (char *) &req_nokey); } else { /* XXX */ } @@ -300,7 +300,7 @@ nis_next(struct plugin_state *state, (*reply_fn)(state, cdata, reply, reply_xdrs); map_unlock(); done_with_lock: - xdr_free((xdrproc_t)xdr_ypreq_key, &req_key); + xdr_free((xdrproc_t)xdr_ypreq_key, (char *) &req_key); } else { /* XXX */ } @@ -369,7 +369,7 @@ nis_master(struct plugin_state *state, (*reply_fn)(state, cdata, reply, reply_xdrs); map_unlock(); done_with_lock: - xdr_free((xdrproc_t)xdr_ypreq_nokey, &req_nokey); + xdr_free((xdrproc_t)xdr_ypreq_nokey, (char *) &req_nokey); } else { /* XXX */ } @@ -420,7 +420,7 @@ nis_order(struct plugin_state *state, (*reply_fn)(state, cdata, reply, reply_xdrs); map_unlock(); done_with_lock: - xdr_free((xdrproc_t)xdr_ypreq_nokey, &req_nokey); + xdr_free((xdrproc_t)xdr_ypreq_nokey, (char *) &req_nokey); } else { /* XXX */ } @@ -512,7 +512,7 @@ nis_maplist(struct plugin_state *state, nis_free_maplist_cb_result(&cbdata); map_unlock(); done_with_lock: - xdr_free((xdrproc_t)xdr_string, &domain); + xdr_free((xdrproc_t)xdr_string, (char *) &domain); } else { /* XXX */ } @@ -940,7 +940,7 @@ nis_all(struct plugin_state *state, } map_unlock(); done_with_lock: - xdr_free((xdrproc_t)xdr_ypreq_nokey, &req_nokey); + xdr_free((xdrproc_t)xdr_ypreq_nokey, (char *) &req_nokey); /* Return the cookie if we can, else destroy it. */ if (continuation_cookie) { *continuation_cookie = cookie; @@ -1246,7 +1246,7 @@ sent_reply: xdr_destroy(&reply_xdrs); done: - xdr_free((xdrproc_t)xdr_callmsg, &request); + xdr_free((xdrproc_t)xdr_callmsg, (char *) &request); xdr_destroy(&request_xdrs); return; } -- cgit