From: Jani Nikula Date: Fri, 17 Jan 2014 16:21:05 +0000 (+0200) Subject: [PATCH] lib: fix clang compiler warning X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e9adffc50e5db68bcb7c999ecad50185aced1655;p=notmuch-archives.git [PATCH] lib: fix clang compiler warning --- diff --git a/62/f7fd3205b9b6d833fca9c6ac941d581fb85c88 b/62/f7fd3205b9b6d833fca9c6ac941d581fb85c88 new file mode 100644 index 000000000..ca883e971 --- /dev/null +++ b/62/f7fd3205b9b6d833fca9c6ac941d581fb85c88 @@ -0,0 +1,86 @@ +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 6FF4B431FBC + for ; Fri, 17 Jan 2014 08:21:15 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 PX+kUzqR4IcJ for ; + Fri, 17 Jan 2014 08:21:09 -0800 (PST) +Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com + [74.125.83.50]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + BA033431FB6 for ; Fri, 17 Jan 2014 08:21:08 -0800 + (PST) +Received: by mail-ee0-f50.google.com with SMTP id d17so2204775eek.37 + for ; Fri, 17 Jan 2014 08:21:07 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id; + bh=qg6eYdNMaJR+3/6JErpKwi1+X56xhm2zNwOf9XbG0Kk=; + b=VHxhz5PEpN/fIHtahcBd5Lg+t0FBMsTxrOctjW2Hyo9wP7yMgJrjIt8rduOuafz+1S + SCqvavgx+StIRFu4gcHbZoijnJi3GkBDoWoV9zDNbQ73kHRRXcWCYrpyL/C7Rrn1eimZ + hbUo8GfNW1+sD6Bf8y14JaMxWmZ9zK4ykCUMaJjMNOu46f4ppyGq+59HqZtVN0aZVq4n + p5t0VsamHqse0dSlO6cXJBQ0rp1p3gUT4mpae+MGIJ80tp+VxkpdlNcvX/fbQWsXeGbr + 95A4T4uB0VdZoShauPgr1nT2MRH8o9REPWQk9Jzs3Txvy1RtC/jwyGmoveZK+0/TmSB/ + OjAg== +X-Gm-Message-State: + ALoCoQnQZD8aUmFBLQPhka0YBh1SmrZ4lqnew2gvwfSIl0+hpjwukvbXK18rGiqIxziQciHI/UjD +X-Received: by 10.15.26.6 with SMTP id m6mr3555799eeu.80.1389975667683; + Fri, 17 Jan 2014 08:21:07 -0800 (PST) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id v7sm28087011eel.2.2014.01.17.08.21.06 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Fri, 17 Jan 2014 08:21:06 -0800 (PST) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH] lib: fix clang compiler warning +Date: Fri, 17 Jan 2014 18:21:05 +0200 +Message-Id: <1389975665-13962-1-git-send-email-jani@nikula.org> +X-Mailer: git-send-email 1.8.5.2 +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: Fri, 17 Jan 2014 16:21:15 -0000 + +With some combination of clang and talloc, not using the return value +of talloc_steal() produces a warning. Ignore it, as talloc_steal() has +no failure modes per documentation. +--- + lib/thread.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/thread.cc b/lib/thread.cc +index 4dcf705..8f53e12 100644 +--- a/lib/thread.cc ++++ b/lib/thread.cc +@@ -524,7 +524,7 @@ _notmuch_thread_create (void *ctx, + _resolve_thread_relationships (thread); + + /* Commit to returning thread. */ +- talloc_steal (ctx, thread); ++ (void) talloc_steal (ctx, thread); + + DONE: + talloc_free (local); +-- +1.8.5.2 +