From bfd5518d6b91ca1e06caf39b9be4841a17d1106c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Mon, 10 Feb 2025 12:38:13 +0100 Subject: [PATCH] libcamera: base: log: Ignore deprecations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `std::atomic_{load,store}()` with `std::shared_ptr` has been deprecated in C++20 in favour of `std::atomic>`. However, it is not available on all supported platforms. So ignore the deprecation warnings. The specialization is available since gcc (libstdc++) 12 and llvm (libc++) 15. Signed-off-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart Reviewed-by: Naushir Patuck --- src/libcamera/base/log.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp index 7d308afa..f26c8bfe 100644 --- a/src/libcamera/base/log.cpp +++ b/src/libcamera/base/log.cpp @@ -326,6 +326,11 @@ private: std::vector> categories_ LIBCAMERA_TSA_GUARDED_BY(mutex_); std::list> levels_; + /* + * \todo Use `std::atomic>` and drop the pragma + * once it works on all supported platforms. + */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" std::shared_ptr output_; };