From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/python] Fix cpychecker error in pspy_solib_name
Date: Thu, 04 Oct 2018 18:08:00 -0000 [thread overview]
Message-ID: <20181004180825.GA24019@delia> (raw)
Hi,
When using cpychecker, we run into:
...
gdb/python/py-progspace.c: \
In function âPyObject* pspy_solib_name(PyObject*, PyObject*)â:
gdb/python/py-progspace.c:370:25: error: Mismatching type in call to \
PyArg_ParseTuple with format code "K" [-Werror]
if (!PyArg_ParseTuple (args, GDB_PY_LLU_ARG, &pc))
argument 3 ("&pc") had type
"gdb_py_longest *" (pointing to 64 bits)
but was expecting
"long long unsigned int *" (pointing to 64 bits)
for format code "K"
...
Fix this fixing the type of the variable.
Build and reg-tested on x86_64-linux.
OK for trunk?
Thanks,
- Tom
[gdb/python] Fix cpychecker error in pspy_solib_name
2018-10-04 Tom de Vries <tdevries@suse.de>
* python/py-progspace.c (pspy_solib_name): Fix type mismatch in
PyArg_ParseTuple call.
---
gdb/python/py-progspace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c
index 1e16b845e0..6395d5bb15 100644
--- a/gdb/python/py-progspace.c
+++ b/gdb/python/py-progspace.c
@@ -362,7 +362,7 @@ static PyObject *
pspy_solib_name (PyObject *o, PyObject *args)
{
char *soname;
- gdb_py_longest pc;
+ gdb_py_ulongest pc;
pspace_object *self = (pspace_object *) o;
PSPY_REQUIRE_VALID (self);
next reply other threads:[~2018-10-04 18:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 18:08 Tom de Vries [this message]
2018-10-04 22:13 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181004180825.GA24019@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).