Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 06B54431FAE for ; Tue, 9 Feb 2010 06:40:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.17 X-Spam-Level: X-Spam-Status: No, score=-1.17 tagged_above=-999 required=5 tests=[AWL=-0.986, BAYES_40=-0.185, WEIRD_PORT=0.001] autolearn=no Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DtX33tobIGFe for ; Tue, 9 Feb 2010 06:40:06 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 3EA17431FBC for ; Tue, 9 Feb 2010 06:40:06 -0800 (PST) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id 2C4A019F33CB; Tue, 9 Feb 2010 15:40:05 +0100 (CET) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id 4ikEI12pgVL5; Tue, 9 Feb 2010 15:40:00 +0100 (CET) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id E5CF219F338C; Tue, 9 Feb 2010 15:40:00 +0100 (CET) Received: from steelpick.localdomain (k335-30.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id A7722FA003; Tue, 9 Feb 2010 15:40:00 +0100 (CET) Received: from wsh by steelpick.localdomain with local (Exim 4.71) (envelope-from ) id 1NerFw-0004aO-Cu; Tue, 09 Feb 2010 15:40:00 +0100 From: Michal Sojka To: Carl Worth , notmuch@notmuchmail.org In-Reply-To: <87eikvpfzl.fsf@yoom.home.cworth.org> References: <87mxzjpl9v.fsf@yoom.home.cworth.org> <87eikvpfzl.fsf@yoom.home.cworth.org> Date: Tue, 09 Feb 2010 15:40:00 +0100 Message-ID: <87r5oua2wv.fsf@steelpick.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [notmuch] [PATCH] Switch from random to sequential thread identifiers. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2010 14:40:08 -0000 On Mon, 08 Feb 2010 13:36:14 -0800, Carl Worth wrote: > The sequential identifiers have the advantage of being guaranteed to > be unique (until we overflow a 64-bit unsigned integer), and also take > up half as much space in the "notmuch search" output (16 columns > rather than 32). > [...] On amd64 I get: lib/database.cc: In function =E2=80=98const char* _notmuch_database_generat= e_thread_id(notmuch_database_t*)=E2=80=99: lib/database.cc:1309: warning: format =E2=80=98%016llx=E2=80=99 expects typ= e =E2=80=98long long unsigned int=E2=80=99, but argument 3 has type =E2=80= =98uint64_t=E2=80=99 What about the following? This could also fix Sebastian's problem. ---- 8< ---- >From afcc07ae03ae40cf7e1c33d8632fba0a9fc0b4c8 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 9 Feb 2010 15:35:39 +0100 Subject: [PATCH] Suppress warning on amd64 --- lib/database.cc | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 8641321..20a4c72 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -26,6 +26,9 @@ #include #include +#define __STDC_FORMAT_MACROS +#include + #include /* g_free, GPtrArray, GHashTable */ using namespace std; @@ -1306,7 +1309,7 @@ _notmuch_database_generate_thread_id (notmuch_databas= e_t *notmuch) notmuch->last_thread_id++; - sprintf (thread_id, "%016llx", notmuch->last_thread_id); + sprintf (thread_id, "%016"PRIx64, notmuch->last_thread_id); db->set_metadata ("last_thread_id", thread_id);