Skip to content

Commit

Permalink
date: silence gcc 13.2.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
enh-google authored and landley committed Dec 27, 2023
1 parent 9a83d36 commit 00be08d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toys/posix/date.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 00be08d

Please sign in to comment.