forked from aniani/vim
patch 8.2.5141: using "volatile int" in a signal handler might be wrong
Problem: Using "volatile int" in a signal handler might be wrong. Solution: Use "volatile sig_atomic_t".
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user