From patchwork Mon Jun 24 19:29:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20368 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 BB2B8BD87C for ; Mon, 24 Jun 2024 19:30:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7024A654AE; Mon, 24 Jun 2024 21:30:08 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Pf4HmrKv"; 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 6B81E654A3 for ; Mon, 24 Jun 2024 21:30:05 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6368718D7; Mon, 24 Jun 2024 21:29:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719257383; bh=dEZ9heUGMM/sZ3NvPDI18wKyL3LpZaNmSCroL7Im9f4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pf4HmrKvPQ1jEwOi89B18B3jzS5/nNjyqa85kD80S3yJ/I507711XJP+DGU0j26a9 mE/MciNcycu183NfGo0CyRL7Iwi8SNzuTJcvRan7vHikHlYcebup+CKOkUzSlro7VT 7DbsfiX/8RrcfAIooE4qTvk5Z9P2cC7tPW9QNi0Q= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH 01/10] libcamera: base: log: Declare log categories when defining them Date: Mon, 24 Jun 2024 22:29:32 +0300 Message-ID: <20240624192941.22943-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240624192941.22943-1-laurent.pinchart@ideasonboard.com> References: <20240624192941.22943-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" libcamera will enable -Wmissing-declarations to catch mismatches between function declarations and definitions. There is one offender in log.h: when a category is defined with LOG_DEFINE_CATEGORY(), it generates a function with no declaration. Fix it by declaring the function using LOG_DECLARE_CATEGORY() as the first step fo the category definition. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- include/libcamera/base/log.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/libcamera/base/log.h b/include/libcamera/base/log.h index b5775e491fee..df27df034d79 100644 --- a/include/libcamera/base/log.h +++ b/include/libcamera/base/log.h @@ -48,6 +48,7 @@ private: extern const LogCategory &_LOG_CATEGORY(name)(); #define LOG_DEFINE_CATEGORY(name) \ +LOG_DECLARE_CATEGORY(name) \ const LogCategory &_LOG_CATEGORY(name)() \ { \ /* The instance will be deleted by the Logger destructor. */ \