Remove debug detritus I didn't mean to to check in, and treat an "this variable can never actually be used uninitialized but gcc's warning generator can't tell and fails spamwards" warning.
diff --git a/toys/posix/date.c b/toys/posix/date.c
index f56c480..15aafb0 100644
--- a/toys/posix/date.c
+++ b/toys/posix/date.c
@@ -95,13 +95,13 @@
void date_main(void)
{
char *setdate = *toys.optargs, *format_string = "%a %b %e %H:%M:%S %Z %Y",
- *tz;
+ *tz = 0;
time_t now = time(NULL);
struct tm tm;
// We can't just pass a timezone to mktime because posix.
if (toys.optflags & FLAG_u) {
- tz = CFG_TOYBOX_FREE ? getenv("TZ") : 0;
+ if (CFG_TOYBOX_FREE) tz = getenv("TZ");
setenv("TZ", "UTC", 1);
tzset();
}
@@ -114,7 +114,6 @@
} else if (TT.showdate) {
setdate = TT.showdate;
if (TT.setfmt) {
-printf("TT.showdate=%s TT.setfmt=%s\n", TT.showdate, TT.setfmt);
char *s = strptime(TT.showdate, TT.setfmt+(*TT.setfmt=='+'), &tm);
if (!s || *s) goto bad_date;