From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH] mempool: fix empty structure definition Date: Wed, 13 Jul 2016 15:13:38 +0200 Message-ID: <57863E82.4010405@6wind.com> References: <1468413041-22357-1-git-send-email-adrien.mazarguil@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit To: Adrien Mazarguil , dev@dpdk.org Return-path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id B46F12BDC for ; Wed, 13 Jul 2016 15:13:38 +0200 (CEST) In-Reply-To: <1468413041-22357-1-git-send-email-adrien.mazarguil@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 07/13/2016 02:30 PM, Adrien Mazarguil wrote: > This commit addresses the following warning reported by clang, which > happens by default, as long as CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG is disabled: > > warning: empty struct has size 0 in C, size 1 in C++ > > C and C++ must use the same size for objects to avoid corruption during run > time. > > Fixes: 97e7e685bfcd ("mempool: add structure for object trailers") > > Signed-off-by: Adrien Mazarguil Acked-by: Olivier Matz