Skip to content

Commit 0f36299

Browse files
committed
Try fixing ci/cd errors
1 parent 69bf6ff commit 0f36299

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/cpp/fastdds/xtypes/dynamic_types/idl_parser/IdlParser.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ struct action<wide_string_literal>
973973
} \
974974
};
975975

976-
#define bool_op_action(Rule, id, operation) \
976+
#define bool_op_action(Rule, id, operation, logical_op) \
977977
template<> \
978978
struct action<Rule> \
979979
{ \
@@ -1011,10 +1011,10 @@ struct action<wide_string_literal>
10111011
} \
10121012
else if (TK_BOOLEAN == pt) \
10131013
{ \
1014-
bool value = promote<bool>(s2) operation promote<bool>(s1); \
1014+
bool value = promote<bool>(s2) logical_op promote<bool>(s1); \
10151015
xdata->set_boolean_value(MEMBER_ID_INVALID, value); \
10161016
std::cout << "=========" << std::endl; \
1017-
std::cout << #operation << ": " << value << std::endl; \
1017+
std::cout << #logical_op << ": " << value << std::endl; \
10181018
std::cout << "=========" << std::endl; \
10191019
} \
10201020
else \
@@ -1034,9 +1034,9 @@ struct action<wide_string_literal>
10341034
} \
10351035
};
10361036

1037-
bool_op_action(or_exec, or, |)
1038-
bool_op_action(xor_exec, xor, ^)
1039-
bool_op_action(and_exec, and, &)
1037+
bool_op_action(or_exec, or, |, ||)
1038+
bool_op_action(xor_exec, xor, ^, !=)
1039+
bool_op_action(and_exec, and, &, &&)
10401040
int_op_action(rshift_exec, >>, >>)
10411041
int_op_action(lshift_exec, <<, <<)
10421042
int_op_action(mod_exec, mod, %)
@@ -1586,7 +1586,7 @@ struct action<case_label>
15861586
else
15871587
{
15881588
EPROSIMA_LOG_ERROR(IDLPARSER, "Unsupported case label data type: " << xtype->get_kind());
1589-
throw std::runtime_error("Unsupported case label data type: " + xtype->get_kind());
1589+
throw std::runtime_error("Unsupported case label data type: " + std::to_string(xtype->get_kind()));
15901590
}
15911591

15921592
if (state["union_labels"].empty() || state["union_labels"].back() == ';')

src/cpp/fastdds/xtypes/dynamic_types/idl_parser/IdlPreprocessor.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ class PreprocessorContext
128128
std::pair<std::ofstream, std::string> get_temporary_file() const
129129
{
130130
// Create a temporary filename template
131-
std::vector<char> filename_template("/tmp/xtypes_XXXXXX", "/tmp/xtypes_XXXXXX" + 18);
131+
const char* literal = "/tmp/xtypes_XXXXXX";
132+
std::vector<char> filename_template(literal, literal + 18);
132133

133134
// Create and open a temporary file securely
134135
int fd = mkstemp(filename_template.data());

test/feature/idl_parser/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ gtest_discover_tests(IdlParserTests)
4040
message(STATUS "Copying IDL directory from ${PROJECT_SOURCE_DIR}/thirdparty/dds-types-test/IDL for idl_parser testing")
4141
add_custom_command(
4242
TARGET IdlParserTests POST_BUILD
43-
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/thirdparty/dds-types-test/IDL $<TARGET_FILE_DIR:IdlParserTests>/IDL
43+
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/thirdparty/dds-types-test/IDL ${CMAKE_CURRENT_BINARY_DIR}/IDL
4444
)

0 commit comments

Comments
 (0)