git: 92f8006e8901 - main - timeout(1): sig_atomic_t variables must also be 'volatile'
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Apr 2025 19:46:26 UTC
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=92f8006e8901f876af1b97d996dd245aa2c92ec0 commit 92f8006e8901f876af1b97d996dd245aa2c92ec0 Author: Aaron LI <aly@aaronly.me> AuthorDate: 2025-04-02 11:24:10 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2025-04-16 19:45:38 +0000 timeout(1): sig_atomic_t variables must also be 'volatile' Obtained-from: OpenBSD (via DragonFly BSD) --- bin/timeout/timeout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/timeout/timeout.c b/bin/timeout/timeout.c index 1817ef24995f..397d692d8647 100644 --- a/bin/timeout/timeout.c +++ b/bin/timeout/timeout.c @@ -45,10 +45,10 @@ #define EXIT_CMD_ERROR 126 #define EXIT_CMD_NOENT 127 -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 const char *command = NULL; static bool verbose = false;