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 340B24241F; Thu, 19 Jan 2023 19:12:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2CF840223; Thu, 19 Jan 2023 19:12:23 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id AC682400D5; Thu, 19 Jan 2023 19:12:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674151942; x=1705687942; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=SWvVt9C3bfIJ8Q58+cHCieHM1cBiOvYp2mojv3vAD68=; b=NwH4e8wW09qXhEXv8MQCIh66dz7mS6GmCugIxK2nlmUfAerNkNNFtpVG 1mwXhQtZRkQ5uevdnYaTxQjQg2QnWqpgLY9ODUmaDCtltXxHJ0qNd+tkD KQpLrAA4VgCTJV7RruumKmKetBNmGFje34qO8xeg4oPZVQ4cQqHh69WHg HdpNEYp3NTXKhimMMXrbjk3Xfh6SGpCEFJKPT8+rVaTnJ3+nxHwhvWfme WdiN8Dsf18fLGMZY4Nz9ETwMJBduIlFkGODTbvel8D8WBrA7wjlhAEOgO XrKSvDDVbJPw6Ji723K0T6hCSZroxG5qHrlukRCbDpIQ2LCi6SpyGrkb2 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="305044133" X-IronPort-AV: E=Sophos;i="5.97,229,1669104000"; d="scan'208";a="305044133" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2023 10:12:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="660294981" X-IronPort-AV: E=Sophos;i="5.97,229,1669104000"; d="scan'208";a="660294981" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga002.jf.intel.com with ESMTP; 19 Jan 2023 10:12:12 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 19 Jan 2023 10:12:11 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 19 Jan 2023 10:12:11 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Thu, 19 Jan 2023 10:12:11 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) 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.16; Thu, 19 Jan 2023 10:12:10 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+gkbkOc8h66/tpkPK5tGYu6sN359ScIeJZcAGTq9vP212f3+pcvgAWURCRxf9aUmPwTKIz5iJWiFXghvVNXr2osVpLZR3JeeShqqupjcoY/2U2hGEvW1syECDyMtodfPFMVxJ/soSO2+q6AMBBbyi+Pfh96IQp2Iv5yjsXoHwhDFXb7jG2cPv6t+vGltEdlp9uWHh+PFt54OWY15qeSwm8FUoxphZh7Y8zOIfYjW2DRzasp8nNY5AT3klkOZsvp5Yg0U1nYxjwXXY40VFllVKKVYawJTqaBZ1rLUp1e0jxKKeLF2WMZEbYLqpRShi484jUAHL2xf0OocMDzzsfb+g== 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=y7pe/Pn709v7qcBM9FMO2NCH0/WHtj+G5k0AzAMUcqU=; b=WiJuC+hxTiaGQEoAo8TA9piMwmx+/UGYdlRP0tN5ZruI23r16kbY6t3ZtLNTHFXZUIpQ8QKo8pZn2VwBlIxH4LRBnTdDpkllfACaGTZIUvFDiE4GO84490J/cBpYjA4JOijmyxZCJvMEYk7aZQ3mwr0I/kbPp2v8Oqa54wbXgviuugQBCbNJQT+V37So2eWxg30Bbp+NQeuIpEJjbfvGUNlYJH7b+7amJQFA/aN495hKjEvBy1FaCa+QvKyGfN9zSFeMioZUN8X8+vLB7yeAUJl8+xNrwBe8uvMbGZX8/+upsuTLBOV3aZNyb6XJeifIpPpuHSvJJCQuNvy1pkUzEA== 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 DM8PR11MB5607.namprd11.prod.outlook.com (2603:10b6:8:28::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24; Thu, 19 Jan 2023 18:12:08 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee%7]) with mapi id 15.20.5986.023; Thu, 19 Jan 2023 18:12:08 +0000 Date: Thu, 19 Jan 2023 18:12:02 +0000 From: Bruce Richardson To: Stephen Hemminger CC: Ferruh Yigit , , Olivier Matz , Subject: Re: [PATCH] examples/cmdline: fix build error with gcc 12 Message-ID: References: <20230118161111.11710-1-bruce.richardson@intel.com> <3dbc9f6b-9efe-5855-aa8c-37513d823db3@amd.com> <20230119084441.24bba968@hermes.local> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230119084441.24bba968@hermes.local> X-ClientProxiedBy: LO2P265CA0430.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a0::34) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM8PR11MB5607:EE_ X-MS-Office365-Filtering-Correlation-Id: e21c32aa-cc35-4e10-d5fb-08dafa48ad94 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zboSXlPwtUq9KD+BGGnOHTYS7SZzPVi6KE1rmtyulFNH+GwZUm/HZWx8q4aJd7yMPAsKA1oIdr0PWkOC37UhGfChdfEInp9p9jwBHH9d2Y1mbYMZW93JSvMjeO65PT6t0ZK7p9rM/yNfTg4x2saK/gmuVAUk+ooatwMtHSQOkB28XDoaYPMZJ6LslHUqKFrPh21i5nF6utpV5J2zrr0yL8WcSUWZ+MByK95H/xfzr/mm08vxpqR6w/EFdWnXT22b5JBIvZ9DCH+3mIKuETRIDAyxll1ECZIKqVTPDbkNfX/uxfJ3MblqHXCYY94MbjJ5TGNdOk1+c20+nmORchhBOyVk2stTKa8NfZ+6b+oH+x8wViSvFUX07yNPyzUQyIiSx/Vxf61D61VrJPrDWXPzfDSyBf3wgSJKI7r2GDX/LBUYUZq171vGIA4EDV3EZbq9AqYfBBw6p5KSLZZ6rf+aszPbihRs1tbAnqPw0CsR8raFTqR/ECtK9HTuSJ07KM0kQ1BjImXaSStqza7yj2WQszqtZB55rG2+UlbnwcKIvC55RKq7vrcgumDXPNEmoeHd+cmtT+1qpvZlsA6wm6ptscR4iRx1PdP89iCS0/4lMOVYS/SurK6V1vH8DkD00EZIq4hCzBP1UV2iTMgZxWbiOw== 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:(13230022)(366004)(346002)(396003)(376002)(39860400002)(136003)(451199015)(86362001)(66899015)(66556008)(66476007)(4744005)(44832011)(8936002)(5660300002)(2906002)(82960400001)(66946007)(38100700002)(6666004)(54906003)(6486002)(6506007)(316002)(478600001)(41300700001)(8676002)(6916009)(4326008)(186003)(6512007)(26005)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?qTXcHaMijBwjMZhaNbKw9sKEMZNx/HPRa6+Qly2nSrCliHxeQ501jU0tq9a5?= =?us-ascii?Q?ao2EhFCpcau2hXTYfHImIWM9a699Z+VM280jgjVUG1G2Rk2Po+LWZm1WM4R4?= =?us-ascii?Q?yHILxYgfjsswXLXvcOsHNvWS/492BJLLru0WzPw1BXiMIoLb57TMgxJNIdIT?= =?us-ascii?Q?iUiIMSocnKiufAVIy0TdnwHd8zLJFIMk/dGEthsyRpoB4ohtlgR0ZzBgZUUo?= =?us-ascii?Q?6UUs5VfX4m0KzTSzTB7Epd31B2d3tDznLXsMTsicGRr+/bZeH7bXOhzSawW/?= =?us-ascii?Q?TCN8YfiS1wn+C97/p46lOd+fc89LyDXLvbuEOv6yp4id9SLi5hKv42bk0s2t?= =?us-ascii?Q?0Obhv4m5Cn45RiAUKzBI28/4co2VDhU83zGN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krDMEbxAvrJb1vzA91GXyZ3Wit9IDlmZBtlCrkO2MEn0Q8y12HWVfVOB?= =?us-ascii?Q?wb4Ik1VGbDxBcQ6uxirB5gOETL3t4yGD2a7nV2fX85D1hp955v4mt0KIS3FJ?= =?us-ascii?Q?/18GRF0SJnC0PraYJPwFW8oadEGVvUUvxELI7UyG9Q157Osn6AuWyNkKHUy8?= =?us-ascii?Q?Q5PCa622bhsaOYSCq6MryBtKUW1Q9au7FdapouFgfmS4sOK7mmfZwc29zaq1?= =?us-ascii?Q?mvH7Qr1q3oAzOHJW0+AZa9+I4Xm/fKhik+5xObjhXp/GG/2uQN7+SqGKsolB?= =?us-ascii?Q?+9usUXGpp87NQW2SEtlk63ZwHUQj/Ul460jj65Yna5FC+qeIy0KPpWaA/Iu2?= =?us-ascii?Q?4Q=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: e21c32aa-cc35-4e10-d5fb-08dafa48ad94 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 18:12:08.6586 (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: 9zP3o/BhaH/aOqlCxJTOhr12YKuv4Ws/ArmvtmfPnFWu7WhPaRWxE21g2/3EbJ9hvrbyHN0T/kBIoo7MGbl9HgI/tpHKs7+ez7YNvr9Qvy8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5607 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, Jan 19, 2023 at 08:44:41AM -0800, Stephen Hemminger wrote: > On Thu, 19 Jan 2023 08:59:10 +0000 > Bruce Richardson wrote: > > > > > struct object { > > > > SLIST_ENTRY(object) next; > > > > > > I confirm it solves the build warning, but what about to get rid of > > > `OBJ_NAME_LEN_MAX` completely if the intentions is to make size same as > > > cmdline library array: > > > > > Sure. > > Another potential fix is just to cast-away [(void)] the return value from > > strlcpy and allow truncation. > > > > Olivier, as maintainer, what is your preferred fix here? > > > > /Bruce > > Another option would be to use flex-array and not have fixed size. I think that would add too many other additional complications. At least using the static array makes the sizes clear and allows the compilers to warn about possible truncation so we have to explicitly deal with it.