From c87a5363c14f9260fdae2953ab0698ad27d0133d Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Tue, 28 Oct 2014 09:15:28 +0000 Subject: [PATCH] Re: [PATCH] cli: cast timeval fields to long for format --- 72/de1e75bf17791f91aafb575bd655f3b83f98cd | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 72/de1e75bf17791f91aafb575bd655f3b83f98cd diff --git a/72/de1e75bf17791f91aafb575bd655f3b83f98cd b/72/de1e75bf17791f91aafb575bd655f3b83f98cd new file mode 100644 index 000000000..df2bdb418 --- /dev/null +++ b/72/de1e75bf17791f91aafb575bd655f3b83f98cd @@ -0,0 +1,103 @@ +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 863E3431FB6 + for ; Tue, 28 Oct 2014 02:15:42 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.699 +X-Spam-Level: +X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001] + autolearn=disabled +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 JO-1oRQBv-6v for ; + Tue, 28 Oct 2014 02:15:35 -0700 (PDT) +Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com + [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 4B5EB431FAE + for ; Tue, 28 Oct 2014 02:15:35 -0700 (PDT) +Received: by mail-wi0-f181.google.com with SMTP id n3so873139wiv.8 + for ; Tue, 28 Oct 2014 02:15:32 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:to:subject:in-reply-to:references:user-agent + :from:date:message-id:mime-version:content-type; + bh=DvV1lTTtdJ6R3wVD6Do+y9ZT8xMSQae8gq7xWUFzy2E=; + b=TgKuJMITD2sMvLbeGJ9K4kiN2dKLnb4rwjDBM6Lf8PO4XCtgIRLkGgf+6YF9ACjrBi + qUECZGPUAGwc63Zf0ZfjJVQivPB8q5p37c+ydYqLJSFdjWSWVq7WsxYp3+A/s+MDFjhG + P/iIB7Wf+LRC2U1jjnO0zzvun3kZvCDlXpLzpnThoMk8jDSyMlwSfPeJeGceqVfnuxJ8 + HCRAr6JmUbcXdSAjU1L/lJpQLXIPHJH9aevjMr1Tak6CxT+4d+xrL6dcy8DP7wxQW6oP + P/bJIHOhp3fIF/dtlxSx64WFo5iUOy6ZEOBYPmfn6A8zHrFV8Mx/8nAEUsUwXt24oc15 + ZUGA== +X-Gm-Message-State: + ALoCoQm+K/cpaht2f54Zr9miBu+4Oue1ruU5FiyodTput/sSwa8auLpKKYYkeC8PbttO3nT7fV4H +X-Received: by 10.194.122.104 with SMTP id lr8mr2551455wjb.28.1414487731605; + Tue, 28 Oct 2014 02:15:31 -0700 (PDT) +Received: from disaster-area.hh.sledj.net + ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) + by mx.google.com with ESMTPSA id mc4sm1468978wic.6.2014.10.28.02.15.30 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Tue, 28 Oct 2014 02:15:30 -0700 (PDT) +Received: from localhost (30000@localhost [local]); + by localhost (OpenSMTPD) with ESMTPA id 3dc128ec; + Tue, 28 Oct 2014 09:15:28 +0000 (UTC) +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH] cli: cast timeval fields to long for format +In-Reply-To: <1414484246-19659-1-git-send-email-jani@nikula.org> +References: <1414484246-19659-1-git-send-email-jani@nikula.org> +User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-apple-darwin14.0.0) +From: David Edmondson +Date: Tue, 28 Oct 2014 09:15:28 +0000 +Message-ID: +MIME-Version: 1.0 +Content-Type: text/plain +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, 28 Oct 2014 09:15:42 -0000 + +On Tue, Oct 28 2014, Jani Nikula wrote: +> This hides platform differences between struct timeval field types. + +Good for me. Tested on Debian Testing and OS X 10.10 (which previously +emitted a compiler warning). + +> --- +> notmuch-insert.c | 2 +- +> 1 files changed, 1 insertions(+), 1 deletions(-) +> +> diff --git a/notmuch-insert.c b/notmuch-insert.c +> index 7074077..0d2d810 100644 +> --- a/notmuch-insert.c +> +++ b/notmuch-insert.c +> @@ -197,7 +197,7 @@ tempfilename (const void *ctx) +> gettimeofday (&tv, NULL); +> +> filename = talloc_asprintf (ctx, "%ld.M%ldP%d.%s", +> - tv.tv_sec, tv.tv_usec, pid, hostname); +> + (long) tv.tv_sec, (long) tv.tv_usec, pid, hostname); +> if (! filename) +> fprintf (stderr, "Error: %s\n", strerror (ENOMEM)); +> +> -- +> 1.7.2.5 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2