From patchwork Sun May 5 21:47:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 794852 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2054.outbound.protection.outlook.com [40.107.94.54]) (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 BC9E12574F; Sun, 5 May 2024 21:47:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714945655; cv=fail; b=szPC/LVYOkcFBf6uxjK/pnT7mVMUhmly2Vf7oieurH5HlS8AYZDp3NnVFPer45AjcUfVp9/iXMrjFZBNQKLUMkAfzqhRb/ObNAuApbuFch+ErRZ7cxGShe7zMO0+12t5F+tZCHqINjeQT8qF8qE9MCxbPlHy6zymU5Egr9CpKLg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714945655; c=relaxed/simple; bh=Ea+GXEiKX754wvjeuSRKYo33w+yxtWNA7JPLjsE2N5A=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=I6B89vTD24szRPMoXh5zqeUZiBq5iJpdZm12wNbHCJcsyQS/rptTJrHygwBzrJH+9eUov1xJmjUy50mx+E2joQoXjT7HxveD3u4wGUyXoOGtCTWTKXulH+URpMuob9b8VMKTvZPn3pEqFDxebMggm4NQFHq/F6peCNDkRQSTrlo= 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=bFsOtiiv; arc=fail smtp.client-ip=40.107.94.54 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="bFsOtiiv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OyE9FXukBeTcj0vu9FTwgwwxpTmTPFI79kDCaLpMf7hh/iTCYmxsGTdcp4oLNMsPkt+IZq9Qadg9ExMyKtR9gfIDVRWIuOD0dmgBCrbYaDsR7HFt+xxoPVqLnK87KYfVxSwoBF8U1X/VadD+c7fQe8xizE5gQj83aduWK2VIWnryjrmCl9P1QzmoABGZZHeATXAFyNIcDfWBe13MwUrs5uaKrsgMmPZxqjvBh7L0mmRIYDZCy+XxsYPqvl7+4Vr2RtDVHnVAYBiKWA5a4lSZJpn+KwkNwoF31fTERILcuWFMYHVZfKWIovwuxg+lUBWmkPdhHaG0+T9yzCIgaybilA== 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=393r2bX2/530z4aLiF8+IUnJsBOX2Xh5HFLGkuUKOQ8=; b=jsb9HSwiHCa2lnF/Tbz8CwYw0420Pv9W4/rri51sC3IwwYzoSJvKZGssM1S653wdm4rXIgViDlLG+HraaVmS3aE4QH+UDkl6eEPEAutLqsbf0O5umQgFOObCRnTr0V1G/ZMZe2NVx36VNEuhdC2Dxi/iCka286pYd47kRTkb5fk3M5HOIvZ6R+cea8p6UyM51HTeGvT4bGuGAVFS4H+EPRi8ou5HWpJ7OOO4DUaTLb+DN1yx/tXgbym8ygLyWKX9bSQPnLGekmk0x3CFygLPQffb+7hUHpv5PrRHDFyrQDZZwn2wHofnT5nu23+8WfdNSq0Vp7PRxDJtTgpLjOUWSg== 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=393r2bX2/530z4aLiF8+IUnJsBOX2Xh5HFLGkuUKOQ8=; b=bFsOtiivScS1TgF1NgnQVF0VycDLiD9oesQ3dN/Xvk8H7E8YURKKWuXmyjUC+3O30OhD3jXu5DUWA7NkzTaveK0vbpifbeBvJw9orudO8sw11wifE78MV4HqSQ+nX/iHgpXr8hAK6EgbESaLOYHbDahcy5UK2roj+S6YWzcJSuZPInEo9U+vPVoyJ6S9II41MX1GnvZG3wAXt2gDZATKhFVrixBSOKNuCvrtuF4RDGV8vXZm+EvaMtTJ5zPFgYVT1letxirDV8jBtkvmjJdiNYklb56BGBXLBrfs6PIppOMTzmn3JK1U9PSaqL8MMuKwV9R0jDARnA/h6kyrYkRqig== 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 MW4PR12MB7013.namprd12.prod.outlook.com (2603:10b6:303:218::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Sun, 5 May 2024 21:47:30 +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.041; Sun, 5 May 2024 21:47:29 +0000 From: John Hubbard To: Shuah Khan Cc: Phil Sutter , Pablo Neira Ayuso , Florian Westphal , Felix Huettner , Max Lamprecht , Luca Czesla , Xin Long , "David S . Miller" , Paul Moore , Richard Guy Briggs , Boris Sukholitko , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH 1/2] selftests/netfilter: use socklen_t, not a signed int, for len Date: Sun, 5 May 2024 14:47:15 -0700 Message-ID: <20240505214716.62304-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR13CA0180.namprd13.prod.outlook.com (2603:10b6:a03:2c7::35) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|MW4PR12MB7013:EE_ X-MS-Office365-Filtering-Correlation-Id: 2029e349-6352-4fff-0602-08dc6d4cf62b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: Nqieq+CodbMvQwJ9XBTeymFiq5ozBR+snQa5xrUdQ4IsXY4YsH7+ZEaV2lk3YMyE545fPFpR6fT52q6VabsvRDHI9HKfBB9EeKEhFt1UP8G28d7Iy+vL8rfUwoWg0nYcPByQFexfmBe8LV6BMOMO3iFLyYmPkh2L1uEi4M06s/rDo6SZTrKoI49pJ9uInWzT23qcXf7VkuIjWjm23/B4dRWKyO0SyfIeBi8kXZgwrt2rFhJ+QYW+fbOjDdCcwfZDVB/D1IPNjZzh/CuvS7Ys1kbZAE57KGo18YXerrFWDrwejHb9Strj/YRiAqFz9RAnEBaKkocjNgzlipwn0E8/hzaNgPruqYUOmrZAvkInfv2uP2qR23Vx23l8qADsfDWOu22UOatLaO5u+w4JfC1Yr9rnH2lcc9ZTVrFmHVNCWHMt3G3sPcrVFhi1ZdBJ3KHA/l7qjl8aH5unIhfEIEhD4sh707werLe52kXKhKvBJTDP1IrCmnbELo7/NaxJPc6HKsD181kGPeh+zed3YonFKRfgc2CnLsFla5OgOKKyTGqImfQJc4dClVFAhuVGd+BxLpzaSVm+3Qn9CLHZ5NWzeRro83sMR4Vfcv5oH3Hu5aoKZamOlMQqC4raQvMCAaimw8GU9MHiEmG4vNQQ6uVQozpXLEzBxlS52O8yNQprP+NaZZlZBKYBs3CxWGzA1XkT/yMAqYg2cp9coe8woER7ficfj9+ii8+VguWDy2JLEX7eONHFQP0uhjgy2sHIV2IQeTw2MKnIw2EeRuTykfrTfkHUd/qUCvCGkm1sHAdn2J21Ai1dk2lbhMT/Jx7UARc93BDONvEGLTPtmltDZUsCUfMTH1y/i6KU5NJ0u5SoeLJK1llHMNyMvm4XqSDRRD8OGvL+OAaALxjW+XB/JXgmSEZLnjGZaEV0l7+dj7qf4VxycHm8ARD8TacKLcmKCwtUb2MhEn5Ex+suSwZs2Cxts6fmbU7ff2jN5O2mW7bfNxI0Cw86nCoOM33RYIYg+hkFDJrBOWYWPBTWI9eiH8v7mS3ugjrAbLo84pLgbN6iauci0g3UwMF3wLM9cAElKquXtdp20P8AgORMIVXuVNX28RKe7UQoC0RkbN9Y8qhQX8Rd3Nq4nQ5sNYbMnNjzLsrvK3LeIozyfD1PyoyL47u0eIJSRvxT85k8j1gKyyyK9PLQwmzqGtg1kuEhEx3x9ZpzQ1YbogBuftqGHwWxhd9e+7blvfONMK0Yjz8w665pQiPZWcZ/eL3jAyfNa4iaytM0Kl0sHKJ36OAfLeMMVN62pw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(7416005)(1800799015)(376005)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MVDzA+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d0Tn0uhKUj4Qc280jDubdwwvksWbM8wFsnGsWL+XFCTVG2gjejpPj/OioxQz5Fjjd3rURIXaUL9iS4T4q5zj4371zmqNCLXu5aOTbenCaws4iDIjZexmCJc280Ggz8I3wvay6ihUiuEuxYfMdpmPsloqprAl6VX0DnGCCA0IYG9ek/kPYDOcv3qvQ9SHf6pORAi7PDvHRrCel83bkIqKfX4KHn06XQkjHdug2jrE8Mo1aeuFL6XVy3u0O4wsX9JFQC24Qn/wu8Zb+I1tark2S/3vp4DniVN9erdBIh/yqWxFMOR5vv3QwgQ8jTu3qUw8ibx/ZbOiNq7vr1RnqgkotuW6C19vLdSXrpS9TRQvxR17UYdWbv6fK+VCA9pz32PEcEFQcIvOjcIiJPxPPPEmKYY8iFFNgy3KwQwI95kRhwpIfVy8HIILMy/yOl6f6rJq1aGZHRQyg2cfO1Ev/FYIT/ePMI1giT7CzbXh8yM7bwAansXM3rLa5V5n4y+gjNHkhD0B3eioLCOxjNPH3f+ZZNFVqojw== X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2029e349-6352-4fff-0602-08dc6d4cf62b X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2024 21:47:29.5926 (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: /+RC6JLr/YG0rTNd32nAqaZBZDzhfBcooAA5aTiqLTfOoOX0xGDuFkrq0d6Vh8yn/UyYHCW3xHH/VtJyJFeByQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7013 When building with clang, via: make LLVM=1 -C tools/testing/selftest ...clang warns about using "int *" interchangeably with "socklen_t *". clang is correct, so fix this by declaring len as a socklen_t, instead of as an int. Signed-off-by: John Hubbard --- tools/testing/selftests/netfilter/sctp_collision.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) base-commit: f462ae0edd3703edd6f22fe41d336369c38b884b prerequisite-patch-id: b901ece2a5b78503e2fb5480f20e304d36a0ea27 diff --git a/tools/testing/selftests/netfilter/sctp_collision.c b/tools/testing/selftests/netfilter/sctp_collision.c index 21bb1cfd8a85..91df996367e9 100644 --- a/tools/testing/selftests/netfilter/sctp_collision.c +++ b/tools/testing/selftests/netfilter/sctp_collision.c @@ -9,7 +9,8 @@ int main(int argc, char *argv[]) { struct sockaddr_in saddr = {}, daddr = {}; - int sd, ret, len = sizeof(daddr); + int sd, ret; + socklen_t len = sizeof(daddr); struct timeval tv = {25, 0}; char buf[] = "hello"; From patchwork Sun May 5 21:47:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 795961 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2054.outbound.protection.outlook.com [40.107.94.54]) (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 857E47D40B; Sun, 5 May 2024 21:47:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714945656; cv=fail; b=N0SoobSerfIUXTZd0aW/cq75Ev+4vRu6DkP/4qQ0FGjC6GR1j/0wIv6LeTmKSX6irEoa3kUjAJnAUQ9Lgcb7uVS/+CNjL9iBDlRpfpt4KDGJgWa+sn3OAzK/6bC1GAvJ/g7/K9Kvv9vs2deyNclMwkpsK6XaIQj+YK2v0q3SZ5g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714945656; c=relaxed/simple; bh=XacfLRQw1yUePRYMz7AsYkCowpt13BJNCt/3+EfSq00=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=FQ7kcCllHTOmehY93lSfESRUdea8RBZi66+UpvwmHvBWbWp4VrqxhksvmWUqfVReDUSmPw7/9MLwPocAew3JZOPVoNW5uIQKuDIWG+RQNsqMXE6NQBu1xe/ViCtrXzESN4K0TITXaSn8k339Oq1KUNHYVxI8LEFF2mrIJK13Mbs= 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=tn9gq/zp; arc=fail smtp.client-ip=40.107.94.54 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="tn9gq/zp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zt2M4fro7QH5ixbGMfsdXMq5lHPmzW7a0ypjLLpQaPmRecUEaQVzrbfhkJs39LWk/dikWmwKe+2DRCErSg6xmcoO2I9SFufDcowG5/Wsyl9EL/vwIoTpoywlKIyaWBgIhn4kfRsFTgj6faW4L3wZt6tS6RIpiEcOUwfwxoav8AYaJRUYjCQkm3BQLDizFNLx5F7xSA8TEaawtYewQJ7SjLXE4BeMYJ5zsTfTuzMKgTcG+iSOxaCcHCqHynzkRwqSffF2D1ohjrTVH5PBvqHmB5Cz2dSJx5rpbKYYIAgzRHj80RGaklzZVc8O1921Ouhu2szCsVmNjBTmw6hZ4fx4bQ== 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=fXCsCCwEiGhjgUtDPbCjDLRGRxfOzZaSLbP0XdJdUPA=; b=m14HvLcYVBHDwCTNYQ6WwuWWynvGFYKTnS0ibo/RRqajs/lV8JVktb8VbY8HA3KPJAHkxFW1v45r5U+M4woB8N5XRcSOajsK5Ymlt6FkyRfbFUdMxrZ5afK1uzgYNgb8z/on+mfpOztQi0oy4twXiR86vfmSi73I8n5KN19k3Tm7sofCp4akWPZlq7LCvd5spNRkz4j8kucbMjkYGb8H8yg6r9jMsrsiun50ybvLRNOs5WywBGszaatWaCu7aXn2bSGF/Cry+UMbUptuDkN3eQpl14cxm9h8DNnBJHHjCRBl60BAE5BYpFWY0AfZu0NoXa3OC+diEUooUMisGfR0kA== 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=fXCsCCwEiGhjgUtDPbCjDLRGRxfOzZaSLbP0XdJdUPA=; b=tn9gq/zpJEe6kzRRb3D2UkpNuBPAWp25tFlyDB9tXXew6pDrnm0XB+odbqQ7pfz5BoTBcLb6kzJy+au6Yf6Uh3KJn3b1uLjQVSNfKz2l9nI/fy662obNeXdpcpxZFly0CI9Skg3ShJ/PFmwqY6vQaES7EpJSdlIWuk8d9raf2o50idivCgdnuE6TAnxFseMQ2f7as4qOUItxZhuNa+XYr+JJnacYqYxK0d1dWvmY/cX/SMZqBFg4Dv11hnzvCnFUZ/XzCvw2pzGoinnjm4ueUe6+s+R1DdxKL4w42LidjDLH83K9Bp5vgn57QwrQUDGo42B3MJepMAs1UnPDb5LXWQ== 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 MW4PR12MB7013.namprd12.prod.outlook.com (2603:10b6:303:218::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Sun, 5 May 2024 21:47:31 +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.041; Sun, 5 May 2024 21:47:31 +0000 From: John Hubbard To: Shuah Khan Cc: Phil Sutter , Pablo Neira Ayuso , Florian Westphal , Felix Huettner , Max Lamprecht , Luca Czesla , Xin Long , "David S . Miller" , Paul Moore , Richard Guy Briggs , Boris Sukholitko , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH 2/2] selftests/netfilter: return a value for several "int" functions Date: Sun, 5 May 2024 14:47:16 -0700 Message-ID: <20240505214716.62304-2-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240505214716.62304-1-jhubbard@nvidia.com> References: <20240505214716.62304-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR13CA0151.namprd13.prod.outlook.com (2603:10b6:a03:2c7::6) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|MW4PR12MB7013:EE_ X-MS-Office365-Filtering-Correlation-Id: 2a3f12ed-0a46-4a29-7748-08dc6d4cf779 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-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Uwo52ubsbBmcWpaQEgOHbSldti3O9a58+B7sCHXoYfB8cnn8DQ9v5FwsPql1Uf1lpMkMcNs9HP9IgkCAGKJf2SI5bbsF3Pc+9+6Pku53rK53XBWyNCVEF/rcEtO3so3Fpjl8UCDbMcV0zrfaHo7T08PB01EN1k1Nf4ehMouvqUHwH814a7KB6jfNXn4ip6bALL6JbutH90KObHOtiGkhU/kj82r51wigsNoiGcfUpzl6hi2DhHA6UoJP4Q7lmxCepihZAZwIMsxTacHDzVkm+JwBxuhTIvfgRLsUXNiE66gstlu2E3nstZkpFFUA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(7416005)(1800799015)(376005)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ljTiAj5Mkytir+nXOQM7AmI82yIRq2MAYuCe6U+o36k8BiVDSTXInyWrfb+dcafWBJo8lqfVH3dvd7p0qgARZEfjj6YTn5U3N07jLePfRyvtVj/jQbs1QjZn5iOWjqr84Ut+2JZRbhM1zLaujEb+ZnkRYQ+E450e4OtH0OuAULJPF1F4nEAHQ3XEsaSjT//yKmv4jwcgUUedKnoVtR3W/2G3tbsFvTMk6f+BAzG1rU1ZdSl0Q2gZxdhvh+klqldkOg/+hkEv2zto9jwHSARbWRv6I/LUO9qW353sGiFWT6utL3roqMSsfJ+7GZwH2o0hP1zbNh94885Fpu5XS2GbLO5s+fHyAc9STL5DWY9SVFldGDcwZw2p9ELymGNA7WuwLwefcC/q7mjDCbzJivpp6lV+6ydIBUFY06QK1rfj1VD/9+DV4ya5cet7xMCOV3EqXn/l4E0CFyVBnerZ/Mch81+8Om+90uYBqXHGgue37bMhbTws9XCmXdwRto3kjsVjjeephc5NYQc6edL57ktklKslt61Pclf0MPOnUAcYYmulw5Mn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Exchange-CrossTenant-Network-Message-Id: 2a3f12ed-0a46-4a29-7748-08dc6d4cf779 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2024 21:47:31.7519 (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: YmECuSCWt3GoCliUAGBtUaRzk71pnw9ajpdkYZyKnzftbtumXIMdmvKsE0vur19OHNlLq7Q+WhzNk/+9eEZVVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7013 When building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang warns, correctly, that several functions declared with an "int" return type are not always returning values in all cases (or at least, clang cannot prove that they always return a value). Fix this by returning 0 for each function. (For these functions, non-zero values indicate failure.) Signed-off-by: John Hubbard --- tools/testing/selftests/netfilter/conntrack_dump_flush.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/netfilter/conntrack_dump_flush.c b/tools/testing/selftests/netfilter/conntrack_dump_flush.c index b11ea8ee6719..2513221ae5e6 100644 --- a/tools/testing/selftests/netfilter/conntrack_dump_flush.c +++ b/tools/testing/selftests/netfilter/conntrack_dump_flush.c @@ -43,6 +43,7 @@ static int build_cta_tuple_v4(struct nlmsghdr *nlh, int type, mnl_attr_nest_end(nlh, nest_proto); mnl_attr_nest_end(nlh, nest); + return 0; } static int build_cta_tuple_v6(struct nlmsghdr *nlh, int type, @@ -71,6 +72,7 @@ static int build_cta_tuple_v6(struct nlmsghdr *nlh, int type, mnl_attr_nest_end(nlh, nest_proto); mnl_attr_nest_end(nlh, nest); + return 0; } static int build_cta_proto(struct nlmsghdr *nlh) @@ -90,6 +92,7 @@ static int build_cta_proto(struct nlmsghdr *nlh) mnl_attr_nest_end(nlh, nest_proto); mnl_attr_nest_end(nlh, nest); + return 0; } static int conntrack_data_insert(struct mnl_socket *sock, struct nlmsghdr *nlh, @@ -207,6 +210,7 @@ static int conntrack_data_generate_v6(struct mnl_socket *sock, static int count_entries(const struct nlmsghdr *nlh, void *data) { reply_counter++; + return 0; } static int conntracK_count_zone(struct mnl_socket *sock, uint16_t zone)