Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GCC/CMake warnings for Noble #2375

Merged
merged 6 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions examples/plugin/custom_sensor_system/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ add_subdirectory(${sensors_clone_SOURCE_DIR}/examples/custom_sensor ${sensors_cl

add_library(${PROJECT_NAME} SHARED ${PROJECT_NAME}.cc)
target_link_libraries(${PROJECT_NAME}
PRIVATE gz-plugin${GZ_PLUGIN_VER}::gz-plugin${GZ_PLUGIN_VER}
PRIVATE gz-sim${GZ_SIM_VER}::gz-sim${GZ_SIM_VER}
PRIVATE gz-sensors${GZ_SENSORS_VER}::gz-sensors${GZ_SENSORS_VER}
PRIVATE odometer
PRIVATE
gz-plugin${GZ_PLUGIN_VER}::gz-plugin${GZ_PLUGIN_VER}
gz-sim${GZ_SIM_VER}::gz-sim${GZ_SIM_VER}
gz-sensors${GZ_SENSORS_VER}::gz-sensors${GZ_SENSORS_VER}
odometer
)
target_include_directories(${PROJECT_NAME}
PUBLIC ${sensors_clone_SOURCE_DIR}/examples/custom_sensor)
3 changes: 2 additions & 1 deletion examples/standalone/gtest_setup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ set(GZ_SIM_VER ${gz-sim8_VERSION_MAJOR})
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
# Version 1.14. Use commit hash to prevent tag relocation
URL https://github.com/google/googletest/archive/f8d7d77c06936315286eb55f8de22cd23c188571.zip
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,8 @@ class state_transition_table {
void
check_default_transition()
{
auto const& ttable = transition_table<none>( state_indexes{} );
auto st = state_indexes{};
auto const& ttable = transition_table<none>( st );
j-rivero marked this conversation as resolved.
Show resolved Hide resolved
ttable[current_state()](*this, none{});
}

Expand All @@ -544,15 +545,17 @@ class state_transition_table {
void
exit(Event&& event)
{
auto const& table = exit_table<Event>( state_indexes{} );
auto st = state_indexes{};
auto const& table = exit_table<Event>( st );
j-rivero marked this conversation as resolved.
Show resolved Hide resolved
table[current_state()](states_, ::std::forward<Event>(event), *fsm_);
}

template < typename Event >
actions::event_process_result
process_transition_event(Event&& event)
{
auto const& inv_table = transition_table<Event>( state_indexes{} );
auto st = state_indexes{};
auto const& inv_table = transition_table<Event>( st );
j-rivero marked this conversation as resolved.
Show resolved Hide resolved
return inv_table[current_state()](*this, ::std::forward<Event>(event));
}

Expand Down Expand Up @@ -655,10 +658,11 @@ class state_transition_table {
event_set
current_handled_events() const
{
auto const& table = get_current_events_table(state_indexes{});
auto st = state_indexes{};
auto const& table = get_current_events_table(st);
auto res = table[current_state_](states_);
auto const& available_transitions
= get_available_transitions_table(state_indexes{});
= get_available_transitions_table(st);
auto const& trans = available_transitions[current_state_];
res.insert( trans.begin(), trans.end());
return res;
Expand All @@ -667,7 +671,8 @@ class state_transition_table {
event_set
current_deferrable_events() const
{
auto const& table = get_current_deferred_events_table(state_indexes{});
auto st = state_indexes{};
auto const& table = get_current_deferred_events_table(st);
return table[current_state_](states_);
}

Expand Down
Loading