[{"id":30056,"web_url":"https://patchwork.libcamera.org/comment/30056/","msgid":"<171926008853.625657.7205799228830841907@ping.linuxembedded.co.uk>","date":"2024-06-24T20:14:48","subject":"Re: [PATCH 01/10] libcamera: base: log: Declare log categories when\n\tdefining them","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-06-24 20:29:32)\n> libcamera will enable -Wmissing-declarations to catch mismatches between\n> function declarations and definitions. There is one offender in log.h:\n> when a category is defined with LOG_DEFINE_CATEGORY(), it generates a\n> function with no declaration. Fix it by declaring the function using\n> LOG_DECLARE_CATEGORY() as the first step fo the category definition.\n\ns/fo/of/\nor\ns/fo/for/\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  include/libcamera/base/log.h | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/include/libcamera/base/log.h b/include/libcamera/base/log.h\n> index b5775e491fee..df27df034d79 100644\n> --- a/include/libcamera/base/log.h\n> +++ b/include/libcamera/base/log.h\n> @@ -48,6 +48,7 @@ private:\n>  extern const LogCategory &_LOG_CATEGORY(name)();\n>  \n>  #define LOG_DEFINE_CATEGORY(name)                                      \\\n> +LOG_DECLARE_CATEGORY(name)                                             \\\n>  const LogCategory &_LOG_CATEGORY(name)()                               \\\n>  {                                                                      \\\n>         /* The instance will be deleted by the Logger destructor. */    \\\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 A00FCBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Jun 2024 20:14:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6A448654A9;\n\tMon, 24 Jun 2024 22:14:52 +0200 (CEST)","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 641A7654A1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Jun 2024 22:14:51 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2F326FF3;\n\tMon, 24 Jun 2024 22:14:29 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cqa0eIMx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719260069;\n\tbh=vwC/naN35ZvspcHouLQYuZ6VlZx6t4vI9G9hTB/YGQw=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=cqa0eIMxTJwBryKJC11BY0Z76EWfWbotKEOOkGLA2mnikoPk5CEA6zZtDPyE13NYn\n\tBvB6pDY2DZ02aXhdNv3g3xVNgeoHjPYbL7Eyfj0dhrxlGkyBVYAqf90dFQo+Ftsz0P\n\ttKG2cjhgAc1CLhKkVDa+TJqMVucdmgvPZvLCCS+g=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240624192941.22943-2-laurent.pinchart@ideasonboard.com>","References":"<20240624192941.22943-1-laurent.pinchart@ideasonboard.com>\n\t<20240624192941.22943-2-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 01/10] libcamera: base: log: Declare log categories when\n\tdefining them","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 24 Jun 2024 21:14:48 +0100","Message-ID":"<171926008853.625657.7205799228830841907@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}}]