Hi Maxime, Compiled this patch with aarch64-linux-gnu-gcc (GCC) 12.2.0 and it compiles fine.
Thanks, Amit Shukla > -----Original Message----- > From: Maxime Coquelin <maxime.coque...@redhat.com> > Sent: Thursday, October 6, 2022 1:21 PM > To: Stephen Hemminger <step...@networkplumber.org> > Cc: dev@dpdk.org; cheng1.ji...@intel.com; chenbo....@intel.com; > zhou...@loongson.cn; david.march...@redhat.com; > tho...@monjalon.net; sta...@dpdk.org > Subject: [EXT] Re: [PATCH v3] vhost: fix build issues with GCC 12 > > External Email > > ---------------------------------------------------------------------- > Hi Stephen, > > On 10/6/22 02:01, Stephen Hemminger wrote: > > On Wed, 5 Oct 2022 22:35:24 +0200 > > Maxime Coquelin <maxime.coque...@redhat.com> wrote: > > > >> In practice, it would never happen since 'pkt->pkt_len' is unlikely > >> to be close to UINT32_MAX, but let's just change 'size' to uint64_t > >> to make the compiler happy without having to add runtime checks. > > > > > > Would the standard typedef size_t work since that is what sizeof() returns. > > > > I'm not sure it would not create issues on 32 bits architectures build given > size_t is 32bits in this case if I'm not mistaken, as it adds something to a > u32, > so it could wrap to 0.