Fix some printf typing issue (#6659)
This commit is contained in:
parent
941e69da9d
commit
201f6c465e
|
@ -1,5 +1,6 @@
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include "taos.h"
|
#include "taos.h"
|
||||||
#include "tglobal.h"
|
#include "tglobal.h"
|
||||||
|
@ -132,7 +133,7 @@ void validateResultFields() {
|
||||||
taos_free_result(res);
|
taos_free_result(res);
|
||||||
|
|
||||||
char sql[512] = {0};
|
char sql[512] = {0};
|
||||||
sprintf(sql, "insert into t1 values(%ld, 99, 'abc', 'test')", start_ts);
|
sprintf(sql, "insert into t1 values(%" PRId64 ", 99, 'abc', 'test')", start_ts);
|
||||||
|
|
||||||
res = taos_query(conn, sql);
|
res = taos_query(conn, sql);
|
||||||
ASSERT_EQ(taos_errno(res), 0);
|
ASSERT_EQ(taos_errno(res), 0);
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
#include "os.h"
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#include "os.h"
|
||||||
#include "taos.h"
|
#include "taos.h"
|
||||||
#include "ttoken.h"
|
#include "ttoken.h"
|
||||||
#include "tutil.h"
|
#include "tutil.h"
|
||||||
|
@ -165,7 +167,7 @@ TEST(testCase, parse_time) {
|
||||||
|
|
||||||
char t[] = "2021-01-08T02:11:40.000+00:00";
|
char t[] = "2021-01-08T02:11:40.000+00:00";
|
||||||
taosParseTime(t, &time, strlen(t), TSDB_TIME_PRECISION_MILLI, 0);
|
taosParseTime(t, &time, strlen(t), TSDB_TIME_PRECISION_MILLI, 0);
|
||||||
printf("%ld\n", time);
|
printf("%" PRId64 "\n", time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue