Skip to content

Commit 87b8c53

Browse files
committed
fix warnings
1 parent f39c1c3 commit 87b8c53

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

depthai_examples/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ project(depthai_examples VERSION 2.10.5 LANGUAGES CXX C)
44
set(CMAKE_CXX_STANDARD 14)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
7-
add_compile_options(-g)
87

98
## is used, also find other catkin packages
109
if(POLICY CMP0057)
1110
cmake_policy(SET CMP0057 NEW)
1211
endif()
12+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
13+
add_compile_options(-Wall -Wextra -Wpedantic -Wno-deprecated-declarations -Wno-maybe-uninitialized)
14+
endif()
1315

1416
set(_opencv_version 4)
1517
find_package(OpenCV 4 QUIET COMPONENTS imgproc highgui)

depthai_ros_driver/CMakeLists.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ if(NOT CMAKE_C_STANDARD)
44
set(CMAKE_C_STANDARD 99)
55
endif()
66
if(NOT CMAKE_CXX_STANDARD)
7-
set(CMAKE_CXX_STANDARD 11)
7+
set(CMAKE_CXX_STANDARD 14)
88
endif()
99

1010
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
11-
add_compile_options(-Wall -Wextra -Wpedantic)
11+
add_compile_options(-Wall -Wextra -Wpedantic -Wno-deprecated-declarations -Wno-maybe-uninitialized)
1212
endif()
1313

1414
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
15-
add_compile_options(-g)
1615
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1716
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
1817
set(BUILD_SHARED_LIBS ON)

depthai_ros_driver/src/dai_nodes/base_node.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ dai::Node::Input BaseNode::getInput(int /*linkType*/) {
4848
}
4949
dai::Node::Input BaseNode::getInputByName(const std::string& /*name*/) {
5050
throw(std::runtime_error("getInputByName() not implemented"));
51-
};
51+
}
5252

5353
void BaseNode::closeQueues() {
5454
throw(std::runtime_error("closeQueues() not implemented"));
5555
}
5656
std::shared_ptr<dai::node::XLinkOut> BaseNode::setupXout(std::shared_ptr<dai::Pipeline> pipeline, const std::string& name) {
5757
return utils::setupXout(pipeline, name);
58-
};
58+
}
5959

6060
std::shared_ptr<sensor_helpers::ImagePublisher> BaseNode::setupOutput(std::shared_ptr<dai::Pipeline> pipeline,
6161
const std::string& qName,
6262
std::function<void(dai::Node::Input input)> nodeLink,
6363
bool isSynced,
6464
const utils::VideoEncoderConfig& encoderConfig) {
6565
return std::make_shared<sensor_helpers::ImagePublisher>(getROSNode(), pipeline, qName, nodeLink, isSynced, encoderConfig);
66-
};
66+
}
6767

6868
void BaseNode::setNames() {
6969
throw(std::runtime_error("setNames() not implemented"));
@@ -82,7 +82,7 @@ void BaseNode::link(dai::Node::Input /*in*/, int /*linkType = 0*/) {
8282
}
8383
std::vector<std::shared_ptr<sensor_helpers::ImagePublisher>> BaseNode::getPublishers() {
8484
return std::vector<std::shared_ptr<sensor_helpers::ImagePublisher>>();
85-
};
85+
}
8686

8787
void BaseNode::updateParams(parametersConfig& /*config*/) {
8888
return;

depthai_ros_driver/src/dai_nodes/sensors/img_pub.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ImagePublisher::ImagePublisher(ros::NodeHandle node,
2121
std::function<void(dai::Node::Input in)> linkFunc,
2222
bool synced,
2323
const utils::VideoEncoderConfig& encoderConfig)
24-
: node(node), encConfig(encoderConfig), qName(qName), synced(synced), it(node) {
24+
: node(node), it(node), encConfig(encoderConfig), qName(qName), synced(synced) {
2525
if(!synced) {
2626
xout = utils::setupXout(pipeline, qName);
2727
}
@@ -124,10 +124,10 @@ void ImagePublisher::createInfoManager(std::shared_ptr<dai::Device> device) {
124124
} else {
125125
infoManager->loadCameraInfo(pubConfig.calibrationFile);
126126
}
127-
};
127+
}
128128
ImagePublisher::~ImagePublisher() {
129129
closeQueue();
130-
};
130+
}
131131

132132
void ImagePublisher::closeQueue() {
133133
if(dataQ) dataQ->close();

depthai_ros_driver/src/utils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ std::shared_ptr<dai::node::XLinkOut> setupXout(std::shared_ptr<dai::Pipeline> pi
1717
xout->input.setWaitForMessage(false);
1818
xout->input.setQueueSize(1);
1919
return xout;
20-
};
20+
}
2121
} // namespace utils
2222
} // namespace depthai_ros_driver

0 commit comments

Comments
 (0)