From 34258b2447ea3d5fdb3a20a148ee950ce62fc20362941cc436a5b1bb78530b84 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 13 Mar 2023 09:02:16 +0000 Subject: [PATCH] Accepting request 1071073 from home:marxin:branches:graphics - Disable warning in silent-Werror_dangling-reference.patch based compiler version. OBS-URL: https://build.opensuse.org/request/show/1071073 OBS-URL: https://build.opensuse.org/package/show/graphics/libcamera?expand=0&rev=39 --- libcamera.changes | 6 ++++++ silent-Werror_dangling-reference.patch | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/libcamera.changes b/libcamera.changes index 582de2e..9952b1c 100644 --- a/libcamera.changes +++ b/libcamera.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 13 08:48:30 UTC 2023 - Martin Liška + +- Disable warning in silent-Werror_dangling-reference.patch based + compiler version. + ------------------------------------------------------------------- Wed Mar 8 09:21:29 UTC 2023 - Martin Liška diff --git a/silent-Werror_dangling-reference.patch b/silent-Werror_dangling-reference.patch index 349c5ae..9785ce9 100644 --- a/silent-Werror_dangling-reference.patch +++ b/silent-Werror_dangling-reference.patch @@ -1,15 +1,21 @@ diff --git a/src/apps/cam/file_sink.cpp b/src/apps/cam/file_sink.cpp -index b32aad24..5fb07526 100644 +index b32aad24..9a543dc1 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, +@@ -114,7 +114,16 @@ void FileSink::writeBuffer(const Stream *stream, FrameBuffer *buffer, } for (unsigned int i = 0; i < buffer->planes().size(); ++i) { ++ ++#if __GNUC__ >= 13 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdangling-reference" ++#endif ++ const FrameMetadata::Plane &meta = buffer->metadata().planes()[i]; ++#if __GNUC__ >= 13 +#pragma GCC diagnostic pop ++#endif Span data = image->data(i); unsigned int length = std::min(meta.bytesused, data.size());