forked from pool/libcamera
Jan Engelhardt
b5bf0ca046
- Add silent-Werror_dangling-reference.patch that addressed a false-positive warning in GCC: https://bugs.libcamera.org/show_bug.cgi?id=185. OBS-URL: https://build.opensuse.org/request/show/1070110 OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=38
16 lines
629 B
Diff
16 lines
629 B
Diff
diff --git a/src/apps/cam/file_sink.cpp b/src/apps/cam/file_sink.cpp
|
|
index b32aad24..5fb07526 100644
|
|
--- a/src/apps/cam/file_sink.cpp
|
|
+++ b/src/apps/cam/file_sink.cpp
|
|
@@ -114,7 +114,10 @@ void FileSink::writeBuffer(const Stream *stream, FrameBuffer *buffer,
|
|
}
|
|
|
|
for (unsigned int i = 0; i < buffer->planes().size(); ++i) {
|
|
+#pragma GCC diagnostic push
|
|
+#pragma GCC diagnostic ignored "-Wdangling-reference"
|
|
const FrameMetadata::Plane &meta = buffer->metadata().planes()[i];
|
|
+#pragma GCC diagnostic pop
|
|
|
|
Span<uint8_t> data = image->data(i);
|
|
unsigned int length = std::min<unsigned int>(meta.bytesused, data.size());
|