This code gives me warnings:
$ cat test.c
#include<stdio.h>
#include<time.h>
int main() {
time_t t;
scanf("%lld", &t);
printf("%lld\n", t);
return 0;
}
$ gcc test.c -o test
test.c: In function βmainβ:
test.c:7: warning: format β%lldβ expects type βlong long int *β, but argument 2 has type βtime_t *β
test.c:8: warning: format β%lldβ expects type βlong long intβ, but argument 2 has type βtime_tβ
$
In addition to warnings, the code works as expected.
What should I do to not get compilation warnings (without a compiler?)
source
share