libcamera: remove unused buffer variable in LibCamera::stop()

To fix build warning about a variable being unused in LibCamera::stop():

[1/2] Compiling C++ object spa/plugins/libcamera/libspa-libcamera.so.p/libcamera_wrapper.cpp.o
../spa/plugins/libcamera/libcamera_wrapper.cpp: In member function ‘void LibCamera::stop()’:
../spa/plugins/libcamera/libcamera_wrapper.cpp:531:58: warning: unused variable ‘buffer’ [-Wunused-variable]
  531 |                 for (const std::unique_ptr<FrameBuffer> &buffer : this->allocator_->buffers(stream)) {
      |                                                          ^~~~~~
This commit is contained in:
Javier Martinez Canillas 2021-07-22 20:17:09 +02:00 committed by Wim Taymans
parent 5471a0018b
commit 76cb5c1169

View file

@ -524,13 +524,12 @@ extern "C" {
void LibCamera::stop() {
this->disconnect();
uint32_t bufIdx = 0;
StreamConfiguration &cfg = this->config_->at(0);
Stream *stream = cfg.stream();
uint32_t nbuffers = this->allocator_->buffers(stream).size();
for (const std::unique_ptr<FrameBuffer> &buffer : this->allocator_->buffers(stream)) {
for (uint32_t bufIdx = 0; bufIdx < nbuffers; bufIdx++) {
delete [] this->fd_[bufIdx];
bufIdx++;
}
delete [] this->fd_;