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 9D6F64241F for ; Thu, 19 Jan 2023 17:44:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9401B41101; Thu, 19 Jan 2023 17:44:45 +0100 (CET) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mails.dpdk.org (Postfix) with ESMTP id 16F4740223 for ; Thu, 19 Jan 2023 17:44:44 +0100 (CET) Received: by mail-pg1-f171.google.com with SMTP id b12so1970508pgj.6 for ; Thu, 19 Jan 2023 08:44:44 -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=DnYXsDFpJ/LKvW75siz4vkgl9Z7WOqZUscV6IcYGfis2eg3i/t6E1dZtoJJ7XHfTEs Sc+qHq7w1d4dxwA7shjS0TD9mqw6H7bJJx5aRheb0nRbX/N6PckR7zIJO0Nw7LavbUuU 2c95I+k26lmiOet3XeqqW8d9gpnoKxe7ybs61DIiMuHDx5ERMOBAwTXI7/Gv3Fzar9fz dFaPfnmAvANDaSPanlK32DNXl7isAO3dUPnH4rToJAPCLzMLVSpqqWFEOts9xWfqtJ6j HWVSbSWu0x5kubskdhBLs9C0eBlO+qsXWIIqvoETqlU7kgHyF0rYlbH/Jo9ZUaO2KDk9 hQeg== X-Gm-Message-State: AFqh2krCWY8e1qyPLv4sQBh4izYuTLDx+dS+pBeJTjCQtzG+fwYCD2xn 8xhEs1iXUyhT1PEUSMQu2iu5cA== 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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.