diff --git a/examples/cpp/hello_world/CLIParser.hpp b/examples/cpp/hello_world/CLIParser.hpp index 32005d178b7..6b6a03d912a 100644 --- a/examples/cpp/hello_world/CLIParser.hpp +++ b/examples/cpp/hello_world/CLIParser.hpp @@ -147,12 +147,12 @@ class CLIParser } catch (const std::invalid_argument& e) { - EPROSIMA_LOG_ERROR(CLI_PARSER, "invalid sample argument for " + arg); + EPROSIMA_LOG_ERROR(CLI_PARSER, "invalid sample argument for " + arg + ": " + e.what()); print_help(EXIT_FAILURE); } catch (const std::out_of_range& e) { - EPROSIMA_LOG_ERROR(CLI_PARSER, "sample argument out of range for " + arg); + EPROSIMA_LOG_ERROR(CLI_PARSER, "sample argument out of range for " + arg + ": " + e.what()); print_help(EXIT_FAILURE); } } @@ -193,10 +193,12 @@ class CLIParser return "SIGINT"; case SIGTERM: return "SIGTERM"; +#ifndef _WIN32 case SIGQUIT: return "SIGQUIT"; case SIGHUP: return "SIGHUP"; +#endif // _WIN32 default: return "UNKNOWN SIGNAL"; } diff --git a/examples/cpp/hello_world/ListenerSubscriberApp.hpp b/examples/cpp/hello_world/ListenerSubscriberApp.hpp index cfe3896b3c2..cd22791dec6 100644 --- a/examples/cpp/hello_world/ListenerSubscriberApp.hpp +++ b/examples/cpp/hello_world/ListenerSubscriberApp.hpp @@ -57,10 +57,10 @@ class ListenerSubscriberApp : public Application, public DataReaderListener const SubscriptionMatchedStatus& info) override; //! Run subscriber - virtual void run(); + void run() override; //! Trigger the end of execution - virtual void stop(); + void stop() override; private: diff --git a/examples/cpp/hello_world/PublisherApp.cpp b/examples/cpp/hello_world/PublisherApp.cpp index 75751ba1f3f..b2d804bbcf5 100644 --- a/examples/cpp/hello_world/PublisherApp.cpp +++ b/examples/cpp/hello_world/PublisherApp.cpp @@ -108,13 +108,13 @@ void PublisherApp::on_publication_matched( { if (info.current_count_change == 1) { - matched_ = info.current_count; + matched_ = static_cast(info.current_count); std::cout << "Publisher matched." << std::endl; cv_.notify_one(); } else if (info.current_count_change == -1) { - matched_ = info.current_count; + matched_ = static_cast(info.current_count); std::cout << "Publisher unmatched." << std::endl; } else diff --git a/examples/cpp/hello_world/WaitsetSubscriberApp.hpp b/examples/cpp/hello_world/WaitsetSubscriberApp.hpp index 9b1c0180a87..cb27cc5c016 100644 --- a/examples/cpp/hello_world/WaitsetSubscriberApp.hpp +++ b/examples/cpp/hello_world/WaitsetSubscriberApp.hpp @@ -50,10 +50,10 @@ class WaitsetSubscriberApp : public Application ~WaitsetSubscriberApp(); //! Run subscriber - virtual void run(); + void run() override; //! Trigger the end of execution - virtual void stop(); + void stop() override; private: