From patchwork Fri Jun 23 14:41:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 42286 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:be15:b0:121:b37c:e101 with SMTP id ge21csp3666308pzb; Fri, 23 Jun 2023 07:42:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7mmYSMxv+fkUiSJ5FT8JsR9jbiwTRD5FUTWVBJGica2swOf07cYTOey+ix+DROa+cPrbKz X-Received: by 2002:a2e:a0d7:0:b0:2b5:91fe:916 with SMTP id f23-20020a2ea0d7000000b002b591fe0916mr3606668ljm.1.1687531329494; Fri, 23 Jun 2023 07:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687531329; cv=none; d=google.com; s=arc-20160816; b=nOwlABg6wlTp0pbCBxO1vTbH3fn+oLXhCH6wBTC+WfQzkn11UAY8y1l/mjlve3+Y2e ROl+lPTOILDxDaunPsiD8sCu7QlP4U0tAmyoSQVhAMsdPRQR3H3+NvorTCYAojlQd3oE pw898kuansyGd1vvjBxxPPLFQ1fzIheFvxklPDLVoPh++jEbiADZY5F2nAh2C7iv9Tit 9uzN5As6kGmRXwSQRR7uJgJ2q/Zj2/mIit3no4BVF72918bcI/T41lzOt3Q2Z9m66Vm+ s1iH7Jv3+Oxtsk0eLKhrlqz5r1p9XYCCnTSMhivcUSdQ7PZy0K1NMZ96hDxdPHynkaE2 lsUQ== 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 :delivered-to; bh=yI/PF/KEFdvse/e7NYrvT+Es+mB7a24SAJwPoe46lW8=; b=g4FbmNJB9lz28ZX9QCR6cqFEb0pB40T3TLUKx/5GYyfsnSI6fyVHfo5XxQqI1XkRFL e1KuUJRg+v/J3JOqzHP8Qn8Likpgu8GEw8x+6xw06lh5788daeJWCGB8ByvEUoECkKDf G7NY4aGumFB5jRYUFNvmO4emkcA9PQXd4B2H/DjaGj2GsIwReTsXq5pkazZG/zktPCdP 8h2yAvpVQaB/xdRYR7RywZ0jAsfW6dV0YW4n72VqgYnGkoROVBQMo26TyKPnB2bFiweM STA6zRkh0S33unWIoHBzRAZt1YmMHcyAgPKvFxkPb5SPCYl1EWNWZ24IlDCbb3c321i+ apBg== ARC-Authentication-Results: i=1; mx.google.com; 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 q18-20020aa7d452000000b0051a5fe585dbsi3752548edr.516.2023.06.23.07.42.08; Fri, 23 Jun 2023 07:42:09 -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; 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 D49A6687FAE; Fri, 23 Jun 2023 17:42:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1A28D688158 for ; Fri, 23 Jun 2023 17:41:58 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 6F0B32404EE for ; Fri, 23 Jun 2023 16:41:57 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 6C2vlX3yH5WS for ; Fri, 23 Jun 2023 16:41:56 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (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 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id A0D0E2404EA for ; Fri, 23 Jun 2023 16:41:56 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 4A5D13A0153 for ; Fri, 23 Jun 2023 16:41:50 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 23 Jun 2023 16:41:46 +0200 Message-Id: <20230623144147.7940-1-anton@khirnov.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] lavu/tests/cpu: stop processing the thread count 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: zFar6eLm5iYL Just print it as it is. Needed by the following commit. --- libavutil/tests/cpu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libavutil/tests/cpu.c b/libavutil/tests/cpu.c index a52637339d..200f20388a 100644 --- a/libavutil/tests/cpu.c +++ b/libavutil/tests/cpu.c @@ -106,7 +106,7 @@ int main(int argc, char **argv) int cpu_flags_raw = av_get_cpu_flags(); int cpu_flags_eff; int cpu_count = av_cpu_count(); - char threads[5] = "auto"; + const char *threads = "auto"; int i; for(i = 0; cpu_flag_tab[i].flag; i++) { @@ -136,11 +136,7 @@ int main(int argc, char **argv) } case 't': { - int len = av_strlcpy(threads, optarg, sizeof(threads)); - if (len >= sizeof(threads)) { - fprintf(stderr, "Invalid thread count '%s'\n", optarg); - return 2; - } + threads = optarg; } } }