Skip to content

Commit

Permalink
Try fixing ci/cd errors
Browse files Browse the repository at this point in the history
  • Loading branch information
YangboLong committed Dec 5, 2024
1 parent 69bf6ff commit 0f36299
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/cpp/fastdds/xtypes/dynamic_types/idl_parser/IdlParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ struct action<wide_string_literal>
} \
};

#define bool_op_action(Rule, id, operation) \
#define bool_op_action(Rule, id, operation, logical_op) \
template<> \
struct action<Rule> \
{ \
Expand Down Expand Up @@ -1011,10 +1011,10 @@ struct action<wide_string_literal>
} \
else if (TK_BOOLEAN == pt) \
{ \
bool value = promote<bool>(s2) operation promote<bool>(s1); \
bool value = promote<bool>(s2) logical_op promote<bool>(s1); \
xdata->set_boolean_value(MEMBER_ID_INVALID, value); \
std::cout << "=========" << std::endl; \
std::cout << #operation << ": " << value << std::endl; \
std::cout << #logical_op << ": " << value << std::endl; \
std::cout << "=========" << std::endl; \
} \
else \
Expand All @@ -1034,9 +1034,9 @@ struct action<wide_string_literal>
} \
};

bool_op_action(or_exec, or, |)
bool_op_action(xor_exec, xor, ^)
bool_op_action(and_exec, and, &)
bool_op_action(or_exec, or, |, ||)
bool_op_action(xor_exec, xor, ^, !=)
bool_op_action(and_exec, and, &, &&)
int_op_action(rshift_exec, >>, >>)
int_op_action(lshift_exec, <<, <<)
int_op_action(mod_exec, mod, %)
Expand Down Expand Up @@ -1586,7 +1586,7 @@ struct action<case_label>
else
{
EPROSIMA_LOG_ERROR(IDLPARSER, "Unsupported case label data type: " << xtype->get_kind());
throw std::runtime_error("Unsupported case label data type: " + xtype->get_kind());
throw std::runtime_error("Unsupported case label data type: " + std::to_string(xtype->get_kind()));
}

if (state["union_labels"].empty() || state["union_labels"].back() == ';')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ class PreprocessorContext
std::pair<std::ofstream, std::string> get_temporary_file() const
{
// Create a temporary filename template
std::vector<char> filename_template("/tmp/xtypes_XXXXXX", "/tmp/xtypes_XXXXXX" + 18);
const char* literal = "/tmp/xtypes_XXXXXX";
std::vector<char> filename_template(literal, literal + 18);

// Create and open a temporary file securely
int fd = mkstemp(filename_template.data());
Expand Down
2 changes: 1 addition & 1 deletion test/feature/idl_parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ gtest_discover_tests(IdlParserTests)
message(STATUS "Copying IDL directory from ${PROJECT_SOURCE_DIR}/thirdparty/dds-types-test/IDL for idl_parser testing")
add_custom_command(
TARGET IdlParserTests POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/thirdparty/dds-types-test/IDL $<TARGET_FILE_DIR:IdlParserTests>/IDL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/thirdparty/dds-types-test/IDL ${CMAKE_CURRENT_BINARY_DIR}/IDL
)

0 comments on commit 0f36299

Please sign in to comment.