From f515a1d643b599ebb8a23d3d95e9f0dfc8261a11 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 21 Jul 2016 13:02:34 +0100 Subject: Fix djgpp gdb build - A few missing casts required by C++, resulting in: ../../src/gdb/ser-go32.c:795:21: error: invalid conversion from 'const void*' to 'const char*' [-fpermissive] etc. - dos_noop has an incompatible prototype with struct serial_ops's setparity, resulting in: ../../src/gdb/ser-go32.c:874:1: error: invalid conversion from 'int (*)(serial*)' to 'int (*)(serial*, int)' [-fpermissive] (I thought of calling the ser-base.c default methods, but djgpp doesn't include ser-base.c in the build.) gdb/ChangeLog: 2016-07-21 Pedro Alves * go32-nat.c (go32_create_inferior): Add cast. * ser-go32.c (dos_noop): Delete. (dos_flush_output, dos_setparity, dos_drain_output): New functions. (dos_write): Add cast. (dos_ops): Use dos_flush_output, dos_setparity and dos_drain_output. * top.c (do_chdir_cleanup): Add cast. --- gdb/top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/top.c') diff --git a/gdb/top.c b/gdb/top.c index 3174f3c..d566677 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -470,7 +470,7 @@ void (*pre_init_ui_hook) (void); static void do_chdir_cleanup (void *old_dir) { - chdir (old_dir); + chdir ((const char *) old_dir); xfree (old_dir); } #endif -- cgit v1.1