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.3-branch] Avoid compilation warnings on MinGW.


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

commit 4344b2225c8d4878a27401b94ec6315c728f46bf
Author: Eli Zaretskii <eliz@gnu.org>
Date:   Sat Mar 2 15:22:11 2019 +0200

    Avoid compilation warnings on MinGW.
    
    gdb/ChangeLog:
    2019-03-02  Eli Zaretskii  <eliz@gnu.org>
    
    	* xml-syscall.c (xml_list_syscalls_by_group): Drop 'struct' from
    	for-loop range, to avoid compiler warnings.
    
    	* tui/tui.c (tui_enable) [__MINGW32__]: Don't declare 'cap', to
    	avoid compiler warnings about unused variables.
    
    (cherry picked from commit a6a4b2c636b29de09dea890b448f99804ef7bc18)

Diff:
---
 gdb/ChangeLog     | 8 ++++++++
 gdb/tui/tui.c     | 4 +++-
 gdb/xml-syscall.c | 2 +-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0586cd2..86f22c8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
 2019-03-02  Eli Zaretskii  <eliz@gnu.org>
 
+	* xml-syscall.c (xml_list_syscalls_by_group): Drop 'struct' from
+	for-loop range, to avoid compiler warnings.
+
+	* tui/tui.c (tui_enable) [__MINGW32__]: Don't declare 'cap', to
+	avoid compiler warnings about unused variables.
+
+2019-03-02  Eli Zaretskii  <eliz@gnu.org>
+
 	* NEWS: Mention end of support for native debugging on MS-Windows
 	before XP.
 
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index b99e8a0..4c99632 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -410,7 +410,9 @@ tui_enable (void)
     {
       WINDOW *w;
       SCREEN *s;
-      const char *cap;
+#ifndef __MINGW32__
+       const char *cap;
+#endif
       const char *interp;
 
       /* If the top level interpreter is not the console/tui (e.g.,
diff --git a/gdb/xml-syscall.c b/gdb/xml-syscall.c
index 6d13b0b..d144f82 100644
--- a/gdb/xml-syscall.c
+++ b/gdb/xml-syscall.c
@@ -472,7 +472,7 @@ xml_list_syscalls_by_group (struct gdbarch *gdbarch, const char *group,
   if (groupdesc == NULL)
     return false;
 
-  for (const struct syscall_desc *sysdesc : groupdesc->syscalls)
+  for (const syscall_desc *sysdesc : groupdesc->syscalls)
     syscalls->push_back (sysdesc->number);
 
   return true;


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