timeout(1): sig_atomic_t variables must also be 'volatile'; ok job@
authorcheloha <cheloha@openbsd.org>
Fri, 13 Jan 2023 06:53:04 +0000 (06:53 +0000)
committercheloha <cheloha@openbsd.org>
Fri, 13 Jan 2023 06:53:04 +0000 (06:53 +0000)
usr.bin/timeout/timeout.c

index e38e66e..fb4d9c8 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: timeout.c,v 1.24 2023/01/12 14:08:39 jmc Exp $ */
+/* $OpenBSD: timeout.c,v 1.25 2023/01/13 06:53:04 cheloha Exp $ */
 
 /*
  * Copyright (c) 2021 Job Snijders <job@openbsd.org>
 
 #define EXIT_TIMEOUT 124
 
-static sig_atomic_t sig_chld = 0;
-static sig_atomic_t sig_term = 0;
-static sig_atomic_t sig_alrm = 0;
-static sig_atomic_t sig_ign = 0;
+static volatile sig_atomic_t sig_chld = 0;
+static volatile sig_atomic_t sig_term = 0;
+static volatile sig_atomic_t sig_alrm = 0;
+static volatile sig_atomic_t sig_ign = 0;
 
 static void __dead
 usage(void)