diff src/regexp.c @ 29245:b12fd2b3be63 v8.2.5141

patch 8.2.5141: using "volatile int" in a signal handler might be wrong Commit: https://github.com/vim/vim/commit/155f2d1451949d1124bfd6ba9c55be6bd74bab75 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 20 13:38:33 2022 +0100 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".
author Bram Moolenaar <Bram@vim.org>
date Mon, 20 Jun 2022 14:45:03 +0200
parents d6f8b784d0f6
children 5ebc561444fe
line wrap: on
line diff
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -21,8 +21,8 @@
 #endif
 
 #ifdef FEAT_RELTIME
-static int dummy_timeout_flag = 0;
-static volatile int *timeout_flag = &dummy_timeout_flag;
+static sig_atomic_t dummy_timeout_flag = 0;
+static volatile sig_atomic_t *timeout_flag = &dummy_timeout_flag;
 #endif
 
 /*