1 Return-Path: <jan@ryngle.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 4DAFF431FBC
\r
6 for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 04:32:50 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id hr7zC58AVxQJ for <notmuch@notmuchmail.org>;
\r
11 Sun, 22 Nov 2009 04:32:50 -0800 (PST)
\r
12 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155])
\r
13 by olra.theworths.org (Postfix) with ESMTP id C3396431FAE
\r
14 for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 04:32:49 -0800 (PST)
\r
15 Received: by fg-out-1718.google.com with SMTP id 19so1817087fgg.2
\r
16 for <notmuch@notmuchmail.org>; Sun, 22 Nov 2009 04:32:47 -0800 (PST)
\r
17 Received: by 10.102.149.9 with SMTP id w9mr1655750mud.77.1258893167040;
\r
18 Sun, 22 Nov 2009 04:32:47 -0800 (PST)
\r
19 Received: from x61s.janakj (r2c34.net.upc.cz [62.245.66.34])
\r
20 by mx.google.com with ESMTPS id n10sm12765281mue.36.2009.11.22.04.32.46
\r
21 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
22 Sun, 22 Nov 2009 04:32:46 -0800 (PST)
\r
23 Received: by x61s.janakj (Postfix, from userid 1000)
\r
24 id 87E1E440651; Sun, 22 Nov 2009 13:32:36 +0100 (CET)
\r
25 From: Jan Janak <jan@ryngle.com>
\r
26 To: notmuch@notmuchmail.org
\r
27 Date: Sun, 22 Nov 2009 13:32:36 +0100
\r
28 Message-Id: <1258893156-25849-1-git-send-email-jan@ryngle.com>
\r
29 X-Mailer: git-send-email 1.6.3.3
\r
30 Subject: [notmuch] [PATCH] notmuch-new: Eliminate gcc warning caused by
\r
32 X-BeenThere: notmuch@notmuchmail.org
\r
33 X-Mailman-Version: 2.1.12
\r
35 List-Id: "Use and development of the notmuch mail system."
\r
36 <notmuch.notmuchmail.org>
\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
38 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
40 List-Post: <mailto:notmuch@notmuchmail.org>
\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
44 X-List-Received-Date: Sun, 22 Nov 2009 12:32:50 -0000
\r
46 The function passed to scandir in the fourth argument takes two
\r
47 const void* arguments. To eliminate the gcc warning about incompatible
\r
48 types, we change ino_cmp to match this and then re-type the parameters
\r
49 in the body of ino_cmp.
\r
51 Signed-off-by: Jan Janak <jan@ryngle.com>
\r
53 notmuch-new.c | 5 +++--
\r
54 1 files changed, 3 insertions(+), 2 deletions(-)
\r
56 diff --git a/notmuch-new.c b/notmuch-new.c
\r
57 index 0dd2784..6db3d0f 100644
\r
60 @@ -75,9 +75,10 @@ add_files_print_progress (add_files_state_t *state)
\r
64 -static int ino_cmp(const struct dirent **a, const struct dirent **b)
\r
65 +static int ino_cmp(const void *a, const void *b)
\r
67 - return ((*a)->d_ino < (*b)->d_ino) ? -1 : 1;
\r
68 + return ((*(const struct dirent**)a)->d_ino <
\r
69 + (*(const struct dirent**)b)->d_ino) ? -1 : 1;
\r
72 /* Examine 'path' recursively as follows:
\r