summaryrefslogtreecommitdiff
path: root/Porting/timecheck.c
Commit message (Collapse)AuthorAgeFilesLines
* No need to convert int to long to intH.Merijn Brand2018-12-071-1/+1
| | | | | | Beyond that, I agree with this branch Signed-off-by: James E Keenan <jkeenan@cpan.org>
* No need to include 'values.h'.James E Keenan2018-12-071-1/+0
| | | | | | timecheck.c does not appear to use any thing from this file. Linux documentation marks the interface as obsolete. It's not found, e.g., on FreeBSD.
* Eliminate 4 build-time warnings in timecheck.c.James E Keenan2018-12-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit suppresses output like this: [Porting] 758 $ cc -O -o timecheck timecheck.c timecheck.c: In function ‘gm_check’: timecheck.c:37:36: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘int’ [-Wformat=] fprintf (stderr, "%3d:%s: %12ld-%02d-%02d %02d:%02d:%02d\n", ~~~~^ %12d timecheck.c:39:3: tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, ~~~~~~~~~~~~~~~~~~~ timecheck.c: In function ‘lt_check’: timecheck.c:89:36: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘int’ [-Wformat=] fprintf (stderr, "%3d:%s: %12ld-%02d-%02d %02d:%02d:%02d\n", ~~~~^ %12d timecheck.c:91:3: tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, ~~~~~~~~~~~~~~~~~~~ timecheck.c: In function ‘main’: timecheck.c:130:21: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] if (argc > 1 && strcmp (argv[1], "-v") == 0) opt_v++; ^~~~~~ timecheck.c:139:32: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] printf ("Sizeof time_t = %ld\n", (i = sizeof (time_t))); ~~^ ~~~~~~~~~~~~~~~~~~~~~ %d
* Y2038 doc pointers in the little helper C toolsJesse Vincent2009-08-031-0/+4
|
* y2038 time checks have overflow checks. Added documentation andH.Merijn Brand2008-10-181-0/+148
test programs in Porting/ p4raw-id: //depot/perl@34504