From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mempool: fix empty structure definition Date: Fri, 15 Jul 2016 17:17:55 +0200 Message-ID: <6229308.49cPbzrqc3@xps13> References: <1468413041-22357-1-git-send-email-adrien.mazarguil@6wind.com> <57863E82.4010405@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Olivier MATZ To: Adrien Mazarguil Return-path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 0BA2F4CE6 for ; Fri, 15 Jul 2016 17:17:58 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id i5so34383302wmg.0 for ; Fri, 15 Jul 2016 08:17:58 -0700 (PDT) In-Reply-To: <57863E82.4010405@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" > > 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 Applied, thanks