[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
term-style-control: fix gcc warning on mingw
From: |
Bruno Haible |
Subject: |
term-style-control: fix gcc warning on mingw |
Date: |
Sat, 27 Apr 2019 15:23:16 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; ) |
On mingw, I see this warning:
term-style-control.c: In function ‘ensure_other_signal_handlers’:
term-style-control.c:815:20: warning: unused variable ‘i’ [-Wunused-variable]
unsigned int i;
^
This patch fixes it.
2019-04-27 Bruno Haible <address@hidden>
term-style-control: Fix gcc warning on mingw.
* lib/term-style-control.c (ensure_other_signal_handlers): Reduce scope
of i.
diff -w --git a/lib/term-style-control.c b/lib/term-style-control.c
index 4d2b8ee..a22342c 100644
--- a/lib/term-style-control.c
+++ b/lib/term-style-control.c
@@ -812,14 +812,15 @@ ensure_other_signal_handlers (void)
if (!signal_handlers_installed)
{
- unsigned int i;
-
/* Install the handlers for the fatal signals. */
at_fatal_signal (fatal_signal_handler);
#if defined SIGCONT
/* Install the handlers for the stopping and continuing signals. */
+ {
+ unsigned int i;
+
for (i = 0; i < num_job_control_signals; i++)
{
int sig = job_control_signals[i];
@@ -847,6 +848,7 @@ ensure_other_signal_handlers (void)
}
#endif
}
+ }
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- term-style-control: fix gcc warning on mingw,
Bruno Haible <=