From patchwork Wed Sep 25 23:43:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51884 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d8ca:0:b0:48e:c0f8:d0de with SMTP id dy10csp759618vqb; Fri, 27 Sep 2024 18:31:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUc8UQEFVLlBj5Sx0xIQRTGeAK2VTdTSOesHFheb3MtputHir9WEaYXMmCFZkarbmgDUHX/hMc2ZzDRJ78k60yV@gmail.com X-Google-Smtp-Source: AGHT+IFJGU1wB9dZLTkCSnkI19eL5n9uqgwZ4s/G4t4RbmrV6p0wvwTnkWc1WgKLHG+oTF34lTeB X-Received: by 2002:a2e:5119:0:b0:2fa:96f5:37a2 with SMTP id 38308e7fff4ca-2fa96f538acmr19649371fa.23.1727487073093; Fri, 27 Sep 2024 18:31:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727487073; cv=none; d=google.com; s=arc-20240605; b=jZnMY06hc5RF+QqRRR82HXt57ouGM4HoBvfdfEUJyMaBHdwELMO90TWWGI3uhaQ1xA mpShzH7srvRWCM+My5BnvXB2wG9Ot7OhD3grGqf8iCLSuy0OTcyHuDsIXXdBjqoJeplG yY4ltVI/o9BbhWHHtuqBUHrLaNIlLe9CUiOeE/+BP0BhJtOurGHleG4Apw5SXMeJ0wSO iMAzjxUyDouflNZplHXdz7Uax7oLOLzKmXsvCXYM98sEwS1OLxpg0z9QCsAT8HjuxuzG pYR+UC/lFG0B0rUnsLy+I6ZloATDsXxlr8jU9GJNLE+WgF2hlA7QkSchAWESnlpXDIAX auoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=3YlQj0glTpZ2wp1Abj8A2UjIygivH5HrZFnLFtGoGQ8=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=MgVBJIEgDeCkjl874PGZgxhY2jYagrtA3+8cACez/UZaXQievt/KHyky6I1ur6FXxb D0I55RV5crTSdEcr6DrbE96sSfiUkWqpvvuskYKlBayoD2HzMATmvFlG3ucclk+tRiqE lw5q3WelA80e7uEs0fOWnublScPSVgheU9van4FvmlzajY+cKK/skCiYdVss7Ftt01JL KVciXac9w0zrNOgGAkLcLORcX8rkRTtJmgFrGCN8WgOn1c0H6eruVECIwCnN8M8t2Aiu ishmjvUchHIz1c4C5Sa2/zLZTjjCasckOZwF0D2kjcsCTMjQm6s50HIOI7UqZPEFax1S Bbow==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Mfpb+fBw; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f9d45d6b1csi10414031fa.152.2024.09.27.18.31.12; Fri, 27 Sep 2024 18:31:13 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Mfpb+fBw; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 048AF68DBE4; Thu, 26 Sep 2024 02:44:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BD1A068DBB3 for ; Thu, 26 Sep 2024 02:44:08 +0300 (EEST) Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a8d2b4a5bf1so48076966b.2 for ; Wed, 25 Sep 2024 16:44:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727307848; x=1727912648; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=e02nYa3tV2VShHxdCH/NXAkhbhy9fv8CNGyqBPUfPiM=; b=Mfpb+fBw74rH+bIA1oriY6OHch70jY67UpEF0yB4hqV6sju2Id8jrQGjPeWSxPomJj SVmoe6rh0VsMO+5Ie6YCT13RHCok490NczGLlO1I561Kv+l9JLcE5l3Azo0mslO36xmt 0jNXJ+zWHa6MedpLEODOAxIeMJEm2zGyMkL29DecZOsebFLsev/JaLluT0rVasmo7hhj pNxV4q/JSu1/z72CdcCat52ZeNEdkVGYv4iHJqISuMG68UX2YoA0ze8LrGLj3acbHd49 b2Ebcd6BwS355ze/vktjHIUZ2kfxH6OWt2Y1YMNjzenSW36NRqc4VtjAmD4+LaBzFsPN Dq7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727307848; x=1727912648; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=e02nYa3tV2VShHxdCH/NXAkhbhy9fv8CNGyqBPUfPiM=; b=nzucaYlQ1qDaRhGf9hQizgc8su0fm2p6M4abyA0xNaG2CAdUGWC7720df+825jN3S9 YvJleJR3hmGUPfRMSc74xv+sb2Knf0qlCtFKlnu2u64jgz1xQ8arIdahH1AKcoIvyNeX 0UG3vuVyZ5KybVv4VTw5Yk0XReGKSak/rRG0521klVTjjmelJJJdV+5qJ5V88VVh91Xp ApJrnK79waUIUPepUBQ1bqDZc5i8I9vBXgQi6GQjV4okKgatJ5eS5Rn6Kt8EpAGyQiUu rqOfQigORD7VKerVU+ktHq7yDLIPs8/jcdAJLMS4Dg0v2ewMmbCbtS3Qw3GapELniGLB /RdQ== X-Gm-Message-State: AOJu0YxZcPoscM78zLwGM0F3lczXo5SvayCpbQyofFNkpBHqdEyJ2TbP KRWCXGX5QiirG4FId60pPFIX2h3nv9m4Sh48iOo6WWBtVC3f8JprvOmlUg== X-Received: by 2002:a17:907:efcb:b0:a8d:250a:52a8 with SMTP id a640c23a62f3a-a93a0322f6emr396728166b.3.1727307847891; Wed, 25 Sep 2024 16:44:07 -0700 (PDT) Received: from localhost (p200300cccf02610048f61b20e25294a2.dip0.t-ipconnect.de. [2003:cc:cf02:6100:48f6:1b20:e252:94a2]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93930c8a98sm281464866b.124.2024.09.25.16.44.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Sep 2024 16:44:06 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Thu, 26 Sep 2024 01:43:44 +0200 Subject: [FFmpeg-devel] [PATCH 2/2] configure: allow mixed declarations and code for Objective-C 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: /cjqLG5iu6C+ Mixing declarations and code is quite common in Objective-C (as can be seen by the number of warnings we have for this in Objective-C files) and forcing to not do it usually results in worse code, with unnecessary widely scoped variables, which in turn makes variable shadowing and accidentally using the wrong variable more common and harder to notice. --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 0c57dda85b..f630470b68 100755 --- a/configure +++ b/configure @@ -7445,6 +7445,10 @@ check_disable_warning -Wno-unused-const-variable check_disable_warning -Wno-bool-operation check_disable_warning -Wno-char-subscripts +# Disable mixed decl and code warning for Objective-C +test_objcflags $unknown_warning_flags '-Wdeclaration-after-statement' && + add_objcflags '-Wno-declaration-after-statement' + check_disable_warning_headers(){ warning_flag=-W${1#-Wno-} test_cflags $warning_flag && add_cflags_headers $1