Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d34c70d1
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d34c70d1
编写于
2月 24, 2023
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "fix coverity issue CID:399957"
This reverts commit
de4a0047
.
上级
de4a0047
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
16 deletion
+8
-16
include/libs/nodes/querynodes.h
include/libs/nodes/querynodes.h
+4
-4
include/util/tjson.h
include/util/tjson.h
+0
-1
source/libs/nodes/src/nodesCodeFuncs.c
source/libs/nodes/src/nodesCodeFuncs.c
+1
-1
source/libs/nodes/src/nodesMsgFuncs.c
source/libs/nodes/src/nodesMsgFuncs.c
+2
-2
source/util/src/tjson.c
source/util/src/tjson.c
+1
-8
未找到文件。
include/libs/nodes/querynodes.h
浏览文件 @
d34c70d1
...
...
@@ -38,10 +38,10 @@ typedef struct SRawExprNode {
}
SRawExprNode
;
typedef
struct
SDataType
{
uint
16
_t
type
;
uint8_t
precision
;
uint8_t
scale
;
int32_t
bytes
;
uint
8
_t
type
;
uint8_t
precision
;
uint8_t
scale
;
int32_t
bytes
;
}
SDataType
;
typedef
struct
SExprNode
{
...
...
include/util/tjson.h
浏览文件 @
d34c70d1
...
...
@@ -76,7 +76,6 @@ int32_t tjsonGetSmallIntValue(const SJson* pJson, const char* pName, int16_t* pV
int32_t
tjsonGetTinyIntValue
(
const
SJson
*
pJson
,
const
char
*
pName
,
int8_t
*
pVal
);
int32_t
tjsonGetUBigIntValue
(
const
SJson
*
pJson
,
const
char
*
pName
,
uint64_t
*
pVal
);
int32_t
tjsonGetUIntValue
(
const
SJson
*
pJson
,
const
char
*
pName
,
uint32_t
*
pVal
);
int32_t
tjsonGetUSmallIntValue
(
const
SJson
*
pJson
,
const
char
*
pName
,
uint16_t
*
pVal
);
int32_t
tjsonGetUTinyIntValue
(
const
SJson
*
pJson
,
const
char
*
pName
,
uint8_t
*
pVal
);
int32_t
tjsonGetBoolValue
(
const
SJson
*
pJson
,
const
char
*
pName
,
bool
*
pVal
);
int32_t
tjsonGetDoubleValue
(
const
SJson
*
pJson
,
const
char
*
pName
,
double
*
pVal
);
...
...
source/libs/nodes/src/nodesCodeFuncs.c
浏览文件 @
d34c70d1
...
...
@@ -2972,7 +2972,7 @@ static int32_t dataTypeToJson(const void* pObj, SJson* pJson) {
static
int32_t
jsonToDataType
(
const
SJson
*
pJson
,
void
*
pObj
)
{
SDataType
*
pNode
=
(
SDataType
*
)
pObj
;
int32_t
code
=
tjsonGetU
Small
IntValue
(
pJson
,
jkDataTypeType
,
&
pNode
->
type
);
int32_t
code
=
tjsonGetU
Tiny
IntValue
(
pJson
,
jkDataTypeType
,
&
pNode
->
type
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonGetUTinyIntValue
(
pJson
,
jkDataTypePrecision
,
&
pNode
->
precision
);
}
...
...
source/libs/nodes/src/nodesMsgFuncs.c
浏览文件 @
d34c70d1
...
...
@@ -619,7 +619,7 @@ static int32_t dataTypeToMsg(const void* pObj, STlvEncoder* pEncoder) {
static
int32_t
msgToDataTypeInline
(
STlvDecoder
*
pDecoder
,
void
*
pObj
)
{
SDataType
*
pNode
=
(
SDataType
*
)
pObj
;
int32_t
code
=
tlvDecodeValue
U16
(
pDecoder
,
&
pNode
->
type
);
int32_t
code
=
tlvDecodeValue
I8
(
pDecoder
,
&
pNode
->
type
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tlvDecodeValueU8
(
pDecoder
,
&
pNode
->
precision
);
}
...
...
@@ -641,7 +641,7 @@ static int32_t msgToDataType(STlvDecoder* pDecoder, void* pObj) {
tlvForEach
(
pDecoder
,
pTlv
,
code
)
{
switch
(
pTlv
->
type
)
{
case
DATA_TYPE_CODE_TYPE
:
code
=
tlvDecode
U16
(
pTlv
,
&
pNode
->
type
);
code
=
tlvDecode
I8
(
pTlv
,
&
pNode
->
type
);
break
;
case
DATA_TYPE_CODE_PRECISION
:
code
=
tlvDecodeU8
(
pTlv
,
&
pNode
->
precision
);
...
...
source/util/src/tjson.c
浏览文件 @
d34c70d1
...
...
@@ -250,13 +250,6 @@ int32_t tjsonGetUIntValue(const SJson* pJson, const char* pName, uint32_t* pVal)
return
code
;
}
int32_t
tjsonGetUSmallIntValue
(
const
SJson
*
pJson
,
const
char
*
pName
,
uint16_t
*
pVal
)
{
uint64_t
val
=
0
;
int32_t
code
=
tjsonGetUBigIntValue
(
pJson
,
pName
,
&
val
);
*
pVal
=
val
;
return
code
;
}
int32_t
tjsonGetUTinyIntValue
(
const
SJson
*
pJson
,
const
char
*
pName
,
uint8_t
*
pVal
)
{
uint64_t
val
=
0
;
int32_t
code
=
tjsonGetUBigIntValue
(
pJson
,
pName
,
&
val
);
...
...
@@ -382,4 +375,4 @@ bool tjsonValidateJson(const char* jIn) {
return
true
;
}
const
char
*
tjsonGetError
()
{
return
cJSON_GetErrorPtr
();
}
const
char
*
tjsonGetError
()
{
return
cJSON_GetErrorPtr
();
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录