From f6592c427dbcc347ec7752c8182029a3ba937fbd Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 26 Jul 2012 08:37:43 +0200 Subject: s3:smbd: fix compiler warnings in notify_internal.c metze --- source3/smbd/notify_internal.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c index 49d1b06fbf..938c57b574 100644 --- a/source3/smbd/notify_internal.c +++ b/source3/smbd/notify_internal.c @@ -560,6 +560,7 @@ static bool notify_pull_remote_blob(TALLOC_CTX *mem_ctx, struct notify_remote_event *ev; enum ndr_err_code ndr_err; DATA_BLOB data; + char *p; data.data = discard_const_p(uint8_t, blob); data.length = blob_len; @@ -581,7 +582,8 @@ static bool notify_pull_remote_blob(TALLOC_CTX *mem_ctx, } *paction = ev->action; *pfilter = ev->filter; - *path = talloc_move(mem_ctx, (char **)&ev->path); + p = discard_const_p(char, ev->path); + *path = talloc_move(mem_ctx, &p); TALLOC_FREE(ev); return true; @@ -621,7 +623,7 @@ void notify_trigger(struct notify_context *notify, dbwrap_parse_record( notify->db_index, - make_tdb_data((uint8_t *)path, path_len), + make_tdb_data(discard_const_p(uint8_t, path), path_len), notify_trigger_index_parser, &idx_state); if (!idx_state.found_my_vnn) { @@ -692,7 +694,7 @@ static void notify_trigger_local(struct notify_context *notify, status = dbwrap_fetch( notify->db_notify, talloc_tos(), - make_tdb_data((uint8_t *)path, path_len), &data); + make_tdb_data(discard_const_p(uint8_t, path), path_len), &data); if (!NT_STATUS_IS_OK(status)) { DEBUG(10, ("dbwrap_fetch returned %s\n", nt_errstr(status))); -- cgit