|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|