From patchwork Tue Feb 25 15:28:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 22863 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 64E48BDB1C for ; Tue, 25 Feb 2025 15:28:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 56D9E6871E; Tue, 25 Feb 2025 16:28:18 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="ePfMUicS"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AF1DC68715 for ; Tue, 25 Feb 2025 16:28:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740497295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3mU4vw0/wcfdUiX7GF64B2URoYAx6+QKAnUfWjqUjQc=; b=ePfMUicSzG8Gcr6rrB4TN7dIMLgNWtegd/Vf9x6UU2v5kofNz9T9NAU48p9z3nmfz1F5ik 6Mi9ZgHkiEdJOoJgBPYez0lZbIzWRi7vKtX+4ml29EoX6Q83uG5pb2P3kuYaAzU0nmMkeT DzBK9ybek3zxRyHKfPEtnX4nR3PcI5Q= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-qgxUkfRoNEOz3F_G9ATmAw-1; Tue, 25 Feb 2025 10:28:11 -0500 X-MC-Unique: qgxUkfRoNEOz3F_G9ATmAw-1 X-Mimecast-MFC-AGG-ID: qgxUkfRoNEOz3F_G9ATmAw_1740497291 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DD6AF180087F; Tue, 25 Feb 2025 15:28:10 +0000 (UTC) Received: from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.45.224.119]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 54E4119560AA; Tue, 25 Feb 2025 15:28:09 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Laurent Pinchart Subject: [PATCH] libcamera: formatting: Avoid spaces in for loops without expression Date: Tue, 25 Feb 2025 16:28:06 +0100 Message-ID: <20250225152806.22705-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: FLzGC54NGzZg_8vfgtMVpY2hNihwDr1lyX6FhZhs5NU_1740497291 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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" The clang formatter removes spaces in places of empty expressions in for loops. For example, it changes for (init; condition; ) to for (init; condition;) libcamera currently uses both the styles and we should use only one of them for consistency. Since there is apparently no option to override the formatter behavior (see https://clang.llvm.org/docs/ClangFormatStyleOptions.html), let's remove the extra spaces to make the formatter happy. Signed-off-by: Milan Zamazal Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/apps/common/options.cpp | 2 +- src/apps/qcam/format_converter.cpp | 2 +- src/libcamera/base/object.cpp | 2 +- src/libcamera/base/signal.cpp | 2 +- src/libcamera/base/thread.cpp | 2 +- src/libcamera/process.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/common/options.cpp b/src/apps/common/options.cpp index ece268d0..cae193cc 100644 --- a/src/apps/common/options.cpp +++ b/src/apps/common/options.cpp @@ -1040,7 +1040,7 @@ void OptionsParser::usageOptions(const std::list