From mboxrd@z Thu Jan 1 00:00:00 1970 From: Willem Jan Withagen Subject: Re: unset_dumpable Date: Thu, 20 Jul 2017 22:06:49 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.digiware.nl ([176.74.240.9]:42050 "EHLO smtp.digiware.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935984AbdGTUGv (ORCPT ); Thu, 20 Jul 2017 16:06:51 -0400 In-Reply-To: Content-Language: nl Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Patrick Donnelly Cc: Ceph Development , Brad Hubbard Op 20-7-2017 om 21:20 schreef Patrick Donnelly: > On Thu, Jul 20, 2017 at 7:02 AM, Willem Jan Withagen wrote: >> Hi, >> >> I'm running in too many: >> /home/jenkins/workspace/ceph-master/src/test/bufferlist.cc:490:11: >> warning: unused variable 'unset_dumpable' [-Wunused-variable] >> PrCtl unset_dumpable; >> ^ >> >> for it to be by accident?? >> But why is this variable created in about a dozen functions? > AFAICT, the intent by Brad in aef2a7b6ac5d0dafdac16d0d4cef42056c07b5a6 > is to prevent core dumps during the lifetime of certain objects. The > object is actually used indirectly via syscalls in its > constructo/destructor. > > Is there a nice way of silencing this warning for this code? I suspected as much as that. Likely there is a pragma that can be wrapped around the declaration. And then stick it in a macro, but I'm not sure that pragma will survice a macro. --WjW >