ros2/rviz

:farmer: warnings in ros_image_texture.cpp:477 (all nightly builds)

Opened this issue · 0 comments

Description

After mark YUV encodings as deprecated, ros_image_texture.cpp showed warnings for Rolling

Reference builds (all nightlies):

Warning ros_image_texture.cpp:477:

/home/jenkins-agent/workspace/nightly_linux_debug/ws/src/ros2/rviz/rviz_default_plugins/src/rviz_default_plugins/displays/image/ros_image_texture.cpp: In member function ‘rviz_default_plugins::displays::ImageData rviz_default_plugins::displays::ROSImageTexture::setFormatAndNormalizeDataIfNecessary(const std::string&, const uint8_t*, size_t)’:
/home/jenkins-agent/workspace/nightly_linux_debug/ws/src/ros2/rviz/rviz_default_plugins/src/rviz_default_plugins/displays/image/ros_image_texture.cpp:477:56: warning: ‘sensor_msgs::image_encodings::YUV422’ is deprecated: use sensor_msgs::image_encodings::UYVY [-Wdeprecated-declarations]
  477 |   } else if (encoding == sensor_msgs::image_encodings::YUV422) {
      |                                                        ^~~~~~
In file included from /home/jenkins-agent/workspace/nightly_linux_debug/ws/src/ros2/rviz/rviz_default_plugins/src/rviz_default_plugins/displays/image/ros_image_texture.cpp:47:
/home/jenkins-agent/workspace/nightly_linux_debug/ws/install/sensor_msgs/include/sensor_msgs/sensor_msgs/image_encodings.hpp:101:12: note: declared here
  101 | const char YUV422[] = "yuv422";  // deprecated
      |            ^~~~~~
/home/jenkins-agent/workspace/nightly_linux_debug/ws/src/ros2/rviz/rviz_default_plugins/src/rviz_default_plugins/displays/image/ros_image_texture.cpp:479:56: warning: ‘sensor_msgs::image_encodings::YUV422_YUY2’ is deprecated: use sensor_msgs::image_encodings::YUYV [-Wdeprecated-declarations]
  479 |   } else if (encoding == sensor_msgs::image_encodings::YUV422_YUY2) {
      |                                                        ^~~~~~~~~~~
/home/jenkins-agent/workspace/nightly_linux_debug/ws/install/sensor_msgs/include/sensor_msgs/sensor_msgs/image_encodings.hpp:105:12: note: declared here
  105 | const char YUV422_YUY2[] = "yuv422_yuy2";  // deprecated
      |            ^~~~~~~~~~~