apps: cam: Fix compilation error with clang when libtiff-4 is not found
When libtiff-4 is not found, the private camera_ member of the FileSink
class is set but never used. This causes a compilation error with clang:
In file included from ../../src/apps/cam/file_sink.cpp:19:
../../src/apps/cam/file_sink.h:39:27: error: private field 'camera_' is not used [-Werror,-Wunused-private-field]
const libcamera::Camera *camera_;
Fix by making the camera_ member field conditional on HAVE_TIFF.
Fixes: 6404b163bc
("cam: file_sink: Add support for DNG output")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
24f8ef763a
commit
dac1a0549a
2 changed files with 8 additions and 2 deletions
|
@ -21,10 +21,14 @@
|
|||
|
||||
using namespace libcamera;
|
||||
|
||||
FileSink::FileSink(const libcamera::Camera *camera,
|
||||
FileSink::FileSink([[maybe_unused]] const libcamera::Camera *camera,
|
||||
const std::map<const libcamera::Stream *, std::string> &streamNames,
|
||||
const std::string &pattern)
|
||||
: camera_(camera), streamNames_(streamNames), pattern_(pattern)
|
||||
:
|
||||
#ifdef HAVE_TIFF
|
||||
camera_(camera),
|
||||
#endif
|
||||
streamNames_(streamNames), pattern_(pattern)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ private:
|
|||
libcamera::FrameBuffer *buffer,
|
||||
const libcamera::ControlList &metadata);
|
||||
|
||||
#ifdef HAVE_TIFF
|
||||
const libcamera::Camera *camera_;
|
||||
#endif
|
||||
std::map<const libcamera::Stream *, std::string> streamNames_;
|
||||
std::string pattern_;
|
||||
std::map<libcamera::FrameBuffer *, std::unique_ptr<Image>> mappedBuffers_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue