Skip to content

Commit

Permalink
Fixed warnings and errors in multiple tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannemn committed Dec 5, 2024
1 parent 5fcd5ea commit 544867e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions ecal/core/include/ecal/ecal_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include <ecal/ecal_os.h>
#include <ecal/config/configuration.h>
#include <ecal/ecal_types.h>

namespace eCAL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void ProtoMsgCallback(const char* topic_name_, const std::string& msg_, long lon
std::cout << std::endl;
}

int main(int argc, char **argv)
int main()
{
// initialize eCAL API
eCAL::Initialize("proto_dyn");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "person.pb.h"

int main(int argc, char **argv)
int main()
{
// initialize eCAL API
eCAL::Initialize("person publisher dynamic");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <chrono>
#include <thread>

int main(int argc, char** argv)
int main()
{
std::cout << "-------------------------------" << std::endl;
std::cout << " HELLO WORLD RECEIVER" << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "proto_json_conv.h"

// main entry
int main(int argc, char **argv)
int main()
{
// initialize eCAL API
eCAL::Initialize("ping client dynamic");
Expand Down
8 changes: 4 additions & 4 deletions ecal/tests/cpp/config_test/src/config_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TEST(core_cpp_config /*unused*/, user_config_passing /*unused*/)
// Publisher options
const bool pub_use_shm = false;

eCAL::Configuration custom_config(0, nullptr);
eCAL::Configuration custom_config;
try
{
custom_config.subscriber.drop_out_of_order_messages = drop_out_of_order_messages;
Expand Down Expand Up @@ -112,7 +112,7 @@ TEST(core_cpp_config /*unused*/, user_config_passing /*unused*/)

TEST(core_cpp_config /*unused*/, user_config_death_test /*unused*/)
{
eCAL::Configuration custom_config(0, nullptr);
eCAL::Configuration custom_config;

// Test the IpAddressV4 class with wrong values
ASSERT_THROW(
Expand Down Expand Up @@ -189,8 +189,8 @@ TEST(core_cpp_config /*unused*/, config_custom_datatypes_tests /*unused*/)
EXPECT_EQ(s1, s2);

// test copy method for config structure
eCAL::Configuration config1(0, nullptr);
eCAL::Configuration config2(0, nullptr);
eCAL::Configuration config1;
eCAL::Configuration config2;
std::string testValue = "234.0.3.2";
config2.transport_layer.udp.network.group = testValue;
auto& config2ref = config2;
Expand Down
2 changes: 1 addition & 1 deletion ecal/tests/cpp/pubsub_test/src/pubsub_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ TEST(core_cpp_pubsub, SimpleMessage1)
std::string recv_s;

// initialize eCAL API
eCAL::Initialize0, nullptr, "pubsub_test");
eCAL::Initialize("pubsub_test");

// create publisher for topic "foo"
eCAL::CPublisher pub("foo");
Expand Down

0 comments on commit 544867e

Please sign in to comment.