From patchwork Sun Dec 17 22:04:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 45195 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1225:b0:181:818d:5e7f with SMTP id v37csp7004271pzf; Sun, 17 Dec 2023 14:04:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFC9MxViiIAUCXU5m7H0W+aHFcRE1w+Q0ipJNfkOs9eDY5l4qt1RDLEgdSCqDd6cYJEg/NR X-Received: by 2002:a05:6512:ea6:b0:50e:373f:64c9 with SMTP id bi38-20020a0565120ea600b0050e373f64c9mr933674lfb.0.1702850687392; Sun, 17 Dec 2023 14:04:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702850687; cv=none; d=google.com; s=arc-20160816; b=kILUxvzK7Jm0mPRN4dQCN+35lXBI1rJyjCqlklc6ISfSZuQXq47hFoUfJb1PHBPqTB ycKbLlySE/WetJVNcl008lK2GWNDWhw0D0Kuo5JjVetWRGyGHbRQuM9ldjOBOPJXLdHP ScJf/c5l821Bc3vM6O1etVG8telqAf810uXTC/F4I5IT31OORzK10Q1/cZtE24wl//84 KSeQY8lUGnrreIniw7MaPN5RmpZPNR+rkNVC8Kdh0LBMKS3PiGo9T6cqbdgzBdF8g8CF g8ng8HoVifuVS875a9eCQYrj274AMX4uKcyq7DHpotGv5O+e45TSdAFhcfFagg8vZBTS lSZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=SMurggfK+xVDvUEPr9hoKFsL8C2/0ks6vo3F3pxugpg=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=rKfbD/bk4rrEB5hPs/fDvqEli/HTWitfHXYGktemGUrbCOPV3WAQ4P3hb8DkbEmYDa bxjY7UdPbeyIgLHMKqVJpkzt4bP8eMW6lEl91piAPGU1jKLs3n7mLsQEvqKJOFoSwmSk hLJ/RCjdwNSQoIx0NPtJkPsLYUPL8yzHhZJ29ACEIOtsiRNXiha0q/7Lq89rRb7JrEf4 mSUDeS+DWdmqjpUBt6/PGgxLCFB8cYR4K6UxuKUYcceLpm49A5ygIONYiUFAh1vBPtnO g2fLhhbsC6R/k439wczXwB13DZWAOXXFyUATQ9dKvFQQhiBfeCC9i0WntPRa/Z16tBC9 V0SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20230601.gappssmtp.com header.s=20230601 header.b=ktATWo8q; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z11-20020a1709060acb00b00a22f1163036si4821236ejf.842.2023.12.17.14.04.47; Sun, 17 Dec 2023 14:04:47 -0800 (PST) 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=@martin-st.20230601.gappssmtp.com header.s=20230601 header.b=ktATWo8q; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4366368CF5D; Mon, 18 Dec 2023 00:04:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org 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-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_Storsj=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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: lBquarStmj5V 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);