* [PATCH obv] windows-nat.c: Fix bad initialization of ptid
@ 2017-04-10 3:17 Simon Marchi
0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2017-04-10 3:17 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
FYI, I pushed this as obvious.
When trying to build for x86_64-w64-mingw32:
/home/simark/src/binutils-gdb/gdb/windows-nat.c: In function âvoid windows_detach(target_ops*, const char*, int)â:
/home/simark/src/binutils-gdb/gdb/windows-nat.c:1915:20: error: converting to âptid_tâ from initializer list would use explicit constructor âconstexpr ptid_t::ptid_t(int, long int, long int)â
ptid_t ptid = {-1};
^
Fixed by initializing ptid with the minus_one_ptid variable.
gdb/ChangeLog:
* windows-nat.c (windows_detach): Initialize ptid with
minus_one_ptid.
---
gdb/ChangeLog | 5 +++++
gdb/windows-nat.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 01c4c70b53..f08f5201d1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * windows-nat.c (windows_detach): Initialize ptid with
+ minus_one_ptid.
+
2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
* unittests/ptid-selftests.c: Fix erroneous assert messages.
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index ec0ae0691c..21b5ebefd8 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -1912,7 +1912,7 @@ windows_detach (struct target_ops *ops, const char *args, int from_tty)
{
int detached = 1;
- ptid_t ptid = {-1};
+ ptid_t ptid = minus_one_ptid;
windows_resume (ops, ptid, 0, GDB_SIGNAL_0);
if (!DebugActiveProcessStop (current_event.dwProcessId))
--
2.12.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-10 3:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 3:17 [PATCH obv] windows-nat.c: Fix bad initialization of ptid Simon Marchi
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).