diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-01-13 14:03:04 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-01-13 14:03:04 -0500 |
commit | 6b3661116e7b01676299710a96f47fe06bafacec (patch) | |
tree | 1621afc14fec5aac9658efed6174dc2f82c5a9f5 | |
parent | 6c2659886f7018fcca26ee0fc813bc9748fb8513 (diff) | |
download | binutils-gdb-6b3661116e7b01676299710a96f47fe06bafacec.tar.gz |
gdb: add declaration to Python init function
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
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/python/python.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a9db32253da..f2992f17844 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2020-01-13 Simon Marchi <simon.marchi@efficios.com> + * python/python.c (init__gdb_module): Add declaration. + +2020-01-13 Simon Marchi <simon.marchi@efficios.com> + * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Add declaration. * aarch64-fbsd-tdep.c (_initialize_aarch64_fbsd_tdep): Add declaration. * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Add declaration. diff --git a/gdb/python/python.c b/gdb/python/python.c index f7aadb1633c..e0c05f1d068 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1555,6 +1555,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) { |