diff --git a/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp b/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp index 327499e3..b91e7687 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp @@ -96,7 +96,7 @@ class rmw_context_impl_s::Data final throw std::runtime_error("Error setting up zenoh session. "); } - rmw_ret_t ret; + rmw_ret_t ret = RMW_RET_ERROR; // Verify if the zenoh router is running if configured. const std::optional configured_connection_attempts = diff --git a/rmw_zenoh_cpp/src/zenohd/main.cpp b/rmw_zenoh_cpp/src/zenohd/main.cpp index ab791a03..bbba50f1 100644 --- a/rmw_zenoh_cpp/src/zenohd/main.cpp +++ b/rmw_zenoh_cpp/src/zenohd/main.cpp @@ -17,16 +17,15 @@ #include #include +#include +#include + #ifdef _WIN32 #include #else #include #endif - -#include -#include - #include "../detail/zenoh_config.hpp" #include "rmw/error_handling.h"