Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
98f1c3d8
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
98f1c3d8
编写于
10月 17, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
10月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17411 from taosdata/fix/coverity_glzhao
fix: coverity issues
上级
b660f03f
16fb3525
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
11 deletion
+13
-11
examples/c/tmq.c
examples/c/tmq.c
+1
-0
source/common/src/tdataformat.c
source/common/src/tdataformat.c
+2
-2
source/common/src/ttime.c
source/common/src/ttime.c
+1
-1
source/common/src/tvariant.c
source/common/src/tvariant.c
+3
-2
source/libs/scalar/src/filter.c
source/libs/scalar/src/filter.c
+6
-6
未找到文件。
examples/c/tmq.c
浏览文件 @
98f1c3d8
...
...
@@ -212,6 +212,7 @@ tmq_list_t* build_topic_list() {
tmq_list_t
*
topicList
=
tmq_list_new
();
int32_t
code
=
tmq_list_append
(
topicList
,
"topicname"
);
if
(
code
)
{
tmq_list_destroy
(
topicList
);
return
NULL
;
}
return
topicList
;
...
...
source/common/src/tdataformat.c
浏览文件 @
98f1c3d8
...
...
@@ -602,7 +602,7 @@ _exit:
}
int32_t
tPutTSRow
(
uint8_t
*
p
,
STSRow2
*
pRow
)
{
int32_t
n
;
int32_t
n
=
0
;
TSROW_LEN
(
pRow
,
n
);
if
(
p
)
{
...
...
@@ -613,7 +613,7 @@ int32_t tPutTSRow(uint8_t *p, STSRow2 *pRow) {
}
int32_t
tGetTSRow
(
uint8_t
*
p
,
STSRow2
**
ppRow
)
{
int32_t
n
;
int32_t
n
=
0
;
*
ppRow
=
(
STSRow2
*
)
p
;
TSROW_LEN
(
*
ppRow
,
n
);
...
...
source/common/src/ttime.c
浏览文件 @
98f1c3d8
...
...
@@ -795,7 +795,7 @@ int64_t taosTimeTruncate(int64_t t, const SInterval* pInterval, int32_t precisio
// not enough time range
if
(
start
<
0
||
INT64_MAX
-
start
>
pInterval
->
interval
-
1
)
{
end
=
taosTimeAdd
(
start
,
pInterval
->
interval
,
pInterval
->
intervalUnit
,
precision
)
-
1
;
while
(
end
<
t
&&
((
start
+
pInterval
->
sliding
)
<=
INT64_MAX
)
)
{
// move forward to the correct time window
while
(
end
<
t
)
{
// move forward to the correct time window
start
+=
pInterval
->
sliding
;
if
(
start
<
0
||
INT64_MAX
-
start
>
pInterval
->
interval
-
1
)
{
...
...
source/common/src/tvariant.c
浏览文件 @
98f1c3d8
...
...
@@ -366,6 +366,7 @@ static int32_t toBinary(SVariant *pVariant, char **pDest, int32_t *pDestSize) {
}
if
(
pBuf
!=
NULL
)
{
taosMemoryFree
(
pVariant
->
pz
);
*
pDest
=
pBuf
;
}
...
...
@@ -688,7 +689,7 @@ int32_t tVariantDumpEx(SVariant *pVariant, char *payload, int16_t type, bool inc
case
TSDB_DATA_TYPE_BIGINT
:
{
if
(
convertToInteger
(
pVariant
,
&
result
,
type
,
true
,
false
,
converted
)
<
0
)
{
SET_EXT_INFO
(
converted
,
(
int64_t
)
result
,
INT64_MIN
+
1
,
INT64_MAX
,
extInfo
);
SET_EXT_INFO
(
converted
,
result
,
INT64_MIN
+
1
,
INT64_MAX
,
extInfo
);
return
-
1
;
}
*
((
int64_t
*
)
payload
)
=
(
int64_t
)
result
;
...
...
@@ -697,7 +698,7 @@ int32_t tVariantDumpEx(SVariant *pVariant, char *payload, int16_t type, bool inc
case
TSDB_DATA_TYPE_UBIGINT
:
{
if
(
convertToInteger
(
pVariant
,
&
result
,
type
,
false
,
false
,
converted
)
<
0
)
{
SET_EXT_INFO
(
converted
,
(
uint64_t
)
result
,
0
,
UINT64_MAX
-
1
,
extInfo
);
SET_EXT_INFO
(
converted
,
result
,
0
,
UINT64_MAX
-
1
,
extInfo
);
return
-
1
;
}
*
((
uint64_t
*
)
payload
)
=
(
uint64_t
)
result
;
...
...
source/libs/scalar/src/filter.c
浏览文件 @
98f1c3d8
...
...
@@ -1214,7 +1214,7 @@ int32_t fltAddGroupUnitFromNode(SFilterInfo *info, SNode *tree, SArray *group) {
int32_t
filterAddUnitFromUnit
(
SFilterInfo
*
dst
,
SFilterInfo
*
src
,
SFilterUnit
*
u
,
uint32_t
*
uidx
)
{
SFilterFieldId
left
,
right
,
*
pright
=
&
right
;
int32
_t
type
=
FILTER_UNIT_DATA_TYPE
(
u
);
uint8
_t
type
=
FILTER_UNIT_DATA_TYPE
(
u
);
uint16_t
flag
=
0
;
filterAddField
(
dst
,
FILTER_UNIT_COL_DESC
(
src
,
u
),
NULL
,
FLD_TYPE_COLUMN
,
&
left
,
0
,
false
);
...
...
@@ -1644,7 +1644,7 @@ void filterDumpInfoToString(SFilterInfo *info, const char *msg, int32_t options)
SFilterField
*
left
=
FILTER_UNIT_LEFT_FIELD
(
info
,
unit
);
SColumnNode
*
refNode
=
(
SColumnNode
*
)
left
->
desc
;
if
(
unit
->
compare
.
optr
>=
0
&&
unit
->
compare
.
optr
<=
OP_TYPE_JSON_CONTAINS
)
{
if
(
unit
->
compare
.
optr
<=
OP_TYPE_JSON_CONTAINS
)
{
len
=
sprintf
(
str
,
"UNIT[%d] => [%d][%d] %s ["
,
i
,
refNode
->
dataBlockId
,
refNode
->
slotId
,
operatorTypeStr
(
unit
->
compare
.
optr
));
}
...
...
@@ -1664,7 +1664,7 @@ void filterDumpInfoToString(SFilterInfo *info, const char *msg, int32_t options)
if
(
unit
->
compare
.
optr2
)
{
strcat
(
str
,
" && "
);
if
(
unit
->
compare
.
optr2
>=
0
&&
unit
->
compare
.
optr2
<=
OP_TYPE_JSON_CONTAINS
)
{
if
(
unit
->
compare
.
optr2
<=
OP_TYPE_JSON_CONTAINS
)
{
sprintf
(
str
+
strlen
(
str
),
"[%d][%d] %s ["
,
refNode
->
dataBlockId
,
refNode
->
slotId
,
operatorTypeStr
(
unit
->
compare
.
optr2
));
}
...
...
@@ -1709,9 +1709,9 @@ void filterDumpInfoToString(SFilterInfo *info, const char *msg, int32_t options)
ctx
->
isrange
);
if
(
ctx
->
isrange
)
{
SFilterRangeNode
*
r
=
ctx
->
rs
;
int32_t
tlen
=
0
;
while
(
r
)
{
char
str
[
256
]
=
{
0
};
int32_t
tlen
=
0
;
char
str
[
256
]
=
{
0
};
if
(
FILTER_GET_FLAG
(
r
->
ra
.
sflag
,
RANGE_FLG_NULL
))
{
strcat
(
str
,
"(NULL)"
);
}
else
{
...
...
@@ -2614,7 +2614,7 @@ int32_t filterRewrite(SFilterInfo *info, SFilterGroupCtx **gRes, int32_t gResNum
int32_t
usize
=
(
int32_t
)
taosArrayGetSize
((
SArray
*
)
colInfo
->
info
);
for
(
int32_t
n
=
0
;
n
<
usize
;
++
n
)
{
SFilterUnit
*
u
=
taosArrayGetP
((
SArray
*
)
colInfo
->
info
,
n
);
SFilterUnit
*
u
=
(
SFilterUnit
*
)
taosArrayGetP
((
SArray
*
)
colInfo
->
info
,
n
);
filterAddUnitFromUnit
(
info
,
&
oinfo
,
u
,
&
uidx
);
filterAddUnitToGroup
(
&
ng
,
uidx
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录