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 47396431FAF for ; Tue, 13 Nov 2012 18:10:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 T393sHGGfIch for ; Tue, 13 Nov 2012 18:10:16 -0800 (PST) Received: from foo.net (70-36-235-136.dsl.static.sonic.net [70.36.235.136]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2DFAF431FC9 for ; Tue, 13 Nov 2012 18:10:12 -0800 (PST) Received: from foo.net (localhost [127.0.0.1]) by foo.net (8.14.5+Sun/8.14.5) with ESMTP id qAE2AAWo018942; Tue, 13 Nov 2012 18:10:10 -0800 (PST) Received: (from blakej@localhost) by foo.net (8.14.5+Sun/8.14.5/Submit) id qAE2AAIX018935; Tue, 13 Nov 2012 18:10:10 -0800 (PST) From: Blake Jones To: notmuch@notmuchmail.org Subject: [PATCH v3 09/10] debugger.c: correct return type from getppid() (Solaris support) Date: Tue, 13 Nov 2012 18:10:04 -0800 Message-Id: <1352859005-18631-10-git-send-email-blakej@foo.net> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1352859005-18631-1-git-send-email-blakej@foo.net> References: <1352859005-18631-1-git-send-email-blakej@foo.net> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (foo.net [127.0.0.1]); Tue, 13 Nov 2012 18:10:10 -0800 (PST) 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: Wed, 14 Nov 2012 02:10:17 -0000 Cast the return value of getppid() to "int" from "pid_t" in debugger.c, since it is being passed to sprintf("%d"), which wants an "int" argument. On Solaris, "pid_t" is a "long" for 32-bit programs. --- debugger.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/debugger.c b/debugger.c index e8b9378..8ff13d6 100644 --- a/debugger.c +++ b/debugger.c @@ -36,7 +36,7 @@ debugger_is_active (void) if (RUNNING_ON_VALGRIND) return TRUE; - sprintf (buf, "/proc/%d/exe", getppid ()); + sprintf (buf, "/proc/%d/exe", (int) getppid ()); if (readlink (buf, buf, sizeof (buf)) != -1 && strncmp (basename (buf), "gdb", 3) == 0) { -- 1.7.3.2