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 14EDA431FAF for ; Fri, 7 Jun 2013 11:41:33 -0700 (PDT) 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 eZS5IXdGlj5i for ; Fri, 7 Jun 2013 11:41:22 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 82301431FAE for ; Fri, 7 Jun 2013 11:41:22 -0700 (PDT) Received: by guru.guru-group.fi (Postfix, from userid 501) id 8D8DE1001F1; Fri, 7 Jun 2013 21:41:16 +0300 (EEST) From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH v2 1/1] cli: Guard deprecated g_type_init calls Date: Fri, 7 Jun 2013 21:41:13 +0300 Message-Id: <1370630473-2033-1-git-send-email-tomi.ollila@iki.fi> X-Mailer: git-send-email 1.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: tomi.ollila@iki.fi 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, 07 Jun 2013 18:41:33 -0000 g_type_init was deprecated in GLib 2.35.1. In order to compile cleanly, guard these with a suitable #if. (commit msg from https://bugs.freedesktop.org/attachment.cgi?id=73774 ) --- v2 of id:1370614090-1715-1-git-send-email-tomi.ollila@iki.fi database.cc was not caught by my naïve grep g_type_init **/*.c (have to learn git grep !) also added back one newline removed in v1 lib/database.cc | 2 ++ notmuch.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/database.cc b/lib/database.cc index 52ed618..5cc0765 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -649,7 +649,9 @@ notmuch_database_open (const char *path, } /* Initialize the GLib type system and threads */ +#if !GLIB_CHECK_VERSION(2, 35, 1) g_type_init (); +#endif /* Initialize gmime */ if (! initialized) { diff --git a/notmuch.c b/notmuch.c index 99ddd6d..45a73ce 100644 --- a/notmuch.c +++ b/notmuch.c @@ -291,7 +291,9 @@ main (int argc, char *argv[]) local = talloc_new (NULL); g_mime_init (0); +#if !GLIB_CHECK_VERSION(2, 35, 1) g_type_init (); +#endif /* Globally default to the current output format version. */ notmuch_format_version = NOTMUCH_FORMAT_CUR; -- 1.8.0