Building windump using MingW + gcc 4.7.2, I get:
 print-rx.c: In function 'fs_print':
 print-rx.c:929:4: warning: unknown conversion type character 'T' in format 
[-Wformat]
 print-rx.c:933:4: warning: unknown conversion type character 'T' in format 
[-Wformat]

This comes from the macro DATEOUT():
 strftime(str, 256, "%Y/%m/%d %T", tm); \

If I should trust what my 'man strftime' says:
  %T or %X
      is equivalent to %H:%M:%S.

we could show the time using this format instead (as print-ntp.c does).

IMHO. there should be an easy-access function in util.c for this.
Something like: const char *get_tm_str (time_t t);

But for now this patch makes gcc/MingW shutup:

--- Git-Latest/print-rx.c    2014-01-14 17:51:07 +0000
+++ print-rx.c  2014-02-13 13:08:40 +0000
@@ -788,7 +788,7 @@
                       t = (time_t) EXTRACT_32BITS(bp); \
                       bp += sizeof(int32_t); \
                       tm = localtime(&t); \
-                       strftime(str, 256, "%Y/%m/%d %T", tm); \
+                       strftime(str, 256, "%Y/%m/%d %H:%M:%S", tm); \
                       printf(" %s", str); \
               }

---------

--gv

_______________________________________________
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Reply via email to