From patchwork Mon Feb 24 22:04:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22854 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 4AEC7BF415 for ; Mon, 24 Feb 2025 22:05:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AF3AD68719; Mon, 24 Feb 2025 23:05:06 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="iw9fHluk"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5AFF16870E for ; Mon, 24 Feb 2025 23:05:02 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9F9E482A; Mon, 24 Feb 2025 23:03:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740434615; bh=tCrJlyp082j7WOX1a1l+duTfQIxi8EvqffXdAx0AoDY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iw9fHluk4o1VVQ3lcd4tKJD79nLhOPBOWTOlenB4ET5KVrQf85ix7h0hFtGbrAvzj 9tm5rHoLcsfAJCPP8BlTuD1Ca0H48Z3mJIiKEARzUtk2qaMrFq+6tVR+h5Bqm0RwQt kVwQfI89bECcJieXBMxasOMEProm5Wk/4CIcIhZ8= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Milan Zamazal Subject: [PATCH 2/2] meson: Enable the -Wnon-virtual-dtor compiler option Date: Tue, 25 Feb 2025 00:04:38 +0200 Message-ID: <20250224220438.21512-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250224220438.21512-1-laurent.pinchart@ideasonboard.com> References: <20250224220438.21512-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 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" A base class with virtual functions and a non-virtual public destructor is prone to undefined behaviourif deleted from a pointer to the base. Enable the -Wnon-virtual-dtor warning to report those issues. Signed-off-by: Laurent Pinchart Reviewed-by: Milan Zamazal Reviewed-by: Stefan Klug --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 5270f626f2fb..f8d32dcf8d7a 100644 --- a/meson.build +++ b/meson.build @@ -110,7 +110,9 @@ common_arguments = [ ] c_arguments = [] -cpp_arguments = [] +cpp_arguments = [ + '-Wnon-virtual-dtor', +] cxx_stdlib = 'libstdc++'