From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4681 invoked by alias); 29 Feb 2012 16:17:54 -0000 Received: (qmail 4662 invoked by uid 22791); 29 Feb 2012 16:17:52 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Feb 2012 16:17:39 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1TGHckK020568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Feb 2012 11:17:38 -0500 Received: from hit-nxdomain.opendns.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q1TGHb0j003932 for ; Wed, 29 Feb 2012 11:17:38 -0500 Subject: [PATCH 04/14] -Wmissing-prototypes: Python. To: gdb-patches@sourceware.org From: Pedro Alves Date: Wed, 29 Feb 2012 16:18:00 -0000 Message-ID: <20120229161737.23918.81678.stgit@hit-nxdomain.opendns.com> In-Reply-To: <20120229161628.23918.51354.stgit@hit-nxdomain.opendns.com> References: <20120229161628.23918.51354.stgit@hit-nxdomain.opendns.com> User-Agent: StGit/0.15 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00706.txt.bz2 ../../src/gdb/python/py-breakpoint.c:720:1: warning: no previous prototype for ‘gdbpy_should_stop’ [-Wmissing-prototypes] ../../src/gdb/python/py-breakpoint.c:767:1: warning: no previous prototype for ‘gdbpy_breakpoint_has_py_cond’ [-Wmissing-prototypes] ../../src/gdb/python/py-continueevent.c:25:1: warning: no previous prototype for ‘create_continue_event_object’ [-Wmissing-prototypes] ../../src/gdb/python/py-lazy-string.c:88:1: warning: no previous prototype for ‘stpy_get_type’ [-Wmissing-prototypes] ../../src/gdb/python/py-newobjfileevent.c:25:1: warning: no previous prototype for ‘create_new_objfile_event_object’ [-Wmissing-prototypes] ../../src/gdb/python/py-utils.c:143:1: warning: no previous prototype for ‘unicode_to_target_python_string’ [-Wmissing-prototypes] ../../src/gdb/python/py-value.c:165:1: warning: no previous prototype for ‘preserve_python_values’ [-Wmissing-prototypes] Most are obvious, and I think including the public "python.h" in py-breakpoint.c and py-value.c is the right thing to do, given that the functions in question are indeed public and to be used by core gdb. 2012-02-29 Pedro Alves * python/py-breakpoint.c: Include python.h. * python/py-continueevent.c (create_continue_event_object): Make static. * python/py-lazy-string.c (stpy_get_type): Make static. * python/py-newobjfileevent.c (create_new_objfile_event_object): Make static. * python/py-utils.c (unicode_to_target_python_string): Make static. * python/py-value.c: Include python.h. --- gdb/python/py-breakpoint.c | 1 + gdb/python/py-continueevent.c | 2 +- gdb/python/py-lazy-string.c | 2 +- gdb/python/py-newobjfileevent.c | 2 +- gdb/python/py-utils.c | 2 +- gdb/python/py-value.c | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c index 195ed2b..c13fb95 100644 --- a/gdb/python/py-breakpoint.c +++ b/gdb/python/py-breakpoint.c @@ -21,6 +21,7 @@ #include "value.h" #include "exceptions.h" #include "python-internal.h" +#include "python.h" #include "charset.h" #include "breakpoint.h" #include "gdbcmd.h" diff --git a/gdb/python/py-continueevent.c b/gdb/python/py-continueevent.c index 4582fb5..2a1524e 100644 --- a/gdb/python/py-continueevent.c +++ b/gdb/python/py-continueevent.c @@ -21,7 +21,7 @@ static PyTypeObject continue_event_object_type; -PyObject * +static PyObject * create_continue_event_object (void) { return create_thread_event_object (&continue_event_object_type); diff --git a/gdb/python/py-lazy-string.c b/gdb/python/py-lazy-string.c index 11048b3..3c90829 100644 --- a/gdb/python/py-lazy-string.c +++ b/gdb/python/py-lazy-string.c @@ -84,7 +84,7 @@ stpy_get_length (PyObject *self, void *closure) return PyLong_FromLong (self_string->length); } -PyObject * +static PyObject * stpy_get_type (PyObject *self, void *closure) { lazy_string_object *str_obj = (lazy_string_object *) self; diff --git a/gdb/python/py-newobjfileevent.c b/gdb/python/py-newobjfileevent.c index 1e26b04..d014be6 100644 --- a/gdb/python/py-newobjfileevent.c +++ b/gdb/python/py-newobjfileevent.c @@ -21,7 +21,7 @@ static PyTypeObject new_objfile_event_object_type; -PyObject * +static PyObject * create_new_objfile_event_object (struct objfile *objfile) { PyObject *objfile_event; diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c index bf50e37..d5d0e431 100644 --- a/gdb/python/py-utils.c +++ b/gdb/python/py-utils.c @@ -139,7 +139,7 @@ unicode_to_target_string (PyObject *unicode_str) object converted to the target's charset. If an error occurs during the conversion, NULL will be returned and a python exception will be set. */ -PyObject * +static PyObject * unicode_to_target_python_string (PyObject *unicode_str) { return unicode_to_encoded_python_string (unicode_str, diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index 760360e..44443e0 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -28,6 +28,7 @@ #include "infcall.h" #include "expression.h" #include "cp-abi.h" +#include "python.h" #ifdef HAVE_PYTHON