This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[obv/commit] Fix build breakage from last commit (window-nat.c:windows_create_inferior)
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Wed, 12 Apr 2017 01:19:30 -0400
- Subject: [obv/commit] Fix build breakage from last commit (window-nat.c:windows_create_inferior)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sergiodj at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3FC377AEA4
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3FC377AEA4
- References: <87o9w2z068.fsf@redhat.com>
Forgot to declare the variable 'toexec' (from
window-nat.c:windows_create_inferior) as 'const char *', which caused
a build breakage.
gdb/ChangeLog:
2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
* windows-nat.c (windows_create_inferior): Declare 'toexec' as
'const char *'.
---
gdb/ChangeLog | 5 +++++
gdb/windows-nat.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c8f1bcf..087c0735 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
+ * windows-nat.c (windows_create_inferior): Declare 'toexec' as
+ 'const char *'.
+
+2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
+
* common/common-utils.c (free_vector_argv): New function.
* common/common-utils.h: Include <vector>.
(free_vector_argv): New prototype.
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index dd5cfe4..d9a4f0a 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2432,7 +2432,7 @@ windows_create_inferior (struct target_ops *ops, const char *exec_file,
#else /* !__CYGWIN__ */
char real_path[__PMAX];
char shell[__PMAX]; /* Path to shell */
- char *toexec;
+ const char *toexec;
const char *allargs = origallargs.c_str ();
char *args, *allargs_copy;
size_t args_len, allargs_len;
--
2.9.3