Skip to content

Commit

Permalink
some more warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Dec 5, 2024
1 parent a49bc25 commit d08402b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/meas_cutter/src/config_file_parser.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2019 Continental Corporation
* Copyright (C) 2016 - 2024 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,7 +21,7 @@
#include <iostream>
#include <ecal_utils/filesystem.h>

#define YAML_CPP_STATIC_DEFINE
//#define YAML_CPP_STATIC_DEFINE // set by CMake
#include <yaml-cpp/yaml.h>

#include "utils.h"
Expand Down
4 changes: 2 additions & 2 deletions app/meas_cutter/src/utils.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2019 Continental Corporation
* Copyright (C) 2016 - 2024 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,7 @@
#include <fstream>
#include <algorithm>

#define YAML_CPP_STATIC_DEFINE
//#define YAML_CPP_STATIC_DEFINE // set by CMake
#include "yaml-cpp/yaml.h"

#include <ecal_utils/str_convert.h>
Expand Down
12 changes: 10 additions & 2 deletions ecal/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,19 @@ endif()
# public header
######################################
set(ecal_header_cmn
include/ecal/types/logging.h
include/ecal/types/monitoring.h
include/ecal/config/application.h
include/ecal/config/configuration.h
include/ecal/config/logging.h
include/ecal/config/monitoring.h
include/ecal/config/publisher.h
include/ecal/config/registration.h
include/ecal/config/service.h
include/ecal/config/subscriber.h
include/ecal/config/time.h
include/ecal/config/transport_layer.h
include/ecal/config/user_arguments.h
include/ecal/types/logging.h
include/ecal/types/monitoring.h
include/ecal/ecal.h
include/ecal/ecal_callback.h
include/ecal/ecal_config.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int main(int argc, char **argv)
pb::People::Person person;

eCAL::protobuf::CSubscriber<pb::People::Person> sub("person");
auto receive_lambda = [&sub](const char* /*topic_name_*/, const pb::People::Person& person_, const long long /*time_*/, const long long /*clock_*/, const long long /*id_*/){
auto receive_lambda = [](const char* /*topic_name_*/, const pb::People::Person& person_, const long long /*time_*/, const long long /*clock_*/, const long long /*id_*/){
std::cout << "------------------------------------------" << std::endl;
std::cout << " RECEIVED " << std::endl;
std::cout << "------------------------------------------" << std::endl;
Expand Down
2 changes: 0 additions & 2 deletions ecal/tests/cpp/pubsub_test/src/pubsub_connection_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ TEST(core_cpp_pubsub, TestSubscriberIsPublishedTiming)
std::string first_received_sample;
auto subscriber_function = [&do_start_publication, &publication_finished, &publisher_seen_at_subscription_start, &first_received_sample]() {
eCAL::CSubscriber sub("blob");
bool received(false);
const auto max_sub_count(10);
auto sub_count(0);
auto receive_lambda = [&max_sub_count, &sub_count, &publisher_seen_at_subscription_start, &first_received_sample, &sub](const char* /*topic_name_*/, const struct eCAL::SReceiveCallbackData* data_) {
Expand Down Expand Up @@ -171,7 +170,6 @@ TEST(core_cpp_pubsub, TestPublisherIsSubscribedTiming)
std::string first_received_sample;
auto subscriber_function = [&publication_finished, &publisher_seen_at_subscription_start, &first_received_sample]() {
eCAL::CSubscriber sub("blob");
bool received(false);
const auto max_sub_count(10);
auto sub_count(0);
auto receive_lambda = [&max_sub_count, &sub_count, &publisher_seen_at_subscription_start, &first_received_sample, &sub](const char* /*topic_name_*/, const struct eCAL::SReceiveCallbackData* data_) {
Expand Down
4 changes: 2 additions & 2 deletions ecal/tests/cpp/pubsub_test/src/pubsub_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ TEST(core_cpp_pubsub, SubscriberReconnection)
size_t callback_received_count(0);

eCAL::string::CSubscriber<std::string> sub_foo("foo");
auto receive_lambda = [&sub_foo, &callback_received_count](const char* /*topic_*/, const std::string& /*msg*/, long long /*time_*/, long long /*clock_*/, long long /*id_*/) {
auto receive_lambda = [&callback_received_count](const char* /*topic_*/, const std::string& /*msg*/, long long /*time_*/, long long /*clock_*/, long long /*id_*/) {
std::cout << "Receiving in scope 1" << std::endl;
callback_received_count++;
};
Expand All @@ -605,7 +605,7 @@ TEST(core_cpp_pubsub, SubscriberReconnection)
size_t callback_received_count(0);

eCAL::string::CSubscriber<std::string> sub_foo("foo");
auto receive_lambda = [&sub_foo, &callback_received_count](const char* /*topic_*/, const std::string& /*msg*/, long long /*time_*/, long long /*clock_*/, long long /*id_*/) {
auto receive_lambda = [&callback_received_count](const char* /*topic_*/, const std::string& /*msg*/, long long /*time_*/, long long /*clock_*/, long long /*id_*/) {
std::cout << "Receiving in scope 2" << std::endl;
callback_received_count++;
};
Expand Down

0 comments on commit d08402b

Please sign in to comment.