From 93582c071d2e66995e0d0da4478d1a4488607295 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 7 Mar 2015 20:22:58 +0100 Subject: [PATCH] [PATCH 1/5] lib: define NOTMUCH_DEPRECATED macro, document its use. --- 8c/a467d4a688241e5b015d5d341bd48571734c78 | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 8c/a467d4a688241e5b015d5d341bd48571734c78 diff --git a/8c/a467d4a688241e5b015d5d341bd48571734c78 b/8c/a467d4a688241e5b015d5d341bd48571734c78 new file mode 100644 index 000000000..6da921cb9 --- /dev/null +++ b/8c/a467d4a688241e5b015d5d341bd48571734c78 @@ -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 CDE59431FC4 + for ; Sat, 7 Mar 2015 11:24:35 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.438 +X-Spam-Level: ** +X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 Q98j08md+9QS for ; + Sat, 7 Mar 2015 11:24:35 -0800 (PST) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5B4F0431FAE + for ; Sat, 7 Mar 2015 11:24:35 -0800 (PST) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1YUKKH-0004DL-Hv; Sat, 07 Mar 2015 19:23:53 +0000 +Received: (nullmailer pid 28721 invoked by uid 1000); Sat, 07 Mar 2015 + 19:23:13 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 1/5] lib: define NOTMUCH_DEPRECATED macro, document its use. +Date: Sat, 7 Mar 2015 20:22:58 +0100 +Message-Id: <1425756182-28468-2-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1425756182-28468-1-git-send-email-david@tethera.net> +References: <1425756182-28468-1-git-send-email-david@tethera.net> +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: Sat, 07 Mar 2015 19:24:35 -0000 + +This has been tested with gcc and clang. +--- + devel/STYLE | 10 ++++++++++ + doc/doxygen.cfg | 2 +- + lib/notmuch.h | 2 ++ + 3 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/devel/STYLE b/devel/STYLE +index 92de42c..24bd548 100644 +--- a/devel/STYLE ++++ b/devel/STYLE +@@ -93,3 +93,13 @@ libnotmuch conventions + + * Code which needs to be accessed from both the CLI and from + libnotmuch should be factored out into libutil (under util/). ++ ++* Deprecated functions should be marked with the NOTMUCH_DEPRECATED ++ macro which generates run time warnings with gcc and clang. In order ++ not to confuse doxygen this should go at the beginning of the ++ declaration like: ++ ++ NOTMUCH_DEPRECATED(major,minor) notmuch_status_t notmuch_dwim(void *arg); ++ ++ The @deprecated doxygen command can be used to generate markup in ++ the API docs. +diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg +index 42b6339..c033f34 100644 +--- a/doc/doxygen.cfg ++++ b/doc/doxygen.cfg +@@ -74,7 +74,7 @@ STRICT_PROTO_MATCHING = NO + GENERATE_TODOLIST = NO + GENERATE_TESTLIST = NO + GENERATE_BUGLIST = NO +-GENERATE_DEPRECATEDLIST= NO ++GENERATE_DEPRECATEDLIST= YES + ENABLED_SECTIONS = + MAX_INITIALIZER_LINES = 30 + SHOW_USED_FILES = NO +diff --git a/lib/notmuch.h b/lib/notmuch.h +index f0b60b8..5352479 100644 +--- a/lib/notmuch.h ++++ b/lib/notmuch.h +@@ -59,6 +59,8 @@ NOTMUCH_BEGIN_DECLS + #define LIBNOTMUCH_MINOR_VERSION 2 + #define LIBNOTMUCH_MICRO_VERSION 0 + ++#define NOTMUCH_DEPRECATED(major,minor) \ ++ __attribute__ ((deprecated ("function deprecated as of libnotmuch " #major "." #minor))) + #endif /* __DOXYGEN__ */ + + /** +-- +2.1.4 + -- 2.26.2