Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 19 Nov 2002 06:23:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 19 Nov 2002 06:23:24 -0500 Received: from xsmtp.ethz.ch ([129.132.97.6]:29774 "EHLO xsmtp.ethz.ch") by vger.kernel.org with ESMTP id ; Tue, 19 Nov 2002 06:23:23 -0500 Message-ID: <3DDA20CD.8090502@debian.org> Date: Tue, 19 Nov 2002 12:30:21 +0100 From: Giacomo Catenazzi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-us, en, it-ch, it, fr MIME-Version: 1.0 To: Robert Love CC: linux-kernel@vger.kernel.org Subject: Re: [patch] ALSA compiler warnings fixes References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 19 Nov 2002 11:30:22.0003 (UTC) FILETIME=[0BD81030:01C28FBF] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 567 Lines: 21 > +#define snd_power_unlock(card) do { (void)(card); } while (0) Why do we use in kernel: do { (void)(foobar); } while (0) instead of the simpler and normally used in std files (e.g. assert.h): ((void)(foobar),0) ? The "do while(0)" is used for multi-statment macros, not the case for void statment! ciao giacomo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/