Skip to content

Commit

Permalink
fix cross build
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Dec 1, 2023
1 parent a9f1050 commit ad1da26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/streams/serial/iostream_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static tk_ostream_t* tk_iostream_serial_get_ostream(tk_iostream_t* stream) {

tk_iostream_t* tk_iostream_serial_create(const char* port) {
tk_object_t* obj = NULL;
serial_handle_t fd = NULL;
serial_handle_t fd = (serial_handle_t)NULL;
tk_iostream_serial_t* iostream_serial = NULL;
return_value_if_fail(port != NULL, NULL);

Expand Down
3 changes: 3 additions & 0 deletions tests/conf_json_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -779,13 +779,16 @@ TEST(ConfJson, comment) {
const char* data = "\
{\
\"log_message\": {\
\"a\":1,\"b\":2,\
\"enable\": true, /*是否启用告警信息*/\
\"fields_count\": 4, /*告警信息中带的字段个数: 级别 | 时间 | 设备 | 信息*/\
\"fields_seperator\": \"|\", /*字段之间的分隔符*/\
\"max_rows\": 1000 /*告警信息最大行数*/\
}\
}";
conf_doc_t* doc = conf_doc_load_json(data, -1);
ASSERT_EQ(conf_doc_get_int(doc, "log_message.a", 0), 1);
ASSERT_EQ(conf_doc_get_int(doc, "log_message.b", 0), 2);
ASSERT_EQ(conf_doc_get_int(doc, "log_message.fields_count", 0), 4);
ASSERT_EQ(conf_doc_get_int(doc, "log_message.max_rows", 0), 1000);

Expand Down

0 comments on commit ad1da26

Please sign in to comment.