[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/5] Hurd, C++: Explicitly cast "void *"
From: |
Thomas Schwinge |
Subject: |
[PATCH 1/5] Hurd, C++: Explicitly cast "void *" |
Date: |
Thu, 8 Dec 2016 08:50:32 +0100 |
C++ doesn't do implicit type conversions from "void *", so we have to...
gdb/
* i386-gnu-nat.c (i386_gnu_dr_set_control_one)
(i386_gnu_dr_set_addr_one): Explicitly cast "void *".
---
gdb/ChangeLog | 5 +++++
gdb/i386-gnu-nat.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 61d1205..f68a787 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-08 Thomas Schwinge <thomas@codesourcery.com>
+
+ * i386-gnu-nat.c (i386_gnu_dr_set_control_one)
+ (i386_gnu_dr_set_addr_one): Explicitly cast "void *".
+
2016-12-07 Thomas Schwinge <thomas@codesourcery.com>
* gnu-nat.c (set_sig_thread_cmd): Call global_thread_id_to_ptid
diff --git a/gdb/i386-gnu-nat.c b/gdb/i386-gnu-nat.c
index e14a181..c6c53ca 100644
--- a/gdb/i386-gnu-nat.c
+++ b/gdb/i386-gnu-nat.c
@@ -307,7 +307,7 @@ i386_gnu_dr_set (const struct i386_debug_state *regs,
struct proc *thread)
static void
i386_gnu_dr_set_control_one (struct proc *thread, void *arg)
{
- unsigned long *control = arg;
+ unsigned long *control = (unsigned long *) arg;
struct i386_debug_state regs;
i386_gnu_dr_get (®s, thread);
@@ -337,7 +337,7 @@ struct reg_addr
static void
i386_gnu_dr_set_addr_one (struct proc *thread, void *arg)
{
- struct reg_addr *reg_addr = arg;
+ struct reg_addr *reg_addr = (struct reg_addr *) arg;
struct i386_debug_state regs;
i386_gnu_dr_get (®s, thread);
--
2.10.2
- Fix C++ compilation of the Hurd port, Thomas Schwinge, 2016/12/08
- [PATCH 1/5] Hurd, C++: Explicitly cast "void *",
Thomas Schwinge <=
- [PATCH 2/5] Hurd, C++: Avoid GNU C nested functions, Thomas Schwinge, 2016/12/08
- [PATCH 5/5] Hurd, C++: Mach/Hurd headers and MIG stubs are not yet fit for C++, Thomas Schwinge, 2016/12/08
- [PATCH 3/5] Hurd, C++: Avoid "const char *" to "char *" casts, Thomas Schwinge, 2016/12/08
- [PATCH 4/5] Hurd, C++: kern_return_t vs. error_t, Thomas Schwinge, 2016/12/08
- Re: Fix C++ compilation of the Hurd port, Luis Machado, 2016/12/23