From patchwork Wed Dec 3 09:14:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 25344 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9FE55C3260 for ; Wed, 3 Dec 2025 09:14:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0702E60F4C; Wed, 3 Dec 2025 10:14:45 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ArNq1o1M"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2FB5F60D39 for ; Wed, 3 Dec 2025 10:14:42 +0100 (CET) Received: from [192.168.1.104] (net-93-65-100-155.cust.vodafonedsl.it [93.65.100.155]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1AD2411D5; Wed, 3 Dec 2025 10:12:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1764753147; bh=ViwOVu9KPvO9NVPh7IlZCO2GIqUbssGWLqWxM7acVvc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ArNq1o1MJVLsBZpIt0t7rc9rB/BIWmpuKezPNjuN7Dz0CUHWpLnifCR2yzAeo7xNp wPplSIHEqDVV8cbWhmAqSXcJnyhUdNLl4ufYPZ/mFMsXZGALQkge/958uTjC0HQaUH 3Byr/PFFPsxDa0xYhFeODhiU4Bz5q/SfIHWLqNZc= From: Jacopo Mondi Date: Wed, 03 Dec 2025 10:14:21 +0100 Subject: [PATCH v3 1/4] libcamera: base: Wrap MIME-Version: 1.0 Message-Id: <20251203-rzv2h-pre-v3-1-1493e0638626@ideasonboard.com> References: <20251203-rzv2h-pre-v3-0-1493e0638626@ideasonboard.com> In-Reply-To: <20251203-rzv2h-pre-v3-0-1493e0638626@ideasonboard.com> To: Daniel Scally , libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Laurent Pinchart , Stefan Klug X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2493; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=S3CsftrNrQZfUspeiZ2HEbUMI6Klm6nwBgv+4OryKvA=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBpL/+AxWnje9mm74qDF6TJnObEOlhU/z/4qn2fO 3CzK5E6qXSJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaS//gAAKCRByNAaPFqFW PGOqD/0Qgz4FkpLjIbSukhS2egKZFzZVJWUPI0yxs0wFMBcUuJNxK037dETfQy+6pnt+Q6MADK8 ZW4ZditLQ/j216HnbZiqIpAhMsphVkpUNAzG0Z67R84QnoxITKO2nSz6nHkwxJv82Jo7TDVkaOy vR+l3HsksS7AO3aOsewmlZzQLDUwc4kqfHvoztHim9c0qXrrVQmN83h2lpVIuPP+2YxP108vbqO RtX59jj+Wif8rF+KIFd0vK+FijKKJhTG0X+xJfUdKl155ONLgHl+4Q6FWeROwQK9jHSU9AC0VD5 eMIPjXDaxne8W09vO6NUv60qgHY7Pc+lRia067n6q9I+mWDOb89EMI+Z9bLcfAYAUpHrqNN7U5F D1aZkU9FDCorEAnOiGgUi8/dLyeMH5WkSkAC9UvowrlXMG9hExvs00ufVFunIC6eDYerEU//24B 1ScYPJsoMCSbvRd8S2FbDjYYMO0/LW6j7J8X8BLFJjpPE4hAkAkh1ULHRwAXTx5w7ngIBxr2zCN f3NoZemQ9dnQM7Ie0BZpRieD3icXLLjvTYZ+4w4tAEfRCW5lMqr2awaT6b6PnnvcMowxJrbR0C+ Ue8LeTAmf1ui9MIKM1lEiaFmhABrfrCjEjqzekrJDG+F++gCX/W/hAnSNOBHaqagfD1DjmD5YYK 9KbgJzpkO4Ws99A== X-Developer-Key: i=jacopo.mondi@ideasonboard.com; a=openpgp; fpr=72392EDC88144A65C701EA9BA5826A2587AD026B X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Daniel Scally Provide a wrapper for regex.h to work around the false-positive compilation errors that crop up in some versions of gcc. Suggested-by: Laurent Pinchart Signed-off-by: Daniel Scally Reviewed-by: Laurent Pinchart Reviewed-by: Stefan Klug Signed-off-by: Jacopo Mondi --- include/libcamera/base/meson.build | 1 + include/libcamera/base/regex.h | 13 +++++++++++++ src/libcamera/v4l2_subdevice.cpp | 8 +------- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build index f28ae4d42a69c755710b51ffc92976bb6fb6a0d8..f84b514191949f625c3c70f116059ee70de464b5 100644 --- a/include/libcamera/base/meson.build +++ b/include/libcamera/base/meson.build @@ -24,6 +24,7 @@ libcamera_base_private_headers = files([ 'message.h', 'mutex.h', 'private.h', + 'regex.h', 'semaphore.h', 'thread.h', 'thread_annotations.h', diff --git a/include/libcamera/base/regex.h b/include/libcamera/base/regex.h new file mode 100644 index 0000000000000000000000000000000000000000..1ae21c1f971387da48282d9144827c75270cdcc6 --- /dev/null +++ b/include/libcamera/base/regex.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2025, Ideas on Board Oy + * + * std::regex wrapper for gcc + */ + +#pragma GCC diagnostic push +#if defined __SANITIZE_ADDRESS__ && defined __OPTIMIZE__ +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif +#include +#pragma GCC diagnostic pop diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp index 31a2ac72a7ee6f980b6110ba73919f74d3b7bbe2..b75edffe762155e428e039b4884bed3d469ba751 100644 --- a/src/libcamera/v4l2_subdevice.cpp +++ b/src/libcamera/v4l2_subdevice.cpp @@ -13,17 +13,11 @@ #include #include -#pragma GCC diagnostic push -#if defined __SANITIZE_ADDRESS__ && defined __OPTIMIZE__ -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif -#include -#pragma GCC diagnostic pop - #include #include #include +#include #include #include