From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 64B4F6DE0BA5 for ; Fri, 16 Jun 2017 15:50:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.247 X-Spam-Level: X-Spam-Status: No, score=-0.247 tagged_above=-999 required=5 tests=[AWL=0.064, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.211, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6qIJBeK3uuQw for ; Fri, 16 Jun 2017 15:50:36 -0700 (PDT) Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by arlo.cworth.org (Postfix) with ESMTPS id 5578F6DE0927 for ; Fri, 16 Jun 2017 15:50:36 -0700 (PDT) Received: by mail-wr0-f195.google.com with SMTP id x23so7809750wrb.0 for ; Fri, 16 Jun 2017 15:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WgXhr0rkwl3vWyGV3w4omUSYjgMckP4DWopjvJdUywI=; b=iX6r3iUFWJi+4Y+Jt4zI18Gk7stlvN0KhIpJqj/brJDMeIcz9+m0z8OCUTi3tNcyC+ WUpQI2Ru7ZutXl1bE21aX++wstTiJQr5bKSv3A3tavlbWSDCKfwFQTfP+04gGRB3QENa tgz4wbhhnqb06mPc+TP4U1Q17x4OFlQMXAvMGcAR7KlBWWQgo3lYTVe476jhTUxHdkNR usuaiWOChdzHziGUmS0aAb8aDKNYmF2k9ZpJGqmGlByg57B48l0jQ8yEII/2XvdfICan AQxh1BMz9lewquAawp7fNlsgMyEV82GnKJYjdcQ+Fi8qteAh3JUzvQj9Ge6MLdEjr0KX KMeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WgXhr0rkwl3vWyGV3w4omUSYjgMckP4DWopjvJdUywI=; b=Cakp74WU0TVr6K++5aUQkYP5R0MA1Y2i0W432OytfNX2lo5VbtCm35o45sc8tLSpQ4 WENT1HZlte2Q4LSdsh8Sr8/aJ342yzXJqay1s0w4kuGAzW+tqM+ArhkxO8YJ11+sJOf+ mYESavsUmHGC2MKeKeb9OVT6zL3XrrvwfRrMaTvOXcJbL2pkVv0sO4Etp/acPMWabEOs 6KQoVSJj6xuhof2L/o734i32iBi8tQhRnb7+MWz1d/AUAqVwhTT56Yogpx1PMwXDj5XX JWMAcUSzBKfs7vKwzl0yMw+cV5x9pJYDiYOsYtAbM/i9ynTSbs0pBUwCl6Y/jo912rYZ yIHg== X-Gm-Message-State: AKS2vOxFG9ystSUxLEoiJTtnd1bcxOCCv7O5VQ6bP2rOCqN+IUyVwtJB qUnpHNsln5xsfjHB X-Received: by 10.223.171.226 with SMTP id s89mr6596779wrc.38.1497653434781; Fri, 16 Jun 2017 15:50:34 -0700 (PDT) Received: from sparkmobile.lan (209.166.93.209.dyn.plus.net. [209.93.166.209]) by smtp.gmail.com with ESMTPSA id y17sm4441851wrb.39.2017.06.16.15.50.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Jun 2017 15:50:34 -0700 (PDT) From: Piotr Trojanek To: notmuch@notmuchmail.org Subject: [PATCH 4/5] fix wrong printf formatting of signed/unsigned integers Date: Fri, 16 Jun 2017 23:50:25 +0100 Message-Id: <20170616225026.8098-4-piotr.trojanek@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170616225026.8098-1-piotr.trojanek@gmail.com> References: <20170616225026.8098-1-piotr.trojanek@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Fri, 16 Jun 2017 22:50:37 -0000 --- notmuch-count.c | 2 +- notmuch-new.c | 4 ++-- notmuch-reply.c | 2 +- notmuch-show.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git notmuch-count.c notmuch-count.c index a05b430d..50b0c193 100644 --- notmuch-count.c +++ notmuch-count.c @@ -111,7 +111,7 @@ print_count (notmuch_database_t *notmuch, const char *query_str, case OUTPUT_FILES: count = count_files (query); if (count >= 0) { - printf ("%u", count); + printf ("%d", count); } else { ret = -1; goto DONE; diff --git notmuch-new.c notmuch-new.c index 4d40f3d0..3a60f7ca 100644 --- notmuch-new.c +++ notmuch-new.c @@ -131,10 +131,10 @@ generic_print_progress (const char *action, const char *object, elapsed_overall = notmuch_time_elapsed (tv_start, tv_now); rate_overall = processed / elapsed_overall; - printf ("%s %d ", action, processed); + printf ("%s %u ", action, processed); if (total) { - printf ("of %d %s", total, object); + printf ("of %u %s", total, object); if (processed > 0 && elapsed_overall > 0.5) { double time_remaining = ((total - processed) / rate_overall); printf (" ("); diff --git notmuch-reply.c notmuch-reply.c index b88f1d31..e6c16641 100644 --- notmuch-reply.c +++ notmuch-reply.c @@ -635,7 +635,7 @@ static int do_reply(notmuch_config_t *config, return 1; if (count != 1) { - fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count); + fprintf (stderr, "Error: search term did not match precisely one message (matched %u messages).\n", count); return 1; } diff --git notmuch-show.c notmuch-show.c index accea48a..3ce4b63c 100644 --- notmuch-show.c +++ notmuch-show.c @@ -902,7 +902,7 @@ do_show_single (void *ctx, return 1; if (count != 1) { - fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count); + fprintf (stderr, "Error: search term did not match precisely one message (matched %u messages).\n", count); return 1; } -- 2.11.0