From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33717 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq7cI-0001K1-BD for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:53:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq7PH-0006yE-98 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:40:28 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:40886) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq7PG-0006y3-Vq for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:40:27 -0400 Received: by qwh5 with SMTP id 5so5264498qwh.4 for ; Mon, 30 Aug 2010 09:40:26 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4C7BDEF7.4070601@redhat.com> Date: Mon, 30 Aug 2010 18:40:23 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1283183960-28404-1-git-send-email-Jes.Sorensen@redhat.com> <1283183960-28404-6-git-send-email-Jes.Sorensen@redhat.com> <4C7BD96E.3010500@codemonkey.ws> In-Reply-To: <4C7BD96E.3010500@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 05/14] Remove unused argument for check_for_block_signature() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: kwolf@redhat.com, Jes.Sorensen@redhat.com, qemu-devel@nongnu.org On 08/30/2010 06:16 PM, Anthony Liguori wrote: > This is why this type of warning sucks. Passing BlockDriverState is a > matter of readability because these are roughly methods. Just because > 'this' isn't used right now, doesn't mean that it should not be a method. On the contrary, to me this is acceptable (or even "a good thing") because a patch introducing the first use of a so-far-unused argument deserves a more careful review. In fact, if we were using C++, check_for_block_signature should have been static. The cases where the "this" argument is unused in a method should stand out as possible bugs, as is the case with the parse errors in the JSON parser (which _is_ a bug, as the caller cannot intercept error messages right now). check_for_block_signature is not one of these. Paolo