From patchwork Wed Nov 20 11:40:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13881076 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (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 2435619F495; Wed, 20 Nov 2024 11:40:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732102857; cv=fail; b=u2VHaoeDyAwfiRZZLCr0DVTIwcHBQelIv4yxgZoNW1QO6tAEF3xZlNXiHBzw8xA/JogpYQgJ0cPG6r2A2jogCV/A47u3NiQzR62K/CvUSSi/U5iaOfrLBOcySIpcgLqbctOm14l6n/RtP+naQvCo8eAGnaHmptqPHujd+J0xZa8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732102857; c=relaxed/simple; bh=XJnTl0drKOHaZdVhjwqxzB51ABJtYYvHuKC3ANPY5i4=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=V+3izYrVJtzaC4HCEQ7oZID0XA/JU444TlGcYqLPpUqu5Vmyma+6AAOOZv6s7xNTatT9brSedQx3sG2ps/KT5OFbJ/X96J6Tl176fGMRonCkxJDrXm/FKxOTgQ0gmihZ0z/ET8ddb/LAik2q2G/4FVdJ+ox8WgbIlrpipLdPfLs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=RanGbSL1; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=G0/1aldZ; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="RanGbSL1"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="G0/1aldZ" Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AKBMbFu027945; Wed, 20 Nov 2024 11:40:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=corp-2023-11-20; bh=mbvYFk/KJtQ2lyY+ prK6IUV8VODThXyJzYEA6F0AvM0=; b=RanGbSL1DaM0sTQMpO/AHWirg1GmeFqZ PntGhTAb6zodgyk6AE0V4GFAXlQ6aHO9gy2G7rpjs2nqgVYey53ynMOZqg+i0Rcm AOkZNmO88qbygth2wpQi+oTTD/qg914WnWZcN+Do8EFQRZBhUPSsqQrYNsq0Tpu4 LXZscS+x3pooGuTLL5cBpZ+QNP1/4tCc1B6cy1kOOmDJ06c5QDXZiUgpGWyt/ovP n7HhBBudhfKh3VO+5F3rf8i5HKbQC5WBp5o+mzDTSBLGjRCxF8Hkl0uVPjfJVoz5 /i2l3AlYdkIjmTyq6+fAf/3bcD+ei+Mp2Eweggb0z47okDFGLjbrgw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 430rs5ajte-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Nov 2024 11:40:54 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4AKA8lYD023063; Wed, 20 Nov 2024 11:40:52 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2049.outbound.protection.outlook.com [104.47.70.49]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 42xhuaevxe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Nov 2024 11:40:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pNtTBwjmKhwRFMNAuW3Os32GBDkHQr0S/oBIsQdXuXH2zXeC2q/rDUJP/WFs2cqXI+5IfnSRfOcun3kdlttNFsvnunL+rsq2RbZP6AxzOduTCasOSueOukNhTAm/I6MNgnJGGF3kkWqk0kAIdBcQ4qLGedTiX9+ShhqJzxn1Pz8ejGcUsF7Jb4Is1ofilTxpIA1nv2rbEpt+hYMjJLOONPxmLtR+yJdvLPppYL5AdlQA0H5GQoNuyoTjm/fKCccdrLyPYE3P9um1+ZEpCqNmZon3tnuNT1v3RoRBaH+kKlwvcOvoUeiQVqcZCB0dGbiVCYlp6wyP2Hdjtr0STyYG9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=mbvYFk/KJtQ2lyY+prK6IUV8VODThXyJzYEA6F0AvM0=; b=tuQ9SFLsHNcjXAxJXD9Co1Vz+FnLhcFnCMlcVfTrdmgk5GpnDOutVBE9RKSuYpyYdJQ7UTGgheE30g/wTvvgiQmDxsZN2iUTJfzmSMknKntFIq8BkuOoSqqOyxA6/aEjeux2g6Jf3rv0jUgca+tbTlAu3wRYo23rmpCUKECxM51RoiV+B5rj+GyaQ4gjfjxqSnAht90a/lLT19FmAhfLVpui4Ixcqm5CgTK5SpKrb/tnaU6ulVXJoC3REnIUy472ZWloZwv4yLJUlyjKHDikaFzWt7Z2OgdbsoLMPCj678ybmT+dd2BAwQkCm4Z8mSOiXHa78/Bwzv7ou3F8HB7H+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mbvYFk/KJtQ2lyY+prK6IUV8VODThXyJzYEA6F0AvM0=; b=G0/1aldZCeGQkgmHpOUH6lVCi5dAg4EuCVzudzhgjLtC2aQ1r66/IrypHLx3F7pFD44hLS0jyivMmpu8QjvrZ7ZUMFYMI4aHaPlhbwCwHqaRSnzAITBO0O7LBLNbpY+dWHeCMpEA2xVKr7vsvf+EBR96B/5r64NRqPcDmNhcnAQ= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by DM4PR10MB6813.namprd10.prod.outlook.com (2603:10b6:8:10b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.21; Wed, 20 Nov 2024 11:40:50 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::fea:df00:2d94:cb65]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::fea:df00:2d94:cb65%2]) with mapi id 15.20.8158.023; Wed, 20 Nov 2024 11:40:50 +0000 From: Anand Jain To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org Subject: [PATCH] fstests: fix blksize_t printf format warnings across architectures Date: Wed, 20 Nov 2024 19:40:41 +0800 Message-ID: X-Mailer: git-send-email 2.47.0 X-ClientProxiedBy: SG2PR04CA0155.apcprd04.prod.outlook.com (2603:1096:4::17) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|DM4PR10MB6813:EE_ X-MS-Office365-Filtering-Correlation-Id: aa39bac1-7bb9-4225-d74e-08dd09582ece X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: Mg+Hmt9PTvM5qoCB4r0JhTbs0wBnussRPpjmlzc80oUyu1FhHySs/vJnK02SIwEJOWk4NIl7P7mWP2mry9AHiN2i6kXXvvoYGZS974lScbZYPWTe9iT0LBlv9sgrEK+iYmx57ZItJx4om2oqOlrlsh4bvctU4EoQ5HWlPxyLa7IyrNQQ3+v5TPtkgUcCjXpbH5+NNQuNKsWe3D0bXSh6OleiO4875GwwsJN0pXiO9g6QVHlSnxRFgJXPrJDPvx3U+CgsWOep392qDH23eNF0kXwpp9GaINbtz2+mc1TntwmHgqfYNZH3JksMxrlttpn5gz5qQrHPSWJaXkKtbmWqlJJGNa4XwnI8VBoAuRldKyt129v8apaEINClHGWgBtNdW0uEMDf9PAxhHbeAgDh3Xjs69cQ47/iGPZMS9Owr8eDET63mM0smR4APRCgwdFqddhDmanRTxlw3EusMiqVyuHIXkyPMLe8c0l0k44788lgD8P/bEARCh8YjDlfWt/asiNFRggSrebpy7eT0ZbMTyEqKMEoesf01DRYYFpkID1fK/nmKodTN4E2spDy2ZrCRbbpZd4O3oOPxY3FzcGzbyCivpx3x4w3rS6usiPLf2YsLXZ8WcIMJwcO6FwrSexcnj2RYNlKb2ZJeUBS0waFYPhBL8X7mKc9uqhlNKWJeVPFDlotL/8xySNN5KR1nT+3FuGa2Ez/FEazAe6K+RUZT1sPlDsLnQ1YXb5dYFz9bvGNXOhml3Kyg4CpyHeU+aAX9Gd/G4iqHnxvysM781NQ822VeQr0b0d5hgxvA2RXBgsy9ud62BFMQ6q7BLyUcNGpI54hxICnXo0jPEbIXh3poBjneN+gbcLw9rOiI6v/GmrE4yk3n1c3kNBFx+fA30s7C06bHKWyxrwjHoharsrIorkiZLW/JaHF/1NWkyRSVfu+klh0X2LN23pv/cn5n/du4wpIujT1/9TD0SlfMSq/yf64cymditzEJvHN5t3uXbZpEhMxkcjyhhCVnF98PE3YGSSC3zuZ5x2dle9a56JgbCr50Xb7IIsHyE2fYXMbzGIOBnQYzKJPr1+HOwbvHnulMd523o2kSaaLD4Diejah7D5Kytb16fGNybv2EImk9Ci3WftL4o0mqIChAVxsQ0rYDbO6iX980uSu3UeBN+shoPC8AFf0IPRQal5LVcT2SwbO8jcQ8LRnnYfiU9RTLOCd4balbrupPhY4Pm5bMaD6kn/V891KrnfHF4s+RS5nxxG8xlW0GOzJjD+7A9i2ZAOkoDd+FznO2ANQMLpPKT3qNsbQfAPeQOEpxOcsOR92Y4PNGnDIhL0OJDba3BDYZ38+l X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NqJv1lQfey2lC5k57j/UMi1pSFYHthQ39B2aERWz7lDfASf5lUIDxr8mBTJHjhZbnRV1SGQZ2A3OGuzjxwlCJIKfl0a058OvC0txJU7QQgPjM29NCKxhNifiWIGeUXWRiQ8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gwZDo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa39bac1-7bb9-4225-d74e-08dd09582ece X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2024 11:40:50.7120 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Gxch94cCa3jav/sYJ70iLFRruucSAv7kYl6laEHUe3chHPZL+hf9h/wfAlgilKXi15B4HO89li45vOppAVsqLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6813 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-11-20_08,2024-11-20_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 suspectscore=0 phishscore=0 spamscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2411200080 X-Proofpoint-GUID: _tJF5BOPa79IFgq5XZGidJteW-eeE5sg X-Proofpoint-ORIG-GUID: _tJF5BOPa79IFgq5XZGidJteW-eeE5sg Fix format string warnings when printing blksize_t values that vary across architectures. The warning occurs because blksize_t is defined differently between architectures: aarch64 architectures blksize_t is int, on x86-64 it's long-int. Cast the values to long. Fixes warnings as below. seek_sanity_test.c:110:45: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'blksize_t' {aka 'int'} attr_replace_test.c:70:22: warning: format '%ld' expects argument of type 'long int', but argument 3 has type '__blksize_t' {aka 'int'} Signed-off-by: Anand Jain Reviewed-by: "Darrick J. Wong" Reviewed-by: Qu Wenruo --- src/attr_replace_test.c | 2 +- src/seek_sanity_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/attr_replace_test.c b/src/attr_replace_test.c index 1218e7264c8f..5d560a633361 100644 --- a/src/attr_replace_test.c +++ b/src/attr_replace_test.c @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) if (ret < 0) die(); size = sbuf.st_blksize * 3 / 4; if (!size) - fail("Invalid st_blksize(%ld)\n", sbuf.st_blksize); + fail("Invalid st_blksize(%ld)\n", (long)sbuf.st_blksize); size = MIN(size, maxsize); value = malloc(size); if (!value) diff --git a/src/seek_sanity_test.c b/src/seek_sanity_test.c index a61ed3da9a8f..c5930357911f 100644 --- a/src/seek_sanity_test.c +++ b/src/seek_sanity_test.c @@ -107,7 +107,7 @@ static int get_io_sizes(int fd) offset += pos ? 0 : 1; alloc_size = offset; done: - fprintf(stdout, "Allocation size: %ld\n", alloc_size); + fprintf(stdout, "Allocation size: %ld\n", (long)alloc_size); return 0; fail: