1 Return-Path: <Vladimir.Marek@Oracle.COM>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id E8B8B414B8D
\r
6 for <notmuch@notmuchmail.org>; Mon, 9 Apr 2012 11:16:16 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-4.999 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_HI=-5, UNPARSEABLE_RELAY=0.001]
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id xvF+Ljw03T1D for <notmuch@notmuchmail.org>;
\r
17 Mon, 9 Apr 2012 11:16:16 -0700 (PDT)
\r
18 Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 5A4EF41735F
\r
22 for <notmuch@notmuchmail.org>; Mon, 9 Apr 2012 11:16:16 -0700 (PDT)
\r
23 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238])
\r
24 by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with
\r
25 ESMTP id q39IGEMf026954
\r
26 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
\r
27 for <notmuch@notmuchmail.org>; Mon, 9 Apr 2012 18:16:15 GMT
\r
28 Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158])
\r
29 by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
\r
31 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
\r
32 for <notmuch@notmuchmail.org>; Mon, 9 Apr 2012 18:16:14 GMT
\r
33 Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55])
\r
34 by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id
\r
36 for <notmuch@notmuchmail.org>; Mon, 9 Apr 2012 13:16:13 -0500
\r
37 Received: from pub.czech.sun.com (/10.163.20.32)
\r
38 by default (Oracle Beehive Gateway v4.0)
\r
39 with ESMTP ; Mon, 09 Apr 2012 11:16:13 -0700
\r
40 Date: Mon, 9 Apr 2012 20:15:43 +0200
\r
41 From: Vladimir Marek <Vladimir.Marek@Oracle.COM>
\r
42 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
43 Subject: Re: [PATCH 4/4] Explicitly type void* pointers
\r
44 Message-ID: <20120409181543.GC10554@pub.czech.sun.com>
\r
45 Mail-Followup-To: Notmuch Mail <notmuch@notmuchmail.org>
\r
46 References: <1333966665-10469-1-git-send-email-Vladimir.Marek@oracle.com>
\r
47 <1333966665-10469-5-git-send-email-Vladimir.Marek@oracle.com>
\r
48 <CAB+hUn_QyMAfC1-Dr23T63ObX=cwuBOzcyCi=61w0MtGRMyt2w@mail.gmail.com>
\r
50 Content-Type: text/plain; charset=utf-8
\r
51 Content-Disposition: inline
\r
53 <CAB+hUn_QyMAfC1-Dr23T63ObX=cwuBOzcyCi=61w0MtGRMyt2w@mail.gmail.com>
\r
54 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
55 X-Source-IP: acsinet22.oracle.com [141.146.126.238]
\r
56 X-CT-RefId: str=0001.0A090207.4F83276F.00EC,ss=1,re=0.000,fgs=0
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Mon, 09 Apr 2012 18:16:17 -0000
\r
73 > Hi, does notmuch not compile without this? IIRC talloc_steal is a macro
\r
74 > that's supposed to provide type safety (at least with GCC), and I'd be
\r
75 > hesitant about adding the casts. Please look in your talloc.h.
\r
77 It does not compile. It might be that I'm using Sun/Oracle CC instead of
\r
78 gcc. The error looks like this:
\r
80 "lib/database.cc", line 1368: Error: Cannot assign void* to const char*.
\r
83 When looking into talloc documentation, the definition seems to be:
\r
85 void* talloc_steal ( const void * new_ctx, const void * ptr )
\r
87 http://talloc.samba.org/talloc/doc/html/group__talloc.html#gaccc66139273e727183fb5bdda11ef82c
\r
90 When looking into talloc.h, it says:
\r
92 /* try to make talloc_set_destructor() and talloc_steal() type safe,
\r
93 if we have a recent gcc */
\r
95 So, maybe the way to satisfy everyone would be:
\r
97 notmuch_message_t *tmp_message = message;
\r
98 talloc_steal(notmuch, tmp_message);
\r
99 return(tmp_message);
\r
103 #if (__GNUC__ >= 3)
\r
104 return talloc_steal (notmuch, message);
\r
106 return (notmuch_message_t*) talloc_steal (notmuch, message);
\r
110 Of course I'm happy either way :)
\r