Skip to content

Commit

Permalink
Refs #20575: Fix windows build issues
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
  • Loading branch information
JesusPoderoso committed May 27, 2024
1 parent c8a1b80 commit 704190d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions examples/cpp/configuration/CLIParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class CLIParser
}

// max value allowed taking into account that the input is receiving millisecond values
uint32_t max_duration = floor(std::numeric_limits<uint32_t>::max() * 1e-3); // = 4294967
uint32_t max_duration = static_cast<uint32_t>(floor(std::numeric_limits<uint32_t>::max() * 1e-3)); // = 4294967

for (int i = 2; i < argc; ++i)
{
Expand Down Expand Up @@ -346,8 +346,8 @@ class CLIParser
}
else
{
config.pub_config.ttl = static_cast<uint16_t>(input);
config.sub_config.ttl = static_cast<uint16_t>(input);
config.pub_config.ttl = static_cast<uint8_t>(input);
config.sub_config.ttl = static_cast<uint8_t>(input);
}
}
catch (const std::invalid_argument& e)
Expand Down Expand Up @@ -854,7 +854,7 @@ class CLIParser
}
else
{
config.pub_config.wait = static_cast<uint32_t>(input);
config.pub_config.wait = static_cast<uint16_t>(input);
}
}
catch (const std::invalid_argument& e)
Expand Down Expand Up @@ -1098,10 +1098,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/configuration/PublisherApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ class PublisherApp : public Application, public DataWriterListener

std::condition_variable cv_;

int16_t matched_;
int32_t matched_;

std::mutex mutex_;

uint16_t period_ms_;
uint32_t period_ms_;

uint16_t samples_;

Expand Down

0 comments on commit 704190d

Please sign in to comment.