[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] tools/xenpmd: Fix gcc10 snprintf warning


  • To: Wei Liu <wl@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Fri, 16 Oct 2020 13:43:48 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • 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-SenderADCheck; bh=2YBwo7/KnBKZGR/GafM7NrcqA6CevgypttbbL0iwk1w=; b=A2dQQMGy1JXBzHp31NsVWOfl5zzDejPxU1/XzlFodQzAKjTJa0SWld3DS111Eda3J0AxT0e05V492ec6I/3zV3SwbjGHj2kAsA1RZLEIdY8wsIENvjNLYy9ulWas+96BG5pB0HCR+cxTjhsHp1a29IH+3zm51rNYLgbeNEOzhDj53jnHUTXSNkQDpUxInaSge54d21uR/wa7N9ZTCIisJlS9LWXjk1brkoYGAJ2+J8TA+1bkJSRbEzwSAy2a4uSh6O886+KJEjVIO3tcDj81rI2JAXFZKHOWQkMTAGgvRoBY2kRVU/jDsqWac4Zej8QUmBBoGpRlcW/ty6NwJlg8XA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H3EALQsx5mFS6mMBkEIjXXFu3bSYTJQRE3tmYLMQL/vTszw6NMbqYuivEdw0fxzL1DxSIXVBCl1+YaznnK+AW+MMXtiHeTQ+1TUlXe6HP1HUDAa0yHm5+5ad8Rb2MeDqRGuUvLtt7KXYaM5eCQYUWCemSRk8rJRdGak5TEqUfC+LaA2L+AIrgkF7BAJzzZ04wMQJBJAdahW+wZVAdRgTywQamI881/qMJzSdozyplhI27rERBgwTzcVZp4xtovtZZO8MOdLhJJMWQ/M78mcetDwM8ZLQwsiCNKNrkoQV5WlMn2pnkB+QByLsBZLUSmq4pTOULO4wCRZj/j34SXTvAg==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • Delivery-date: Fri, 16 Oct 2020 13:44:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWotP5wvQAAnPEZ06mRJYSlYfV46maOtSAgAAEQoA=
  • Thread-topic: [PATCH v3] tools/xenpmd: Fix gcc10 snprintf warning


> On 16 Oct 2020, at 14:28, Wei Liu <wl@xxxxxxx> wrote:
> 
> On Thu, Oct 15, 2020 at 10:16:09AM +0100, Bertrand Marquis wrote:
>> Add a check for snprintf return code and ignore the entry if we get an
>> error. This should in fact never happen and is more a trick to make gcc
>> happy and prevent compilation errors.
>> 
>> This is solving the following gcc warning when compiling for arm32 host
>> platforms with optimization activated:
>> xenpmd.c:92:37: error: '%s' directive output may be truncated writing
>> between 4 and 2147483645 bytes into a region of size 271
>> [-Werror=format-truncation=]
>> 
>> This is also solving the following Debian bug:
>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970802
>> 
>> Signed-off-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
> 
> Acked-by: Wei Liu <wl@xxxxxxx>

Thanks :-)

Bertrand




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.