From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62D0045FFE; Mon, 6 Jan 2025 11:51:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E410D40661; Mon, 6 Jan 2025 11:51:03 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by mails.dpdk.org (Postfix) with ESMTP id 62E634014F for ; Mon, 6 Jan 2025 11:51:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1736160662; x=1767696662; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=zDeDASfsjTBBBGLSOpRfJcKQLM2rlbVKzNKCeSZjrfo=; b=Rx2ZRCAWcjRi71Z3Ag/bvTf8hBi3Gn+BGqS+3cNhv72KnEuB5Tpq6foR BmjtnFRjABlbE25ULPQzfvQCXIRDhhGBVFyOuh/AfDZWR7rauWol4mwLS htz/FiNGR91PCX1L/hK1vw4jghARGQNtWlbMglqtyK5nkcEG+GPwY/nFI 2yrw75g4zY4xz8/Tt5VMumkmjBo7AcQsLHWtCN8o8pLCyD5/ZaoFNNna5 efEuQQm0YYge8Ua98iXaE3gdd20+369fxTbttTEaeOlijlZG4hrGkeWxi NMPFLHoBRr9gURjmjCGg+C1zfWrHvq/eJz06NwgoKIC5iQxyzkJcu2Kua g==; X-CSE-ConnectionGUID: hiF2rkL4T1CXWljO8P3aIA== X-CSE-MsgGUID: Wlf1hDg6Sfuc28QdGI1o3w== X-IronPort-AV: E=McAfee;i="6700,10204,11307"; a="36464462" X-IronPort-AV: E=Sophos;i="6.12,292,1728975600"; d="scan'208";a="36464462" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2025 02:51:01 -0800 X-CSE-ConnectionGUID: tBgrceG9REGYJ/rVIwv9Sg== X-CSE-MsgGUID: M+/RFiXZRk6998UwtXGmHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="133323741" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Jan 2025 02:51:01 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Mon, 6 Jan 2025 02:51:00 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44 via Frontend Transport; Mon, 6 Jan 2025 02:51:00 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.43) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.44; Mon, 6 Jan 2025 02:50:49 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZuCdP7hHWYZlcNQPuYDenlGx74de0qVU/dKIriNtwbbvSvsJnntaJCjJe/IaaIn3wXh9IhTGIE4FDinXtX7nayYyYONUf6VbzYXdd0XOaRP10L1hq/x5s5jsP/f02u5Z+yq7u7GyuFIv2HRVmj3yO6ooP5RFmc6km2BQT1+P29zx/LV+6U0pdvkYMGXdkR5O0vcM94yuZWIhUbbVTyzomKn1Ft2Ol7S+ckpzkL4NOv/ybgZuLGuy84tgtnlC/htQRbfvfxhxhDclzGPr1rq9iKDDdX7nL7NyCtxpWMFzS3odFr2DxVSc9xC3iCxsHoCPHkl1eYZyFeP3qAnwSpcdCw== 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=Blo2DG8yFcYdroTDU4JbeNdYvFJd+7thvtJKuy+MoUE=; b=wgG2gUezQ8Gza55gbmakTKBP89D5Zd5nyp2EblGXClyJYDwHtidu+NiiVZGJjysqxc89lUe6QEpBZj0RynmTLGgH093XGyiGx72yyBwGoH44dLQhfPA2RuZybtxeZdlDeYU5FQfGbNF7zb73A3Emv58j385aDldP1bBlTE22Z8Lj7JV6/aIoG1tv+CnaP7Tm08nBRfrRgCIramgorMBzpVQASzyK0GvfDWPAGMmNJg4wSuekjNjo2jZQyDet3qkfmiR2Oj2PZ0FLPgbmLlv66/iFBI1MxmEeYou0/qQ3c50lmmQIQhP5COK0EMH+XzdP/mfTU9Dtcexvu9P2rT+dpw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by CY5PR11MB6090.namprd11.prod.outlook.com (2603:10b6:930:2e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8314.17; Mon, 6 Jan 2025 10:50:39 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%5]) with mapi id 15.20.8314.015; Mon, 6 Jan 2025 10:50:38 +0000 Date: Mon, 6 Jan 2025 10:50:33 +0000 From: Bruce Richardson To: Andre Muezerie CC: Jingjing Wu , Praveen Shetty , Andrew Rybchenko , Subject: Re: [PATCH 1/2] drivers/common: remove unused variables and add MSVC compiler flag Message-ID: References: <1735238504-15597-1-git-send-email-andremue@linux.microsoft.com> <1735238504-15597-2-git-send-email-andremue@linux.microsoft.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1735238504-15597-2-git-send-email-andremue@linux.microsoft.com> X-ClientProxiedBy: DUZPR01CA0023.eurprd01.prod.exchangelabs.com (2603:10a6:10:46b::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CY5PR11MB6090:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d861c99-a4b4-40e6-1c7e-08dd2e3ff51f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?2pObsWnZV0LK3FrVDXtqrXyxfHqzeJlhJ5o72fvOQk5Vp+axRNdOMw/0b1D6?= =?us-ascii?Q?0n3hlS26FjKyodDxEIKipiqlUmEsgf03C+QJkR2kbCUOtGBezaOiefVvK55z?= =?us-ascii?Q?Bwi4MWF/LsIy/EV42FSOUQx6zpULgGOuEecwpWlScv2qn1bmjnq7xu+GkWaD?= =?us-ascii?Q?68qq2CfND/XAk6e+p4wNfwS/DrVELme+sfBYyGWs1xcNhis8gHYgs/sWy63q?= =?us-ascii?Q?0wuYSagmf2ixBZ8Buyj59hN3sB5nfKhLag4fblyWOgvd7xNW9UweIju5kbzp?= =?us-ascii?Q?I3079FEV8MkvK/zsD8hj5Y34BolEScFqvtzepieG1udMGn+BcOk1n6xOoU3y?= =?us-ascii?Q?p+0CQZk7bqF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MQxY5HG5af?= =?us-ascii?Q?FWfWp/t1URs1yqtokXTuyFcIW8MXVmJV5eV3+Ur5LGkSsYctF2aua4NvygRr?= =?us-ascii?Q?H3nxoBi3fZwBMu8/Gz1l2pwdrFNvwOhG/ldyWAcLRmh+NL0b/4tEL9cnZhGp?= =?us-ascii?Q?B2+J/jfleD726eo6ErUXCG/OV4XO?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(7053199007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?7XFdueQRIU5KRAEKSqIUliYIMCvRFq8HUYXPWRGYBULYmMTChEh1Z8EAkuGR?= =?us-ascii?Q?4gYk0/iZ1jY6jVfGr1MLsyE58jrD7Z4/yXwAGuZwEvDZ0eGhpFJrMQTfZ3kU?= =?us-ascii?Q?OMkVXKtnq7+VDKUcs10chGV1z2lNOcQ3d0A9Jx0PNrJg/wbiWDeS8uOXCQca?= =?us-ascii?Q?AwfrJecBjKEtkKySoQuhUUuNW/vZeYZn6XqxS8DvFdPGXNojd/OwwfrVP4qg?= =?us-ascii?Q?5U+hVdjeood3Oe9fzuiWXYsZEcOQ/Y9dVxbbAQruGE7NpHISq0SM+MvuonNi?= =?us-ascii?Q?yaJVwG3vPKp0V8eOHYbmgtjhfssu9IUSVxYDq5jlkiYIQVntQ4d4ZvS82uWA?= =?us-ascii?Q?aptPo6UJYAsS/YHUZaaCkjPRDNty+1EFjcu2sAqZdqUc9InNJcqHMj48VWxI?= =?us-ascii?Q?zgL5ZG9JsdfjCnUPzuiaQ7Lzvlym2XI+rc+oMkkEQJ/uO+JCHWGlx1WsUJY0?= =?us-ascii?Q?ueFzHqm8sNlewFrM6dcML8w2/V+0R6ZFvmUGGveO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YnwiEJMGxEW302j7HGTAM3+Ev41ForVr4IthxbVQW+dobS6dK?= =?us-ascii?Q?Yrrw8r9SP7xSIaR1qSMW+XVUvTOQXGZd76dsMoE2ymqMhnciZoh6XUw3GByw?= =?us-ascii?Q?qGv5SLIruqNciwHeIDaCzSlzBXHDE73iOqM7IulLvwqiw3hf/M3+NDat+X0i?= =?us-ascii?Q?/1RiGazwYWOqnmtYgaokRmSjhMcVEp9zizx359ji8ux52pme94k/1JBVIBnV?= =?us-ascii?Q?Cw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9d861c99-a4b4-40e6-1c7e-08dd2e3ff51f X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2025 10:50:38.7885 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3TwoklLW7oYQFkO560PuPxDhNjHqYujF+P70QBB5Ta9IBCNfspQt4A7WwPfuQ5yjmreg9VZpYln3fDMJwtOESjtecddEqV3QW/2+94ky2j0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6090 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Dec 26, 2024 at 10:41:43AM -0800, Andre Muezerie wrote: > Removed unused variables and added MSVC specific compiler flag to > ignore warnings about unused variables, like is being done for > other compilers. > > Signed-off-by: Andre Muezerie > --- > drivers/common/idpf/base/meson.build | 13 ++++++++++--- > drivers/common/idpf/idpf_common_rxtx.c | 2 -- > drivers/common/idpf/idpf_common_virtchnl.c | 4 ++-- > drivers/common/sfc_efx/base/efx_mae.c | 2 +- > drivers/common/sfc_efx/base/efx_table.c | 1 - > drivers/common/sfc_efx/base/meson.build | 20 +++++++++++++------- > 6 files changed, 26 insertions(+), 16 deletions(-) > > diff --git a/drivers/common/idpf/base/meson.build b/drivers/common/idpf/base/meson.build > index f30ec7dfc2..c069507f12 100644 > --- a/drivers/common/idpf/base/meson.build > +++ b/drivers/common/idpf/base/meson.build > @@ -6,9 +6,16 @@ sources += files( > 'idpf_controlq_setup.c', > ) > > -error_cflags = [ > - '-Wno-unused-variable', > -] > +if is_ms_compiler > + error_cflags = [ > + '/wd4101', # unreferenced local variable > + ] Just an idea here, since I see this same flag with the same constant appearing multiple times in the patches: Would it be worthwhile defining these MSVC flags as global strings in meson e.g. in a file in the "config" directory. That would then allow them to put in the flags array using meaningful names, and avoid the need for putting in the same comment each time. if is_ms_compiler error_cflags = [ msvc_no_unref_local_var ] If we want to take this a step further, we could define all common error flags across all compilers this way, so that we avoid the need for conditional in each individual meson.build file - we just define the names of the errors we want and let the string replacement handle the conversion to the appropriate compiler flag. The names could be, for example, the gcc/clang error names without the "-W" bit. If no MSVC equivalent they could be empty strings in those builds. WDYT? /Bruce