Message ID | 20240504021330.33429-1-jhubbard@nvidia.com |
---|---|
State | New |
Headers | show
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2063.outbound.protection.outlook.com [40.107.236.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 629411FA1; Sat, 4 May 2024 02:13:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.63 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714788819; cv=fail; b=OsyrSqSn4jRKUZvzay9wXiQu3kCGDdJ7kVCcw5cgasg2UMUnPSvK9DXNx45LJmZ4PXgN6izMiT1NDBMcrUTExetPYuBXOGR/uGF9lkrrFiRfSYVB7+/UzRJdr1cGKlXmc+Uzqgj5R564UxiQyVuFhebX1qkIXLrRUcDqbG26gZo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714788819; c=relaxed/simple; bh=EzWNV42aokbFwCb0Ps+kTsAr8JgD9UP7D5/MX2Yb8so=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=vAhQYmpkwFCGCVkaSnI8bStMMAVlUlXt7ujBpad2rdifCmXd0L1CDMBYmPFFN8kjlpUz6JXW2sf334AQFoFTUklI29hysXFxW3X3y5FYyVfMJ8C7k0Wzf/XDBU2mATQ+UWjoCakDTjXUi4mAhUrFbEzWZTPxEnd3tAFrbJPUBMo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=Q8h2nQZx; arc=fail smtp.client-ip=40.107.236.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="Q8h2nQZx" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hTRBiQkUPmSQjOa1GnygPp7xJ9mXfyAlxXqXdha+XHdyJQrMaG/YEsiX3Kp3mLw73RjA7ZFI73MzybcZnpvLAcf4ZAnaQJhIcHp0A+oVsettOcNw5Aqu5OwsjNw4PVoVx7YCQEPVfZAVWgWwKVRVyDiXTvrt1+SQGnJgkzNZ3pul3cfWsGfqq/cA30e8gh5CWwDBoqwP7VG81px8JVPAwz2D1BWLqpCc3A58pw+OVR+5R7K4VnwnANPf/1mKtgxzbXoswci4HCdGzUdZHUYeSHlvBwV3+lj9gNooJvp4uZamtIkUad3b/Gsaev/TNl0FZTjLrNlQQ9jspvyz1W9W9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r6IW/AGyRyhorJNSS/w2he1Rb1GVFfaj9dnJ/50C+qU=; b=Vg2fkKxOq3Hz56BpnrLKpVRCrrbyOJtOA1Fdp0lhQMr//CpZlRQSHj2e7tm3b3zqq3LVMqqOGVWEsuzre3lYzeS5BitzuIbIHFv+phixSqlVDWLWvBMFuAO++EuCZF+z2CH/TGPqbZnSdJUz6cm9UbXNojkLX38/ZmzUKjbj+UFKRcCpBOyrM9sesZDAwC6RJknu7RQZ1sVkdJjA2KCXICa5A2naMguFaw809NdVuWIagUbS/zz6UH24COSVG3/hEEFcrd7CAamsgpgY4FKYYIglkVlO//+H4NHdYpKM04feJRYjLT8SzjkzEBsUeaUu9ZFwIptOjK6MxhK3hkSO2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r6IW/AGyRyhorJNSS/w2he1Rb1GVFfaj9dnJ/50C+qU=; b=Q8h2nQZxRTOyY+8UpEnrId+MKfAPDU+0sb7rxzpk+C5ZiFucQDxeeG4Qk9OucrtijrhIHGXJg6GEfQWrHFwwpRVVr3MXzNz7hm1SU1fkt5UA9QbfvOcHi2C76CG6i/SprxRP2UBQ3lEYgpMGzwIoUcKXjyaiMCUO99Cl25kGzlAGcZ4XBhd2ZOQA/RGB0jLHHI5IJY7+cj3j4xyT0qXK6s584AB1Je4OouGHmAHyQNMCllU1GhXooJs2ISETBHZ8ABhg9xBmOIkGvp1xJ5YhhepNL6F7TY5+hTLlYabbcml2GfIW2sMhLeNTtV4S5ObdAyJ2fVRZRALc35VW03+jlw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by DS7PR12MB6070.namprd12.prod.outlook.com (2603:10b6:8:9e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.29; Sat, 4 May 2024 02:13:32 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7544.029; Sat, 4 May 2024 02:13:32 +0000 From: John Hubbard <jhubbard@nvidia.com> To: Shuah Khan <shuah@kernel.org> Cc: Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Ivan Orlov <ivan.orlov0322@gmail.com>, linux-sound@vger.kernel.org, Valentin Obst <kernel@valentinobst.de>, linux-kselftest@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>, llvm@lists.linux.dev, John Hubbard <jhubbard@nvidia.com> Subject: [PATCH] selftests/alsa: fix a build warning: return a value in all cases Date: Fri, 3 May 2024 19:13:30 -0700 Message-ID: <20240504021330.33429-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 X-NVConfidentiality: public Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR06CA0029.namprd06.prod.outlook.com (2603:10b6:a03:d4::42) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: <linux-kselftest.vger.kernel.org> List-Subscribe: <mailto:linux-kselftest+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kselftest+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|DS7PR12MB6070:EE_ X-MS-Office365-Filtering-Correlation-Id: c30daede-0714-4b04-de27-08dc6bdfcbdc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005|7416005; X-Microsoft-Antispam-Message-Info: sw+mFbGWAQS9XQpw1ipEjB5MMYyABJAXswgNnO+U2x7KL3I3eAdvcXMprM6+fP1t04q3sUNJcGboCVTou4BOqFjyIHEs8FVzYYGG0SIhf0El1LXpbYDS3RPxyX6YT5J+DUsAxa8/CqWafEC2K78cqIUjvs33b8QYB4OM0xdJ7BIBMxrLhUeJgmiMmACEgilp0L3nlH8uPHha+on/uIbS5XfpFWeL9aboRKR3JasI6NkVve2mnyXiPL3SzrsxAqSuRVqllVQVQRRzoi4mA7clLZzKuB6mjRp67DkFGQJqtLPkiYtzwL6F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SPM;H:BY5PR12MB4130.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005)(7416005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JuAP99HG7XkCccMGahz+87uYOeeIhsH0fo6zfexOrWzsnyOBPe4iY50xU9QRfECa4wB2908LLDxLKzytqpGBp9K48FrWYr9sRZGybwzDu4CLozenz7SGaTTtAzMEuk9+tw+HiX9lvAux3XeTqw+Inh/tzqhNUZI/F5dRfHWyDCQgUv0yJed0sNNMDYY8sFqjZdRxl2fjFitJCppYz7uPTjieiiawTtFwO0dmuLyNLSfGWWZ1S5KOGRkG9p0vIGgyjeGgYSm6T+99kY4T/RxZuAu2q8b6uBccNJCzVaJJXiwD8MH8E/FYdCrq0H+mddHsHrlrMJNnhyxqN5vp6o829gsgIA9m+dfqNa8JGM3DlOnUcubxP1Ehe7QTrNVN04RHn5t87LWVNQvEKWa0fsh3OWslZuDOuT+U46rWBuIT5I9YTFx38Ilqj7jhDHvO2B9Pyu9IAV57VDAECpvGCS42tAZPx5VQE6IZad8guxkWKDETYRN+Q6uJY6yXH2PGQU6hKT8eOraCTnhi7zHsmtkVQV3NNl3A2ddVNnC7S7W956jzbf5eLsEgPcU39Pzr9tOG4LqZRPOQc1wLpYzGE/F45IeHLegsyY66+8eMLE7O2RbeXHOpmYPy8FcHSAljXymH5FL9OSxxHov/0JLXylPamfjQhxwKhbDnsFqoLh8CrKewoRCHGtBiOQJYU7JOzU7b6FFuG5MvAdM5gNzOVMCVUJgDv1LN3D/C4S8wxN7TJTnfvq4+il+/zwJM9V+PeIIbb6MaLTbEWD0U/q5leW1rA5emEWqrUH7nJBg2jqkbM1hmvWSK6sciGcQBbTtERCtAw7tGXSUwABYfgj8pxgDiTsRsvYrqziDkmZnVhaJ5/UNFGY7eseDYgDXgdjwtyCSX5z5ZVVR3SN0eBGk036xATo+e2AW/TmE80j2ImLPphcK/XqCbq870iPTQYEJBMBgmnkQN2Q2DKOC9SCo9HuTgGDo6NbSTXxmvtf8ZJ5YUTD5bbOSMmlOQfJD+qWMPyOANq/1EqnxdlkwiYs1tTu8sPyg2+6a4ulzojUrG+VBxVajtp0fL4kvSCEjpSbGWR08MVa+fOW3uLWl136qEpiP+cUB3mIkGFl3itjXJiHtLeM3Lfb0B8EPrudwXI2TbvMTH1Od13F56qWJXbcRHyIA2ZU/iyN1/TUWRM6+a075KsXuxXb92tUca0UzhvP3ORibyreP303yBM5ZdWZcxgojV7DwNgFX10ECDKEEnaVaS0uxL1Qn+GoVVkUe2+pGyoJcr6bBI/zT0qcFAHSer3tH7Nd8bVrOzHE76JdCafjr5YW5XeMKBY35NGAbae0O5EVSr42HN63Bx1Wf8VIC8xfBJuizdkwQYJLh9GAEXy839UtXPFHSSgRZzoYFuTHRK9ayL7FUYR6OxZC3kMJosVPg6FVfJRhQnUv/U6lCLVjktfCFupR+oOZ2tGTk/h3fygm2hdyzykOpcmA161GstNNcsrXBVNUP7869zfsndsmL2qmW1CDU5w/zucFD6IhqAfPvWd/ThdycIhiZKFQsDRw7UQRG4f9y3J9DTHBBi+/oEbG/pHmF40T4TApb6g1mWg8Sx X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: c30daede-0714-4b04-de27-08dc6bdfcbdc X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2024 02:13:32.2806 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0AiRmrEw6VfzHZDkDcunST584lN/OZvmrIsrGxmIpOQTmVBdwdav8PxTFYi8U1jCgsuXYB0Z5TM7pq//fTVSvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6070 |
Series |
selftests/alsa: fix a build warning: return a value in all cases
|
expand
|
On Fri, May 03, 2024 at 07:13:30PM -0700, John Hubbard wrote: > dump_config_tree() is declared to return an int, but the compiler cannot > prove that it always returns any value at all. This leads to a clang > warning, when building via: > > make LLVM=1 -C tools/testing/selftests > > Fix this by unconditionally returning the "err" variable if the code > reaches the end of the function. Reviewed-by: Mark Brown <broonie@kernel.org>
diff --git a/tools/testing/selftests/alsa/conf.c b/tools/testing/selftests/alsa/conf.c index 89e3656a042d..0109fde53e6f 100644 --- a/tools/testing/selftests/alsa/conf.c +++ b/tools/testing/selftests/alsa/conf.c @@ -116,6 +116,8 @@ static int dump_config_tree(snd_config_t *top) if (snd_config_save(top, out)) ksft_exit_fail_msg("config save\n"); snd_output_close(out); + + return err; } snd_config_t *conf_load_from_file(const char *filename)
dump_config_tree() is declared to return an int, but the compiler cannot prove that it always returns any value at all. This leads to a clang warning, when building via: make LLVM=1 -C tools/testing/selftests Fix this by unconditionally returning the "err" variable if the code reaches the end of the function. Signed-off-by: John Hubbard <jhubbard@nvidia.com> --- tools/testing/selftests/alsa/conf.c | 2 ++ 1 file changed, 2 insertions(+) base-commit: ddb4c3f25b7b95df3d6932db0b379d768a6ebdf7 prerequisite-patch-id: b901ece2a5b78503e2fb5480f20e304d36a0ea27