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 DD86D4241E; Thu, 19 Jan 2023 17:44:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C622B40223; Thu, 19 Jan 2023 17:44:44 +0100 (CET) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 09433400D5 for ; Thu, 19 Jan 2023 17:44:44 +0100 (CET) Received: by mail-pf1-f170.google.com with SMTP id 207so1937298pfv.5 for ; Thu, 19 Jan 2023 08:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=9U2Q1xmxRKpG9gjg5J9VrqcbdR4Ch101ogHj84tZfEI=; b=ojTs/7cUzm+0zzJS7nQSb+8kE44geOGHr0d8jjc6fQtlllo3qq675ftz1nPBVT3JV+ eQFH2CX/b1cpEQzIgxotSB3IRuIuHagxWLS5iu3kRTrvuxBq+3KeFRcHUJ8MYmBvGHM2 66z//ecja+xSh82M+lhNahzOVL7zNpLrClCgkvGfnjuOE3o/MAMJh9ykg3XRKmrRL8E+ +lqCN6G5jWlCc3i+syV9A737DCOR5SED3q2KcQnXWAGqSi+BtJzHQ0oXa9AQsyHVjgYk 8iq7YL/MuIB3TG+lpDlbuFe/kE1FaYUs9e98A1bMWWHOYGDSSlVTmahd73nuquxaao1i QZ3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9U2Q1xmxRKpG9gjg5J9VrqcbdR4Ch101ogHj84tZfEI=; b=YCQAnQvyybDKTbFTcTYN3fMCfZH1jDNvrP8ge3uyA85gBrFJzy06ECb6hmpHdK2lUt znyzMXtpKOLs+kIsiCSoPcfylVxsYyyDbvSoSNjHVfl8Mqp4EIDtWS849TdJ1/u6GbQv xgvXqSOo+EbEkOoNzYr49AfxoQVQgrcyahF8/ZY0KAhuxNeUQDclkys0dRCAUi8+JijA iYM1IARq4h3iG+E9lG6mOzcZ7/mYcKFmKTmurw2wYXsIaKCPHWOfTyASvVa0ZZ7oVNKS nmntrlrFlI1RXRjEAgIpjY/vCYX/JW6RwXfwHM8qG0kKFOoMkvyr4Xj4ZTO/Cu7LeYCM Lf3A== X-Gm-Message-State: AFqh2kq4MdaWxnWJnuQyD9gBgyRXgThL0XQkoTBdLRRtNn7HsK1ymBWT AHkzWAF4EKshfOo2FX/91kZoxA== X-Google-Smtp-Source: AMrXdXt3BaC02eI2uAZaUyigjlIqACrgVOE5HHfo1PmKCQ1A8t1Ju3G00cCnLHwNrXzTeXeBG3jF1w== X-Received: by 2002:a05:6a00:1a:b0:58b:b93d:73ed with SMTP id h26-20020a056a00001a00b0058bb93d73edmr29471620pfk.3.1674146683173; Thu, 19 Jan 2023 08:44:43 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id 145-20020a621697000000b00588d5c8b633sm19913377pfw.51.2023.01.19.08.44.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 08:44:42 -0800 (PST) Date: Thu, 19 Jan 2023 08:44:41 -0800 From: Stephen Hemminger To: Bruce Richardson Cc: Ferruh Yigit , , Olivier Matz , Subject: Re: [PATCH] examples/cmdline: fix build error with gcc 12 Message-ID: <20230119084441.24bba968@hermes.local> In-Reply-To: References: <20230118161111.11710-1-bruce.richardson@intel.com> <3dbc9f6b-9efe-5855-aa8c-37513d823db3@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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, 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.