diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-06-20 13:38:33 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-20 13:38:33 +0100 |
commit | 155f2d1451949d1124bfd6ba9c55be6bd74bab75 (patch) | |
tree | b62202254ef079aafcf30eaa01baf694d3f9b0a6 /src/os_win32.c | |
parent | 73171ba4344e17484699d11c65d57fb1f4de572a (diff) |
patch 8.2.5141: using "volatile int" in a signal handler might be wrongv8.2.5141
Problem: Using "volatile int" in a signal handler might be wrong.
Solution: Use "volatile sig_atomic_t".
Diffstat (limited to 'src/os_win32.c')
-rw-r--r-- | src/os_win32.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index f325935059..6af504693f 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -8334,9 +8334,9 @@ static int timer_active = FALSE; * deleted. Ping-ponging between the two flags prevents this causing 'fake' * timeouts. */ -static int timeout_flags[2]; -static int timeout_flag_idx = 0; -static int *timeout_flag = &timeout_flags[0]; +static sig_atomic_t timeout_flags[2]; +static int timeout_flag_idx = 0; +static sig_atomic_t *timeout_flag = &timeout_flags[0]; static void CALLBACK @@ -8378,7 +8378,7 @@ stop_timeout(void) * This function is not expected to fail, but if it does it still returns a * valid flag pointer; the flag will remain stuck at zero. */ - volatile int * + volatile sig_atomic_t * start_timeout(long msec) { BOOL ret; |