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 ESMTP id 6632E487A6 for ; Sun, 17 Dec 2023 22:04:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 01A5E68D014; Mon, 18 Dec 2023 00:04:44 +0200 (EET) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C1FD468CF5D for ; Mon, 18 Dec 2023 00:04:37 +0200 (EET) Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-50e389473fcso314758e87.2 for ; Sun, 17 Dec 2023 14:04:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1702850676; x=1703455476; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=KxwwVPB2DNIFEYueT80AsMarEK98Li5PSwnJCdXbBOk=; b=ktATWo8qs7hBgrnt0Ylwr+JLejxgPGfhURbW7e9Cl+qUKtLpR67pwlFyi7WUnS3Lcj bMVg1QTobeV6Az1nY/21P18eTvPqtWbjhEq2jo9oDMvrxPo+ZhguCRrom3eq+1JJNeeN ZHSMFe9mSR/0mSfoOowjHN2qM/ZsfX+5IlGfuamHhVhwLTjJEZn/o9kTdZyo/UMouIJ9 0/alREb4fqXP81/aSuuDu5/f68gs0nK85nBXW/PvBSwOhtjCi8G6rvKVaNDqAI68cmoy HzTGNOse/Zapqjm5LArSKCu2avot+VmilkPufc8ga3bh8RgG9fo6SB1ZjL+6a+5++Nca 8fBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702850676; x=1703455476; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KxwwVPB2DNIFEYueT80AsMarEK98Li5PSwnJCdXbBOk=; b=sFYr1cgdutBv3B7iknPiC+7PxMwMll24arY0TYgWfy6vrwL930R45VTvVOmaVNoYsR asdO7oVmuVE58EBNVZPwTHbSDtRNQLeV0JqXExvFAduVtSD/b/87EsRCR7CMxpF6u+1d DUsHmgVR9WWzU7QmRiYFBUBYdm8uZ6gRxHw6jmGf9gA7sd/GMUyd61n6OI+WaojIloTR /OGCW1ktFm4zIlmN3Z6fhsscWcW+h/YJ3mF/kwv/1eo+pQz6AGBncrbUy34lN5qnK8cY QG2Zfk0P/yHcVra5SCy5o6NGvLUcY4btjwLFKqRf/3sZTbkmTN9QoMPMozSx1ZIP6rs1 +t1A== X-Gm-Message-State: AOJu0YxZq9Scbfzp/LQ97uql9zpmJFOLBJ7Et9Sa3mh0zeQvW7spuiRr DJa5J/iYhQwLSu6yvMBeUzxEo8hVBercasaxUihUvg== X-Google-Smtp-Source: AGHT+IHrE7kQjXjSTEUsFhNp1Gl5xIFefTcpfkyDQSQOqyGFvMsOFQsVRhzp4dmrYwobJhlruyOBEg== X-Received: by 2002:a05:6512:3770:b0:50b:d763:fe52 with SMTP id z16-20020a056512377000b0050bd763fe52mr5987303lft.109.1702850675582; Sun, 17 Dec 2023 14:04:35 -0800 (PST) Received: from localhost (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id c16-20020a197610000000b0050bf30083b2sm2705802lff.142.2023.12.17.14.04.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 14:04:35 -0800 (PST) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 18 Dec 2023 00:04:34 +0200 Message-Id: <20231217220434.2867783-1-martin@martin.st> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] checkasm: Remove unnecessary const on scalar parameters 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: The ffmpeg coding style doesn't usually use const on scalar parameters (or on the pointer values - as opposed to the type that is pointed to, where it has a semantic meaning), contrary to the dav1d coding style (where this was imported from). This avoids warnings about differences in the type signatures between declaration and definition of this function, with older versions of MSVC. The issue was observed with one version of MSVC 2017, 19.16.27024.1, with warnings like these: src/tests/checkasm/checkasm.c(969): warning C4028: formal parameter 3 different from declaration --- tests/checkasm/checkasm.c | 4 ++-- tests/checkasm/checkasm.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index 6318d9296b..daa5438f88 100644 --- a/tests/checkasm/checkasm.c +++ b/tests/checkasm/checkasm.c @@ -933,10 +933,10 @@ void checkasm_report(const char *name, ...) } #define DEF_CHECKASM_CHECK_FUNC(type, fmt) \ -int checkasm_check_##type(const char *const file, const int line, \ +int checkasm_check_##type(const char *file, int line, \ const type *buf1, ptrdiff_t stride1, \ const type *buf2, ptrdiff_t stride2, \ - const int w, int h, const char *const name) \ + int w, int h, const char *name) \ { \ int y = 0; \ stride1 /= sizeof(*buf1); \ diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h index e3c19510fa..f2b63ef8c8 100644 --- a/tests/checkasm/checkasm.h +++ b/tests/checkasm/checkasm.h @@ -308,10 +308,10 @@ typedef struct CheckasmPerf { #endif #define DECL_CHECKASM_CHECK_FUNC(type) \ -int checkasm_check_##type(const char *const file, const int line, \ - const type *const buf1, const ptrdiff_t stride1, \ - const type *const buf2, const ptrdiff_t stride2, \ - const int w, const int h, const char *const name) +int checkasm_check_##type(const char *file, int line, \ + const type *buf1, ptrdiff_t stride1, \ + const type *buf2, ptrdiff_t stride2, \ + int w, int h, const char *name) DECL_CHECKASM_CHECK_FUNC(uint8_t); DECL_CHECKASM_CHECK_FUNC(uint16_t); -- 2.34.1 _______________________________________________ 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".