From 8bf48247176886c6ca5a51b94c97a7c50ddbd270 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 27 Jan 2022 17:22:30 +0100 Subject: sig_atomic_t should be used with volatile --- rvnit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rvnit.c b/rvnit.c index 8175b35..04b6f80 100644 --- a/rvnit.c +++ b/rvnit.c @@ -61,10 +61,10 @@ int globallogfd[2]; int pid1; int use_global_log; -sig_atomic_t want_shutdown; -sig_atomic_t want_rescan; -sig_atomic_t want_rescandir; -sig_atomic_t want_reboot; +volatile sig_atomic_t want_shutdown; +volatile sig_atomic_t want_rescan; +volatile sig_atomic_t want_rescandir; +volatile sig_atomic_t want_reboot; void on_sigint(int sig) -- cgit 1.4.1