From 00be08ddd52b53b2fd5332f396d97de9e61ec00c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 25 Dec 2023 17:40:30 +0000 Subject: [PATCH] date: silence gcc 13.2. The code is correct (and doesn't seem to bother clang), but gcc can't tell that we don't touch old_tz unless we've touched new_tz (which _is_ guaranteed to be initialized). --- toys/posix/date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/posix/date.c b/toys/posix/date.c index 98038425..81e6b7e3 100644 --- a/toys/posix/date.c +++ b/toys/posix/date.c @@ -68,7 +68,7 @@ GLOBALS( // Handles any leading `TZ="blah" ` in the input string. static void parse_date(char *str, time_t *t) { - char *new_tz = NULL, *old_tz, *s = str; + char *new_tz = NULL, *old_tz QUIET, *s = str; if (!strncmp(str, "TZ=\"", 4)) { // Extract the time zone and skip any whitespace. -- 2.39.2