<p><br>
Hi, does notmuch not compile without this? IIRC talloc_steal is a macro that's supposed to provide type safety (at least with GCC), and I'd be hesitant about adding the casts. Please look in your talloc.h.</p>
<p>BR,<br>
Jani.<br></p>
<p>On Apr 9, 2012 1:19 PM, <<a href="mailto:Vladimir.Marek@oracle.com">Vladimir.Marek@oracle.com</a>> wrote:<br>
><br>
> From: Vladimir Marek <<a href="mailto:vlmarek@volny.cz">vlmarek@volny.cz</a>><br>
><br>
><br>
> Signed-off-by: Vladimir Marek <<a href="mailto:vlmarek@volny.cz">vlmarek@volny.cz</a>><br>
> ---<br>
> lib/database.cc | 2 +-<br>
> lib/message.cc | 2 +-<br>
> lib/thread.cc | 2 +-<br>
> 3 files changed, 3 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/lib/database.cc b/lib/database.cc<br>
> index 16c4354..3c82632 100644<br>
> --- a/lib/database.cc<br>
> +++ b/lib/database.cc<br>
> @@ -1361,7 +1361,7 @@ _resolve_message_id_to_thread_id (notmuch_database_t *notmuch,<br>
> return status;<br>
><br>
> if (message) {<br>
> - *thread_id_ret = talloc_steal (ctx,<br>
> + *thread_id_ret = (const char*)talloc_steal (ctx,<br>
> notmuch_message_get_thread_id (message));<br>
><br>
> notmuch_message_destroy (message);<br>
> diff --git a/lib/message.cc b/lib/message.cc<br>
> index 0075425..d56d442 100644<br>
> --- a/lib/message.cc<br>
> +++ b/lib/message.cc<br>
> @@ -220,7 +220,7 @@ _notmuch_message_create_for_message_id (notmuch_database_t *notmuch,<br>
> message_id,<br>
> &message);<br>
> if (message)<br>
> - return talloc_steal (notmuch, message);<br>
> + return (notmuch_message_t*) talloc_steal (notmuch, message);<br>
> else if (*status_ret)<br>
> return NULL;<br>
><br>
> diff --git a/lib/thread.cc b/lib/thread.cc<br>
> index e976d64..d41ff3e 100644<br>
> --- a/lib/thread.cc<br>
> +++ b/lib/thread.cc<br>
> @@ -225,7 +225,7 @@ _thread_add_message (notmuch_thread_t *thread,<br>
> char *clean_author;<br>
><br>
> _notmuch_message_list_add_message (thread->message_list,<br>
> - talloc_steal (thread, message));<br>
> + (_notmuch_message*)talloc_steal (thread, message));<br>
> thread->total_messages++;<br>
><br>
> g_hash_table_insert (thread->message_hash,<br>
> --<br>
> 1.7.3.2<br>
><br>
> _______________________________________________<br>
> notmuch mailing list<br>
> <a href="mailto:notmuch@notmuchmail.org">notmuch@notmuchmail.org</a><br>
> <a href="http://notmuchmail.org/mailman/listinfo/notmuch">http://notmuchmail.org/mailman/listinfo/notmuch</a><br>
</p>