]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Avoid compilation warnings on MinGW.
authorEli Zaretskii <eliz@gnu.org>
Sat, 2 Mar 2019 13:22:11 +0000 (15:22 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 2 Mar 2019 13:22:11 +0000 (15:22 +0200)
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.

gdb/ChangeLog
gdb/tui/tui.c
gdb/xml-syscall.c

index 69b31ea2446fe5196c2cca139f6f8935e5eb2f44..65a74cd0266c32ff64698532a1a0d465ecdc2e48 100644 (file)
@@ -1,5 +1,11 @@
 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.
+
        * NEWS: Mention end of support for native debugging on MS-Windows
        before XP.
 
index b99e8a0e1070b6854496937db50576017c2e1fe5..4c9963291dc5f303bcb498f7b0ff28d2cb1819c7 100644 (file)
@@ -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.,
index 6d13b0b4ed6f8eef3fc1bdf9050422f333bdc2eb..d144f82fbf23165f7ba2fd2334aef9627cdf9b31 100644 (file)
@@ -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;