Force cast to long as on some platform tv_usec is 32bit long
authorMatthieu Patou <mat@matws.net>
Sat, 8 Sep 2012 07:21:47 +0000 (00:21 -0700)
committerMatthieu Patou <mat@samba.org>
Mon, 10 Sep 2012 05:33:50 +0000 (07:33 +0200)
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Mon Sep 10 07:33:50 CEST 2012 on sn-devel-104

source4/torture/libnet/userman.c

index 16e169f6d211dffc3a650461fccde5cfb156b3e1..521ad9981c8f8bf4670043e86033b430e008cedd 100644 (file)
@@ -250,10 +250,10 @@ static bool test_userdel(struct torture_context *tctx,
                if (timeval_compare(&t, mod->in.change.fld)) { \
                        torture_comment(tctx, "'%s' field does not match\n", #fld); \
                        torture_comment(tctx, "received: '%s (+%ld us)'\n", \
-                              timestring(mem_ctx, t.tv_sec), t.tv_usec); \
+                              timestring(mem_ctx, t.tv_sec), (long)t.tv_usec); \
                        torture_comment(tctx, "expected: '%s (+%ld us)'\n", \
                               timestring(mem_ctx, mod->in.change.fld->tv_sec), \
-                              mod->in.change.fld->tv_usec); \
+                              (long)mod->in.change.fld->tv_usec); \
                        return false; \
                } \
        }