From patchwork Tue Sep 18 17:11:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 184770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id F04202C0086 for ; Wed, 19 Sep 2012 03:11:43 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1348593104; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=r4zSlBQ24GrPrXvidXBmqtyPqKw=; b=Mzijxs7sThcyXRT owAKn6bQbAI+uTR/eITFoUs5nfydgMOE/csmVc2eUeS8iaBbsmecPzt+g+0yE70m mP2S2+3gsIikzA8AoGp/m478KmbfUpJb87shVaa+Jvoa5XW9aobnwQEX5+7c3+Nx 2gN1v12wtCQk5IEQRVie0PPyC+4Y= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=QYilB4pSxnF+1fce6chGZ73QFMZ69Q26GzdI3E8DT/Df1YICyT4DA5q2iHabF6 r3mBSWR1+oX+mx60zCCe3DFQZLLnJZffLOClhgZESSmXW9pdK569ph3/QrH9u5LD SQEf99PjmhTsUsWM+QERfGUipial1KQIBSuGXGLqo/z0o=; Received: (qmail 13322 invoked by alias); 18 Sep 2012 17:11:34 -0000 Received: (qmail 13305 invoked by uid 22791); 18 Sep 2012 17:11:33 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Sep 2012 17:11:19 +0000 Received: by pbcwy7 with SMTP id wy7so441686pbc.20 for ; Tue, 18 Sep 2012 10:11:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type:x-gm-message-state; bh=doWq1v4v1Iz9mMOrJga/s9jQmMyPB/53LIT4wQEjH3w=; b=JozuiTLckDT22UJ3/vpyqvv8s6VHTipv7nFieUtieVC4uh/NkOPmcxQNwNJsoiuE/T eOemNbvmbpwLVTaApCDjZcFp/KU7BU2cfvpNqgDVm6xaH2wKEKiTT+pL/+5r17A4irTa WtFutALuK/1kos5bqKp4BoVl5zJlwMw1Shdk53svCzGH9kwjheT/OUAkmzSwGL/jFPO2 vlqNbYeoeOPzBEAHsEDHYnKrIFl5pnu6rNYa1/3A6qs9B81v+ExkQyhpQCy0mg3+b2NG +BZI/TLJ2c1VJ/PY0yRnN+xE2qZWzzG6MSa0D2MRp8Yt/iH5/v++n2oVpQ80sWIixqp6 jQOg== Received: by 10.66.82.3 with SMTP id e3mr589036pay.56.1347988279241; Tue, 18 Sep 2012 10:11:19 -0700 (PDT) Received: by 10.66.82.3 with SMTP id e3mr589032pay.56.1347988279133; Tue, 18 Sep 2012 10:11:19 -0700 (PDT) Received: from coign.google.com ([2620:0:1000:2301:f2de:f1ff:fe40:72a8]) by mx.google.com with ESMTPS id ko8sm260720pbc.40.2012.09.18.10.11.16 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Sep 2012 10:11:16 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org Subject: libbacktrace patch committed: Mark test functions as unused Date: Tue, 18 Sep 2012 10:11:15 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQk0kj5mc8zKkdPYT6j4DVVJeUsJJxSEdQB0jG6w/Ex3dpLQcjMzJpUc+XEgxBxqFBeqzip9cJKz09u/93dweG8VNdn1ri5+vKzC/ZZ9Gh71fHvFdn8ap/ncCDpt11064oQXpe6/PZJwS13nw1SWycnUxCX/Az4WIAvCTFbok2WNGQYRhDJsXhQqHxbhVn5oJQDN+T3i4aG2ymQB+7vqUT0nNNKjfw== X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch to libbacktrace marks the test functions with the unused attribute. This avoids producing a compilation warning when building the test on a system that does not support libbacktrace. Bootstrapped and ran libbacktrace testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian 2012-09-18 Ian Lance Taylor * btest.c (test1, test2, test3, test4): Add the unused attribute. Index: btest.c =================================================================== --- btest.c (revision 191432) +++ btest.c (working copy) @@ -269,7 +269,7 @@ error_callback_three (void *vdata, const /* Test the backtrace function with non-inlined functions. */ -static int test1 (void) __attribute__ ((noinline)); +static int test1 (void) __attribute__ ((noinline, unused)); static int f2 (int) __attribute__ ((noinline)); static int f3 (int, int) __attribute__ ((noinline)); @@ -323,7 +323,7 @@ f3 (int f1line, int f2line) /* Test the backtrace function with inlined functions. */ -static inline int test2 (void) __attribute__ ((always_inline)); +static inline int test2 (void) __attribute__ ((always_inline, unused)); static inline int f12 (int) __attribute__ ((always_inline)); static inline int f13 (int, int) __attribute__ ((always_inline)); @@ -375,7 +375,7 @@ f13 (int f1line, int f2line) /* Test the backtrace_simple function with non-inlined functions. */ -static int test3 (void) __attribute__ ((noinline)); +static int test3 (void) __attribute__ ((noinline, unused)); static int f22 (int) __attribute__ ((noinline)); static int f23 (int, int) __attribute__ ((noinline)); @@ -524,7 +524,7 @@ f23 (int f1line, int f2line) /* Test the backtrace_simple function with inlined functions. */ -static inline int test4 (void) __attribute__ ((always_inline)); +static inline int test4 (void) __attribute__ ((always_inline, unused)); static inline int f32 (int) __attribute__ ((always_inline)); static inline int f33 (int, int) __attribute__ ((always_inline));