Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp422478lqp; Tue, 11 Jun 2024 08:17:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3Sce0XvlzGndU4xk/hvnVvfzlX9yDZdzAhiN8TfNT37rKc1Fds1P57WdYI302rK+kYloH7NyGuWnSd2gYM2qmMLMeUwyD8LwOAzVigQ== X-Google-Smtp-Source: AGHT+IEmaXaOj6gjf6IEOoCwshzUSo1M4eMwxFJSrtKalIM/38p4z1okW35YC9HUMncwGWh08o6n X-Received: by 2002:a05:620a:2685:b0:797:92c:24df with SMTP id af79cd13be357-797092c2a07mr604988185a.69.1718119048004; Tue, 11 Jun 2024 08:17:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718119047; cv=pass; d=google.com; s=arc-20160816; b=a6ae2CWHPCtQjSrti1sASSz0Ea1LaljBkvIY7eiyEYFLMS7CysUx+YM7M3kZM+NpoR sSNSEEeX475I5+qHrUK4NlwcLeA5m5LSHpJ6okxgPO6GORMWdWJOnNYAG804VI2DQZef BGYYKuMx6tXp3jRd/tpkpiuyCA+XV1pmMZWgGyZzH4SQrYAlEWO0OUxEzZ5PpdZ7hH24 g45SeyIwNtsGL5QT2YFo8OuhlVHb6w1cE/QFQIwVnDPxAzjj9jcfRaLgFLxigBd817ho nbpFOKtHUGR9QY6pAVWH6rQlDASqWXze0oCA+ff/P5PX9tLjhQMUKaHFGRf9rD54K2OW pAXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Nm8XxZQUI/HGBg0dmgtwj323sJEbBxn99UO8Ys/CJ9E=; fh=QsUfTJ7hyU0ZmkQR0ZybPH0XephCsf6JQQKghDEDwgk=; b=xxy+vysiizBcCM/xeAJk4iBqX9Dddpad92hunaP5fGpqVwB7G785ZnL3DypZd0e78+ L+urrVvxXJgtyaSYf9W1mjmw3Cps443Epl/beDCecgzwmcm3DESxrOUhPpj55Cwh3grX fiU/3AzJzjdvHuJjHoHL3r2r7ISUqvtBh4lge6+pjDxeOIpTskdYX/+AYboFDqXWV9OU KPC2SRbsK34whubZcui5uZ09Ku+iimllswImqV6TwmPQAZhRywRyYJzuGzgyBnOx5/r3 siT62rBLJhkylisdOU4e0T0yLzegE6JODsvqJK7G80/hs2O12XoKpkgwiz8zVp2f9zLB AUYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VgLvUuAW; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-210139-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210139-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038b7cbc7si135897681cf.720.2024.06.11.08.17.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 08:17:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210139-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VgLvUuAW; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-210139-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210139-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B1F031C2271A for ; Tue, 11 Jun 2024 15:17:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB77E2574F; Tue, 11 Jun 2024 15:17:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VgLvUuAW" Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C79922331; Tue, 11 Jun 2024 15:17:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718119040; cv=none; b=gfD/+1C1sYnRPe++K9MgGLVMtclTsJHK+cHPXPIgpbz9ZMiKP3Et8lfZws7zZZCgIGAc/r3/+WvhlhL38X7o7BULUsrJnoyPqtFiXhLni6UtikFUSGMUpwW48CuyM+o7NYYtue/zM/vpOa4l7lGYcFjatH8RK1idDFmCq174H4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718119040; c=relaxed/simple; bh=hBDZsMo7XS37/WDuKhGZamh2Y8ndhFFxERQL6K36UXg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ha87SV/ZfCqiWtypmJH7HzFKt7hKUVqhUbmCLZXO1UzeO1qHjHBI3qXEHbx28jTrpMOB+gRQ6m6Eqgu86f1canxrnQXixbXLsyj3W4JFc8zo0lzMZT/2arhcjolEA4KVvfjH/LYvIl+OM7X+u1jhmn57D5jsX3zrBnnhlb8nt88= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=VgLvUuAW; arc=none smtp.client-ip=209.85.166.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-375932c94f0so5991305ab.0; Tue, 11 Jun 2024 08:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718119038; x=1718723838; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Nm8XxZQUI/HGBg0dmgtwj323sJEbBxn99UO8Ys/CJ9E=; b=VgLvUuAW3hoQynsupjdqD9j89X5YIcLvcrikcLl80qOqooqgXbgTzy7CSga3IyBtkC Y79USyklvNidMOO9BFmQiWdwkHA8pfIwcqQWVSkYykLQSwIMo9KcLlLk1HEQNmzTWNOg 1pySgk+L6LXcBTURG4tTB4O3UVpqzYlwnPavahwcgbD0VgcX4hS5bBV1TWfGAPoC5qLU KinXhly2Da9cudCl4gAtKMDH3wTKZaGkKgIfB/QFf7uR1knJsYqk5JQd+DQYZ7HpxrDU 73Ak8ouahfVb4aU0bIBncED/8mUylAGCcqJJ5blnCJ7Kf/3GBN/YD7GTXg2dxL/oQDgm wlrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718119038; x=1718723838; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nm8XxZQUI/HGBg0dmgtwj323sJEbBxn99UO8Ys/CJ9E=; b=jqxcJARRl/+2dEPCTBDscAsQfzqZBv+qHMqB5DYEF2rvy5kRmvMMgsRJzDCSGe1ol8 SNBO69zPakYnsSOfBFnkRoVXOuY58HDn4qkfWdcgndyRk8A8mM4+kLZu+O8+mUvdSLTs DyUrtgJsZgRUaNce/7Z3V21da7iNfxeMCEWMgbj5cK5BIlrZ7D3UG1g5sWt8VT9KR/8x uZyBWmtMmaownRQZEBe5tUTyykyD4DFf+sPfwRpLYYBMHTjKqWsFtvC+qEYmwdspOHNB uBfjz4rlmkoRi1S5eB4fh1SS37DgbZVOuBClK9yhQoLXQbe7B67iaTfX66FCUB79nMcC mnUw== X-Forwarded-Encrypted: i=1; AJvYcCUBuc4YAnpap3saxLecuCxYoyMm49Kj9QigNRjqfyXFA/dhcgamQPo3pdU49k70XMUl6clbObryT70L8lKfX4Nv+Dqdk8bZSSGTxUWl+FjyvmVBqyYppt2Hj49MSjRqoxBSOm9jIndD1UUbGqyK X-Gm-Message-State: AOJu0YyQKL5HIwlGboqclLaHDfgnyHiDnsz7xkAACZh+RxzhKiiAMVEI tx5Hoviol075duR6VSGb1HiWcZoaLmKGQZfqDLtFbcvKKR2F4HHj X-Received: by 2002:a05:6e02:2169:b0:375:a535:f7c7 with SMTP id e9e14a558f8ab-375a535fbdemr67209805ab.0.1718119037631; Tue, 11 Jun 2024 08:17:17 -0700 (PDT) Received: from xps-15.. ([91.90.123.30]) by smtp.googlemail.com with ESMTPSA id 8926c6da1cb9f-4b7cbacb0d1sm2001416173.4.2024.06.11.08.17.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 08:17:17 -0700 (PDT) From: Amer Al Shanawany To: Kees Cook , Andy Lutomirski , Will Drewry , Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Javier Carrasco , kernel test robot , Shuah Khan , Amer Al Shanawany Subject: [PATCH v3] selftests: seccomp: fix format-zero-length warnings Date: Tue, 11 Jun 2024 17:16:08 +0200 Message-ID: <20240611151638.5767-1-amer.shanawany@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <43e24489-a3af-4e53-afc6-ff1dd9462ee2@linuxfoundation.org> References: <43e24489-a3af-4e53-afc6-ff1dd9462ee2@linuxfoundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit fix the following errors by using string format specifier and an empty parameter: seccomp_benchmark.c:197:24: warning: zero-length gnu_printf format string [-Wformat-zero-length] 197 | ksft_print_msg(""); | ^~ seccomp_benchmark.c:202:24: warning: zero-length gnu_printf format string [-Wformat-zero-length] 202 | ksft_print_msg(""); | ^~ seccomp_benchmark.c:204:24: warning: zero-length gnu_printf format string [-Wformat-zero-length] 204 | ksft_print_msg(""); | ^~ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312260235.Uj5ug8K9-lkp@intel.com/ Suggested-by: Kees Cook Signed-off-by: Amer Al Shanawany --- v1 -> v2: removed empty print statements v2 -> v3: used Kees's suggestion --- tools/testing/selftests/seccomp/seccomp_benchmark.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/seccomp/seccomp_benchmark.c b/tools/testing/selftests/seccomp/seccomp_benchmark.c index b83099160fbc..94886c82ae60 100644 --- a/tools/testing/selftests/seccomp/seccomp_benchmark.c +++ b/tools/testing/selftests/seccomp/seccomp_benchmark.c @@ -194,14 +194,14 @@ int main(int argc, char *argv[]) ksft_set_plan(7); ksft_print_msg("Running on:\n"); - ksft_print_msg(""); + ksft_print_msg("%s", ""); system("uname -a"); ksft_print_msg("Current BPF sysctl settings:\n"); /* Avoid using "sysctl" which may not be installed. */ - ksft_print_msg(""); + ksft_print_msg("%s", ""); system("grep -H . /proc/sys/net/core/bpf_jit_enable"); - ksft_print_msg(""); + ksft_print_msg("%s", ""); system("grep -H . /proc/sys/net/core/bpf_jit_harden"); affinity(); -- 2.43.0