This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/gdb-8.0-branch] Avoid compiler warning in MinGW build


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=db9a60402429d9bed9b531f7d1584860babe2c22

commit db9a60402429d9bed9b531f7d1584860babe2c22
Author: Eli Zaretskii <eliz@gnu.org>
Date:   Sat May 13 11:10:00 2017 +0300

    Avoid compiler warning in MinGW build
    
    gdb:
    
    2017-05-13  Eli Zaretskii  <eliz@gnu.org>
    
    	* tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
    	C++ compiler warning.
    
    (cherry picked from commit adf3dde510088ef8dc46d04df05baf36adb0ed1e)

Diff:
---
 gdb/ChangeLog | 5 +++++
 gdb/tui/tui.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cbeb9a7..ff9579f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-13  Eli Zaretskii  <eliz@gnu.org>
+
+	* tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
+	C++ compiler warning.
+
 2017-05-17  Yao Qi  <yao.qi@linaro.org>
 
 	* cli/cli-decode.c (add_alias_cmd): New function.
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index eb489b1..c918f3e 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -427,7 +427,7 @@ tui_enable (void)
       /* The MinGW port of ncurses requires $TERM to be unset in order
 	 to activate the Windows console driver.  */
       if (s == NULL)
-	s = newterm ("unknown", stdout, stdin);
+	s = newterm ((char *) "unknown", stdout, stdin);
 #endif
       if (s == NULL)
 	{


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]