Skip to content

Commit

Permalink
Refs #20543: Fix windows and mac errors and warnings
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
  • Loading branch information
JesusPoderoso committed Mar 27, 2024
1 parent 88b05c9 commit c2dcf69
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions examples/cpp/hello_world/CLIParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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";
}
Expand Down
4 changes: 2 additions & 2 deletions examples/cpp/hello_world/ListenerSubscriberApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions examples/cpp/hello_world/PublisherApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ void PublisherApp::on_publication_matched(
{
if (info.current_count_change == 1)
{
matched_ = info.current_count;
matched_ = static_cast<int16_t>(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<int16_t>(info.current_count);
std::cout << "Publisher unmatched." << std::endl;
}
else
Expand Down
4 changes: 2 additions & 2 deletions examples/cpp/hello_world/WaitsetSubscriberApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit c2dcf69

Please sign in to comment.