diff --git a/tests/examples/c/demo.c b/tests/examples/c/demo.c index f5ad37acefb50893248d510b43cce902cbcf8bc8..9ad3e6f902a3994f8d8c837f59b959004be228d2 100644 --- a/tests/examples/c/demo.c +++ b/tests/examples/c/demo.c @@ -86,7 +86,7 @@ void Test(TAOS *taos, char *qstr, int index) { int i = 0; for (i = 0; i < 10; ++i) { - sprintf(qstr, "insert into m1 values (%" PRId64 ", %d, %d, %d, %d, %f, %lf, '%s')", 1546300800000LL + i * 1000, i, i, i, i*10000000, i*1.0, i*2.0, "hello"); + sprintf(qstr, "insert into m1 values (%" PRId64 ", %d, %d, %d, %d, %f, %lf, '%s')", (uint64_t)(1546300800000 + i * 1000), i, i, i, i*10000000, i*1.0, i*2.0, "hello"); printf("qstr: %s\n", qstr); // note: how do you wanna do if taos_query returns non-NULL