From patchwork Mon Nov 25 05:26:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 36182 Received: (qmail 61212 invoked by alias); 25 Nov 2019 05:33:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 61179 invoked by uid 89); 25 Nov 2019 05:33:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail.efficios.com Received: from mail.efficios.com (HELO mail.efficios.com) (167.114.142.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Nov 2019 05:33:32 +0000 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id C5735347556 for ; Mon, 25 Nov 2019 00:27:20 -0500 (EST) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id JjHAhlea45-f; Mon, 25 Nov 2019 00:27:20 -0500 (EST) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 964CA347504; Mon, 25 Nov 2019 00:27:17 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 964CA347504 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1574659637; bh=+Y2YSsdp540QVG4cAzpO+uzT1mFBZA0bIwnNpuIspQc=; h=From:To:Date:Message-Id:MIME-Version; b=OufbAHMOmjuhhOX/bH4sIf9pwjh5qhxozoxxhIAVzzobOfWN59LtLCobe9mqpMULK pa+w+JZ/OYbG0XItIr/xeDw5z3e+JnRD9A0rYD3F9vn9Eqr5EwSlvfHakbLIWGT790 aTAZlIdy+c+my9tP8KhwqQG1/Bagtp8ViJEdrr3cQxImNJcJnK2webcZrLr0m7N3l4 nShIKpp4H9utWoJO4JEOZqqpXKtWbh6UYqOc8o2uQhliuIid3ktD+6aIMW6m3YfRfT 861hRnsuBAAfRFzzrYy+pqM6xfornLXBQezotIJBjpTdj6VugkX02TaZLfgPkGo5mI zHBn1NR/dMGsw== Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id PcNeEjWzCkER; Mon, 25 Nov 2019 00:27:17 -0500 (EST) Received: from smarchi-efficios.lan (unknown [192.222.164.54]) by mail.efficios.com (Postfix) with ESMTPSA id 151C23474B2; Mon, 25 Nov 2019 00:27:11 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 09/15] Add declaration to python init func Date: Mon, 25 Nov 2019 00:26:49 -0500 Message-Id: <20191125052655.22696-10-simon.marchi@efficios.com> In-Reply-To: <20191125052655.22696-1-simon.marchi@efficios.com> References: <20191125052655.22696-1-simon.marchi@efficios.com> MIME-Version: 1.0 When I try to enable -Wmissing-declarations, I get this error: CXX python/python.o /home/smarchi/src/binutils-gdb/gdb/python/python.c: In function ‘PyObject* init__gdb_module()’: /home/smarchi/src/binutils-gdb/gdb/python/python.c:1582:1: error: no previous declaration for ‘PyObject* init__gdb_module()’ [-Werror=missing-declarations] init__gdb_module (void) ^~~~~~~~~~~~~~~~ Prevent it by providing a declaration just before the definition. gdb/ChangeLog: * python/python.c (init__gdb_module): Add declaration. Change-Id: I394bc691b7db624708cc4cb2cda28a56ab85a82b --- gdb/python/python.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdb/python/python.c b/gdb/python/python.c index fd33399318e2..f3e2abe37ac7 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1578,6 +1578,7 @@ finalize_python (void *ignore) /* This is called via the PyImport_AppendInittab mechanism called during initialization, to make the built-in _gdb module known to Python. */ +PyMODINIT_FUNC init__gdb_module (void); PyMODINIT_FUNC init__gdb_module (void) {