windows-nat.c: Fix bad initialization of ptid
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 10 Apr 2017 03:14:36 +0000 (23:14 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 10 Apr 2017 03:14:57 +0000 (23:14 -0400)
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
gdb/windows-nat.c

index 01c4c70b53f9550263b2577da0b7ae13ecdd856f..f08f5201d1c175723fb1b3d1d26ab08d0d3faddb 100644 (file)
@@ -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.
index ec0ae0691cc84badd9bd5ed5d92420f9c644802e..21b5ebefd8df017d0cc66dfaa11e3c28afb6e5ae 100644 (file)
@@ -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))
This page took 0.031357 seconds and 4 git commands to generate.