aboutsummaryrefslogtreecommitdiff
path: root/lib/getdate.y
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-22 21:12:34 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-22 21:12:34 +0000
commit7659747e6f814bdc8edf4b5dbb6765b7a25ef0cb (patch)
tree4a7a429fe77a93c3b56be7585b796b0f35531606 /lib/getdate.y
parent53189fb2d7b2407740d3e15e90443d5e64b5d859 (diff)
Günter Knauf fixed getdate.y to remove a few warnings. I removed the
ifdef'ed test we never ever use anyway.
Diffstat (limited to 'lib/getdate.y')
-rw-r--r--lib/getdate.y31
1 files changed, 2 insertions, 29 deletions
diff --git a/lib/getdate.y b/lib/getdate.y
index 68d0ce60b..c35615227 100644
--- a/lib/getdate.y
+++ b/lib/getdate.y
@@ -724,7 +724,8 @@ ToHour (int Hours, MERIDIAN Meridian)
default:
abort ();
}
- /* NOTREACHED */
+ /* NOTREACHED - but make gcc happy! */
+ return -1;
}
static int
@@ -1078,31 +1079,3 @@ curl_getdate (const char *p, const time_t *now)
return Start;
}
-
-#if defined (TEST)
-
-/* ARGSUSED */
-int
-main (int ac, char *av[])
-{
- char buff[MAX_BUFF_LEN + 1];
- time_t d;
-
- (void) printf ("Enter date, or blank line to exit.\n\t> ");
- (void) fflush (stdout);
-
- buff[MAX_BUFF_LEN] = 0;
- while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
- {
- d = curl_getdate (buff, (time_t *) NULL);
- if (d == -1)
- (void) printf ("Bad format - couldn't convert.\n");
- else
- (void) printf ("%s", ctime (&d));
- (void) printf ("\t> ");
- (void) fflush (stdout);
- }
- exit (0);
- /* NOTREACHED */
-}
-#endif /* defined (TEST) */