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 90221431FBC for ; Sat, 7 Mar 2015 08:42:54 -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 by14pzMuw6KE for ; Sat, 7 Mar 2015 08:42:51 -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 4777D431FAE for ; Sat, 7 Mar 2015 08:42:51 -0800 (PST) Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim 4.80) (envelope-from ) id 1YUHnk-0003jF-TM; Sat, 07 Mar 2015 16:42:08 +0000 Received: (nullmailer pid 16269 invoked by uid 1000); Sat, 07 Mar 2015 16:41:55 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 1/2] lib: define DEPRECATED macro, document its use. Date: Sat, 7 Mar 2015 17:41:47 +0100 Message-Id: <1425746508-16224-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 2.1.4 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 16:42:54 -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..fcd5e99 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 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: + + 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 3e326bf..5fb51ba 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -59,6 +59,8 @@ NOTMUCH_BEGIN_DECLS #define LIBNOTMUCH_MINOR_VERSION 1 #define LIBNOTMUCH_MICRO_VERSION 0 +#define DEPRECATED(major,minor) \ + __attribute__ ((deprecated ("function deprecated as of libnotmuch " #major "." #minor))) #endif /* __DOXYGEN__ */ /** -- 2.1.4