From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 4BC834DB98 for ; Fri, 28 Feb 2025 15:12:55 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C871568DEFB; Fri, 28 Feb 2025 17:12:52 +0200 (EET) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C0A2568DCB4 for ; Fri, 28 Feb 2025 17:12:46 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 25C2E44162 for ; Fri, 28 Feb 2025 15:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1740755566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=04397EXYGWbSPuyaZL59vaeHn964U8gZ2JVzBJAllxI=; b=hQpm9QGR5UezEiYdo6761OgXgyoN7RlU2/a46zhpTbUQhATwKt9UvK2N8uWQFhlHznU7UF 4jREg0dEfUW3jCM5TAC6fOJDJCUcZzJdPG+y3gsksKhBCcVk3K/x7JgqMUqguS4qBtlnDu qO7LZqIhLXJqsZhWVfiyStpWCtHoWzuOfKB03sXLVnlzz+/owd1e8YBuhHxB2kg0YVo/Uv 1Rro2+rHg+ZkHGwnLGkQKojQIJaRtdbP9I9rcp00KQcILR27pABpohtSO4+a5P9bjEqQF5 /pmbWyvzmRqpDgnn4gberJXGsNZPdJuXT6ETXq75N5+lBX0eeTGqgJEMPnlBMQ== Date: Fri, 28 Feb 2025 16:12:45 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250228151245.GT4991@pb2> References: <20250227011054.3028508-1-michael@niedermayer.cc> <6527f199-5abd-40ed-8b19-b7a6b8bd40cd@lynne.ee> <20250228023318.GR4991@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeltdejvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] doc/developer: Better {} style rule X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============6871725670593721851==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6871725670593721851== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="waA0gpEDqEAG6TI8" Content-Disposition: inline --waA0gpEDqEAG6TI8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Lynne On Fri, Feb 28, 2025 at 01:24:46PM +0100, Lynne wrote: >=20 >=20 > On 28/02/2025 03:33, Michael Niedermayer wrote: > > On Fri, Feb 28, 2025 at 03:25:06AM +0100, Lynne wrote: > > > On 27/02/2025 02:10, Michael Niedermayer wrote: > > > > Signed-off-by: Michael Niedermayer > > > > --- > > > > doc/developer.texi | 11 +++++------ > > > > 1 file changed, 5 insertions(+), 6 deletions(-) > > > >=20 > > > > diff --git a/doc/developer.texi b/doc/developer.texi > > > > index a1bfe180c9b..6a753f99da6 100644 > > > > --- a/doc/developer.texi > > > > +++ b/doc/developer.texi > > > > @@ -179,18 +179,17 @@ int fields =3D ilace ? 2 : 1; > > > > @end example > > > > @item > > > > -No braces around single-line blocks: > > > > +No braces around single-line blocks, unless they are followed by a= n else (to keep future patches cleaner) > > > > @example c, good > > > > // Good > > > > -if (bits_pixel =3D=3D 24) > > > > +if (bits_pixel =3D=3D 24) @{ > > > > avctx->pix_fmt =3D AV_PIX_FMT_BGR24; > > > > -else if (bits_pixel =3D=3D 8) > > > > +@} else if (bits_pixel =3D=3D 8) @{ > > > > avctx->pix_fmt =3D AV_PIX_FMT_GRAY8; > > > > -else @{ > > > > - av_log(avctx, AV_LOG_ERROR, "Invalid pixel format.\n"); > > > > +@} else > > > > return AVERROR_INVALIDDATA; > > > > -@} > > > > + > > > > @end example > > > > @item > > >=20 > > > Strongly objecting to this patch. It's all over our codebase, and I l= ike it. > > > Literally everywhere you look. > > > If future patches need to add more under the branch, then it only nee= ds to > > > be done once. > > >=20 > > > Such fundamental changes need more than a single patch hastily accept= ed, and > > > should involve the community as a whole, I believe. > >=20 > > Its not a change, look at tools/patcheck > >=20 > > or try: > >=20 > > + if(this) > > + that > > + else > > + nothat > > + > >=20 > > patcheck reports: > >=20 > > missing } prior to else > > patcheck.stdout:11:+ else > >=20 > > missing whitespace between keyword and ( (feel free to ignore) > > patcheck.stdout:9:+ if(this) >=20 > Ah, okay. I didn't read properly. The double negative in the sentence mak= es > it hard to understand. >=20 > Rather than > > No braces around single-line blocks, unless they are followed by an else > (to keep future patches cleaner) >=20 > Consider > > Don't wrap single-line blocks in braces. Use braces only if there is an > accompanying else statement. This keeps future code changes easier to keep > track of. ok, will apply with this this will make patcheck and developer.texi consistent. If people want to change it, it should be changed in both locations thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you drop bombs on a foreign country and kill a hundred thousand innocent people, expect your government to call the consequence "unprovoked inhuman terrorist attacks" and use it to justify dropping more bombs and killing more people. The technology changed, the idea is old. --waA0gpEDqEAG6TI8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ8HSYwAKCRBhHseHBAsP q2NpAJ4jz+CF6AJCrbCfmInEuK4nW7witgCfQZzHnG1q54g+yKH4kcHNiPj9Jw4= =cB9F -----END PGP SIGNATURE----- --waA0gpEDqEAG6TI8-- --===============6871725670593721851== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============6871725670593721851==--