pkcs11-spy.c: fix 1 warning

pkcs11-spy.c:259:49: warning: format specifies type 'long' but the argument has
      type 'int' [-Wformat]
        fprintf(spy_output, "%s.%03ld\n", time_string, tv.tv_usec / 1000);
                                ~~~~~                  ^~~~~~~~~~~~~~~~~
                                %03d
This commit is contained in:
Ludovic Rousseau 2016-02-29 18:15:55 +01:00
parent cd42fbbc65
commit 80a313fb2a

View File

@ -256,7 +256,7 @@ enter(const char *function)
gettimeofday (&tv, NULL);
tm = localtime (&tv.tv_sec);
strftime (time_string, sizeof(time_string), "%F %H:%M:%S", tm);
fprintf(spy_output, "%s.%03ld\n", time_string, tv.tv_usec / 1000);
fprintf(spy_output, "%s.%03ld\n", time_string, (long)tv.tv_usec / 1000);
#endif
}