Skip to content

videoio: obsensor: OB_EXT_CMD10 is defined, but unused. #25522

@Kumataro

Description

@Kumataro

System Information

OpenCV version: 4.x ( b5cf4f1 )
Operating System / Platform: Ubuntu 24.04
Compiler & compiler version: clang++ 18.1.3

Detailed description

With clang++-18, there is a comile warning in videoio.
OB_EXT_CMD10 seems to be no longer to use.

[985/1550] Building CXX object modules/videoio/CMakeFiles...io.dir/src/cap_obsensor/obsensor_uvc_stream_channel.cpp.
/home/kmtr/work/opencv4/modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.cpp:48:15: warning: unused variable 'OB_EXT_CMD10' [-Wunused-const-variable]
   48 | const uint8_t OB_EXT_CMD10[16] = { 0x47, 0x4d, 0x04, 0x00, 0x02, 0x00, 0xfa, 0x13, 0x3f, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
      |               ^~~~~~~~~~~~
1 warning generated.

Steps to reproduce

$ cmake -S opencv4 -B build4-main_clang18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18 -GNinja
$ cmake --build build4-main_clang18
[985/1550] Building CXX object modules/videoio/CMakeFiles...io.dir/src/cap_obsensor/obsensor_uvc_stream_channel.cpp.
/home/kmtr/work/opencv4/modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.cpp:48:15: warning: unused variable 'OB_EXT_CMD10' [-Wunused-const-variable]
   48 | const uint8_t OB_EXT_CMD10[16] = { 0x47, 0x4d, 0x04, 0x00, 0x02, 0x00, 0xfa, 0x13, 0x3f, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
      |               ^~~~~~~~~~~~
1 warning generated.

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions