schlock global variable needs to be volatile
authorXiaoyin Liu <xiaoyinl@users.noreply.github.com>
Mon, 24 Jul 2017 15:28:50 +0000 (11:28 -0400)
committerRich Salz <rsalz@openssl.org>
Mon, 24 Jul 2017 18:58:11 +0000 (14:58 -0400)
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4000)

apps/speed.c

index becdf6e..2d943b1 100644 (file)
@@ -275,7 +275,8 @@ static SIGRETTYPE sig_done(int sig)
 # if !defined(SIGALRM)
 #  define SIGALRM
 # endif
-static unsigned int lapse, schlock;
+static unsigned int lapse;
+static volatile unsigned int schlock;
 static void alarm_win32(unsigned int secs)
 {
     lapse = secs * 1000;