From 89f78ec3d6429f3ada682a95222c16aa253269b5 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Mon, 12 Jan 2015 21:04:52 +0100 Subject: cast .tv_sec to avoid warning on DARWIN --- contrib/uuid/gen_uuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/uuid/gen_uuid.c b/contrib/uuid/gen_uuid.c index 4da0dc69b84..616c2c2ea80 100644 --- a/contrib/uuid/gen_uuid.c +++ b/contrib/uuid/gen_uuid.c @@ -405,7 +405,8 @@ try_again: rewind(state_f); len = fprintf(state_f, "clock: %04x tv: %016lu %08lu adj: %08d\n", - clock_seq, last.tv_sec, last.tv_usec, adjustment); + /* cast to unsigned long to avoid warning (int on DARWIN) */ + clock_seq, last.tv_sec, (unsigned long) last.tv_usec, adjustment); fflush(state_f); if (ftruncate(state_fd, len) < 0) { fprintf(state_f, " \n"); -- cgit