{"id":25344,"url":"https://patchwork.libcamera.org/api/1.1/patches/25344/?format=json","web_url":"https://patchwork.libcamera.org/patch/25344/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20251203-rzv2h-pre-v3-1-1493e0638626@ideasonboard.com>","date":"2025-12-03T09:14:21","name":"[v3,1/4] libcamera: base: Wrap <regex.h>","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"d9da09aa17fc93c65e3d6013859ca51ed6f6dcd4","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/1.1/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25344/mbox/","series":[{"id":5634,"url":"https://patchwork.libcamera.org/api/1.1/series/5634/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5634","date":"2025-12-03T09:14:20","name":"Use regular expressions for entity name matching","version":3,"mbox":"https://patchwork.libcamera.org/series/5634/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25344/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25344/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9FE55C3260\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Dec 2025 09:14:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0702E60F4C;\n\tWed,  3 Dec 2025 10:14:45 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2FB5F60D39\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Dec 2025 10:14:42 +0100 (CET)","from [192.168.1.104] (net-93-65-100-155.cust.vodafonedsl.it\n\t[93.65.100.155])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1AD2411D5;\n\tWed,  3 Dec 2025 10:12:27 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ArNq1o1M\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764753147;\n\tbh=ViwOVu9KPvO9NVPh7IlZCO2GIqUbssGWLqWxM7acVvc=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=ArNq1o1MJVLsBZpIt0t7rc9rB/BIWmpuKezPNjuN7Dz0CUHWpLnifCR2yzAeo7xNp\n\twPplSIHEqDVV8cbWhmAqSXcJnyhUdNLl4ufYPZ/mFMsXZGALQkge/958uTjC0HQaUH\n\t3Byr/PFFPsxDa0xYhFeODhiU4Bz5q/SfIHWLqNZc=","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Date":"Wed, 03 Dec 2025 10:14:21 +0100","Subject":"[PATCH v3 1/4] libcamera: base: Wrap <regex.h>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","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 <dan.scally@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>, \n\tStefan Klug <stefan.klug@ideasonboard.com>","X-Mailer":"b4 0.14.2","X-Developer-Signature":"v=1; a=openpgp-sha256; l=2493;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=S3CsftrNrQZfUspeiZ2HEbUMI6Klm6nwBgv+4OryKvA=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBpL/+AxWnje9mm74qDF6TJnObEOlhU/z/4qn2fO\n\t3CzK5E6qXSJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaS//gAAKCRByNAaPFqFW\n\tPGOqD/0Qgz4FkpLjIbSukhS2egKZFzZVJWUPI0yxs0wFMBcUuJNxK037dETfQy+6pnt+Q6MADK8\n\tZW4ZditLQ/j216HnbZiqIpAhMsphVkpUNAzG0Z67R84QnoxITKO2nSz6nHkwxJv82Jo7TDVkaOy\n\tvR+l3HsksS7AO3aOsewmlZzQLDUwc4kqfHvoztHim9c0qXrrVQmN83h2lpVIuPP+2YxP108vbqO\n\tRtX59jj+Wif8rF+KIFd0vK+FijKKJhTG0X+xJfUdKl155ONLgHl+4Q6FWeROwQK9jHSU9AC0VD5\n\teMIPjXDaxne8W09vO6NUv60qgHY7Pc+lRia067n6q9I+mWDOb89EMI+Z9bLcfAYAUpHrqNN7U5F\n\tD1aZkU9FDCorEAnOiGgUi8/dLyeMH5WkSkAC9UvowrlXMG9hExvs00ufVFunIC6eDYerEU//24B\n\t1ScYPJsoMCSbvRd8S2FbDjYYMO0/LW6j7J8X8BLFJjpPE4hAkAkh1ULHRwAXTx5w7ngIBxr2zCN\n\tf3NoZemQ9dnQM7Ie0BZpRieD3icXLLjvTYZ+4w4tAEfRCW5lMqr2awaT6b6PnnvcMowxJrbR0C+\n\tUe8LeTAmf1ui9MIKM1lEiaFmhABrfrCjEjqzekrJDG+F++gCX/W/hAnSNOBHaqagfD1DjmD5YYK\n\t9KbgJzpkO4Ws99A==","X-Developer-Key":"i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=72392EDC88144A65C701EA9BA5826A2587AD026B","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Daniel Scally <dan.scally@ideasonboard.com>\n\nProvide a wrapper for regex.h to work around the false-positive\ncompilation errors that crop up in some versions of gcc.\n\nSuggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Daniel Scally <dan.scally@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n include/libcamera/base/meson.build |  1 +\n include/libcamera/base/regex.h     | 13 +++++++++++++\n src/libcamera/v4l2_subdevice.cpp   |  8 +-------\n 3 files changed, 15 insertions(+), 7 deletions(-)","diff":"diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\nindex f28ae4d42a69c755710b51ffc92976bb6fb6a0d8..f84b514191949f625c3c70f116059ee70de464b5 100644\n--- a/include/libcamera/base/meson.build\n+++ b/include/libcamera/base/meson.build\n@@ -24,6 +24,7 @@ libcamera_base_private_headers = files([\n     'message.h',\n     'mutex.h',\n     'private.h',\n+    'regex.h',\n     'semaphore.h',\n     'thread.h',\n     'thread_annotations.h',\ndiff --git a/include/libcamera/base/regex.h b/include/libcamera/base/regex.h\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..1ae21c1f971387da48282d9144827c75270cdcc6\n--- /dev/null\n+++ b/include/libcamera/base/regex.h\n@@ -0,0 +1,13 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2025, Ideas on Board Oy\n+ *\n+ * std::regex wrapper for gcc\n+ */\n+\n+#pragma GCC diagnostic push\n+#if defined __SANITIZE_ADDRESS__ && defined __OPTIMIZE__\n+#pragma GCC diagnostic ignored \"-Wmaybe-uninitialized\"\n+#endif\n+#include <regex>\n+#pragma GCC diagnostic pop\ndiff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 31a2ac72a7ee6f980b6110ba73919f74d3b7bbe2..b75edffe762155e428e039b4884bed3d469ba751 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -13,17 +13,11 @@\n #include <sys/ioctl.h>\n #include <unistd.h>\n \n-#pragma GCC diagnostic push\n-#if defined __SANITIZE_ADDRESS__ && defined __OPTIMIZE__\n-#pragma GCC diagnostic ignored \"-Wmaybe-uninitialized\"\n-#endif\n-#include <regex>\n-#pragma GCC diagnostic pop\n-\n #include <linux/media-bus-format.h>\n #include <linux/v4l2-subdev.h>\n \n #include <libcamera/base/log.h>\n+#include <libcamera/base/regex.h>\n #include <libcamera/base/utils.h>\n \n #include <libcamera/geometry.h>\n","prefixes":["v3","1/4"]}