diff --git a/examples/c/asyncdemo.c b/examples/c/asyncdemo.c index faf636ee2e3fa0c8db4e199632da2ccbac36e46f..518b940d7aa54fed371f48b59615577efe75202d 100644 --- a/examples/c/asyncdemo.c +++ b/examples/c/asyncdemo.c @@ -23,7 +23,7 @@ #include #include #include - +#include #include "../../include/client/taos.h" int points = 5; @@ -230,7 +230,7 @@ void taos_insert_call_back(void *param, TAOS_RES *tres, int code) if (tablesInsertProcessed >= numOfTables) { gettimeofday(&systemTime, NULL); et = systemTime.tv_sec * 1000000 + systemTime.tv_usec; - printf("%lld mseconds to insert %d data points\n", (et - st) / 1000, points*numOfTables); + printf("%" PRId64 " mseconds to insert %d data points\n", (et - st) / 1000, points*numOfTables); } } @@ -267,7 +267,7 @@ void taos_retrieve_call_back(void *param, TAOS_RES *tres, int numOfRows) if (tablesSelectProcessed >= numOfTables) { gettimeofday(&systemTime, NULL); et = systemTime.tv_sec * 1000000 + systemTime.tv_usec; - printf("%lld mseconds to query %d data rows\n", (et - st) / 1000, points * numOfTables); + printf("%" PRId64 " mseconds to query %d data rows\n", (et - st) / 1000, points * numOfTables); } taos_free_result(tres); diff --git a/examples/c/schemaless.c b/examples/c/schemaless.c index 184f4e266209849d14a0d1abdce53c919dd9bea3..141e4c9f3ba6ca37488e43ab2729d78f9357599a 100644 --- a/examples/c/schemaless.c +++ b/examples/c/schemaless.c @@ -46,7 +46,7 @@ int main(int argc, char* argv[]) { time_t ct = time(0); int64_t ts = ct * 1000; - char* lineFormat = "sta%d,t0=true,t1=127i8,t2=32767i16,t3=%di32,t4=9223372036854775807i64,t9=11.12345f32,t10=22.123456789f64,t11=\"binaryTagValue\",t12=L\"ncharTagValue\" c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=254u8,c6=32770u16,c7=2147483699u32,c8=9223372036854775899u64,c9=11.12345f32,c10=22.123456789f64,c11=\"binaryValue\",c12=L\"ncharValue\" %lld"; + char* lineFormat = "sta%d,t0=true,t1=127i8,t2=32767i16,t3=%di32,t4=9223372036854775807i64,t9=11.12345f32,t10=22.123456789f64,t11=\"binaryTagValue\",t12=L\"ncharTagValue\" c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=254u8,c6=32770u16,c7=2147483699u32,c8=9223372036854775899u64,c9=11.12345f32,c10=22.123456789f64,c11=\"binaryValue\",c12=L\"ncharValue\" %" PRId64; int lineNum = numSuperTables * numChildTables * numRowsPerChildTable; char** lines = calloc((size_t)lineNum, sizeof(char*));