From: Tom Tromey <tom@tromey.com>
To: Pedro Alves <palves@redhat.com>
Cc: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Fix 8.2 regression in gdb.python/py-evthreads.exp w/ gdbserver (PR gdb/23379)
Date: Sat, 25 Aug 2018 14:52:00 -0000 [thread overview]
Message-ID: <874lfi1osj.fsf@tromey.com> (raw)
In-Reply-To: <c0056bd9-edeb-ea24-e616-897ad547466e@redhat.com> (Pedro Alves's message of "Fri, 24 Aug 2018 20:44:13 +0100")
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> * python/py-threadevent.c (get_event_thread): Rename to ...
Pedro> (py_get_event_thread): ... this, make extern, add 'ptid' parameter
I get this warning now:
../../binutils-gdb/gdb/python/py-threadevent.c: In function ‘PyObject* py_get_event_thread(ptid_t)’:
../../binutils-gdb/gdb/python/py-threadevent.c:39:3: warning: ‘pythread’ may be used uninitialized in this function [-Wmaybe-uninitialized]
... which seems legitimate to me:
PyObject *pythread;
if (non_stop)
{
thread_info *thread = find_thread_ptid (ptid);
if (thread != nullptr)
pythread = (PyObject *) thread_to_thread_object (thread);
// ... else pythread is uninitialized ...
}
pythread should be set to nullptr where I stuck the comment (or
initialized to nullptr).
Tom
next prev parent reply other threads:[~2018-08-25 14:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-24 17:46 [PATCH] " Pedro Alves
2018-08-24 18:53 ` Simon Marchi
2018-08-24 19:44 ` [PATCH v2] " Pedro Alves
2018-08-24 19:47 ` Pedro Alves
2018-08-24 20:06 ` Simon Marchi
2018-08-24 22:13 ` [pushed] gdb/python: Use copy-initialization more when possible Pedro Alves
2018-08-24 20:02 ` [PATCH v2] Fix 8.2 regression in gdb.python/py-evthreads.exp w/ gdbserver (PR gdb/23379) Simon Marchi
2018-08-25 14:52 ` Tom Tromey [this message]
2018-08-25 15:56 ` Simon Marchi
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=874lfi1osj.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=simon.marchi@ericsson.com \
/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).